Compare commits

..

No commits in common. "b47d623a0557331f01ecb2ac6f046830d3a7cbfd" and "18814338da776134da7413a1202cbd4127ef5faf" have entirely different histories.

4 changed files with 8 additions and 9 deletions

2
Cargo.lock generated
View file

@ -1041,7 +1041,7 @@ dependencies = [
[[package]] [[package]]
name = "sway-flash-indicator" name = "sway-flash-indicator"
version = "0.6.2" version = "0.6.1"
dependencies = [ dependencies = [
"directories", "directories",
"futures-util", "futures-util",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "sway-flash-indicator" name = "sway-flash-indicator"
version = "0.6.2" version = "0.6.1"
edition = "2021" edition = "2021"
[dependencies] [dependencies]

View file

@ -1,7 +1,7 @@
# Maintainer: Alex Janka <alex@alexjanka.com> # Maintainer: Alex Janka <alex@alexjanka.com>
pkgname=sway-flash-indicator pkgname=sway-flash-indicator
pkgver=0.6.2 pkgver=0.6.1
pkgrel=1 pkgrel=1
pkgdesc="flashes sway indicator border rather than always showing it" pkgdesc="flashes sway indicator border rather than always showing it"
arch=('x86_64' 'aarch64') arch=('x86_64' 'aarch64')

View file

@ -86,9 +86,7 @@ async fn main() -> Res<()> {
}) })
{ {
if let Some(parent) = tree.find_as_ref(|n| n.focus.contains(&node.id)) { if let Some(parent) = tree.find_as_ref(|n| n.focus.contains(&node.id)) {
if parent.layout == swayipc_async::NodeLayout::SplitH if parent.layout != swayipc_async::NodeLayout::Tabbed {
|| parent.layout == swayipc_async::NodeLayout::SplitV
{
command_connection.run_command("splith").await?; command_connection.run_command("splith").await?;
command_connection.run_command("layout tabbed").await?; command_connection.run_command("layout tabbed").await?;
} }
@ -192,7 +190,7 @@ async fn code_trigger<T: AsRef<str> + std::cmp::PartialEq<str>>(
if workspace.focused { if workspace.focused {
let width = workspace.rect.width; let width = workspace.rect.width;
let mut workspace = get_with_id(tree, workspace.id)?; let mut workspace = get_with_id(&tree, workspace.id)?;
if workspace if workspace
.output .output
.as_ref() .as_ref()
@ -215,8 +213,8 @@ async fn code_trigger<T: AsRef<str> + std::cmp::PartialEq<str>>(
&& workspace.focus.len() == 2 && workspace.focus.len() == 2
{ {
let (code, other) = { let (code, other) = {
let a = get_with_id(tree, workspace.focus[0])?; let a = get_with_id(&tree, workspace.focus[0])?;
let b = get_with_id(tree, workspace.focus[1])?; let b = get_with_id(&tree, workspace.focus[1])?;
if contains_child(a, id) { if contains_child(a, id) {
(a, b) (a, b)
} else { } else {
@ -235,6 +233,7 @@ async fn code_trigger<T: AsRef<str> + std::cmp::PartialEq<str>>(
connection connection
.run_command(format!("swap container with con_id {}", other.id)) .run_command(format!("swap container with con_id {}", other.id))
.await?; .await?;
// tokio::time::sleep(std::time::Duration::from_millis(50)).await;
} }
connection connection