Compare commits

..

No commits in common. "b619f25c903ca3796042003d03caa049715be18e" and "b43c6c9c562a712a0212a4c7a32cfecda024ce2d" have entirely different histories.

3 changed files with 69 additions and 80 deletions

122
Cargo.lock generated
View file

@ -257,7 +257,7 @@ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.85", "syn 2.0.79",
] ]
[[package]] [[package]]
@ -287,6 +287,15 @@ version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "crossbeam-channel"
version = "0.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2"
dependencies = [
"crossbeam-utils",
]
[[package]] [[package]]
name = "crossbeam-utils" name = "crossbeam-utils"
version = "0.8.20" version = "0.8.20"
@ -440,7 +449,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.85", "syn 2.0.79",
] ]
[[package]] [[package]]
@ -545,9 +554,9 @@ dependencies = [
[[package]] [[package]]
name = "inotify" name = "inotify"
version = "0.10.2" version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc" checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"inotify-sys", "inotify-sys",
@ -563,15 +572,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "instant"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
dependencies = [
"cfg-if",
]
[[package]] [[package]]
name = "is_terminal_polyfill" name = "is_terminal_polyfill"
version = "1.70.1" version = "1.70.1"
@ -704,6 +704,18 @@ dependencies = [
"adler2", "adler2",
] ]
[[package]]
name = "mio"
version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc",
"log",
"wasi",
"windows-sys 0.48.0",
]
[[package]] [[package]]
name = "mio" name = "mio"
version = "1.0.2" version = "1.0.2"
@ -712,49 +724,38 @@ checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
dependencies = [ dependencies = [
"hermit-abi 0.3.9", "hermit-abi 0.3.9",
"libc", "libc",
"log",
"wasi", "wasi",
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
[[package]] [[package]]
name = "notify" name = "notify"
version = "7.0.0" version = "6.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c533b4c39709f9ba5005d8002048266593c1cfaf3c5f0739d5b8ab0c6c504009" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"crossbeam-channel",
"filetime", "filetime",
"fsevent-sys", "fsevent-sys",
"inotify", "inotify",
"kqueue", "kqueue",
"libc", "libc",
"log", "log",
"mio", "mio 0.8.11",
"notify-types",
"walkdir", "walkdir",
"windows-sys 0.52.0", "windows-sys 0.48.0",
] ]
[[package]] [[package]]
name = "notify-debouncer-mini" name = "notify-debouncer-mini"
version = "0.5.0" version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aaa5a66d07ed97dce782be94dcf5ab4d1b457f4243f7566c7557f15cabc8c799" checksum = "5d40b221972a1fc5ef4d858a2f671fb34c75983eb385463dff3780eeff6a9d43"
dependencies = [ dependencies = [
"crossbeam-channel",
"log", "log",
"notify", "notify",
"notify-types",
"tempfile",
]
[[package]]
name = "notify-types"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7393c226621f817964ffb3dc5704f9509e107a8b024b489cc2c1b217378785df"
dependencies = [
"instant",
] ]
[[package]] [[package]]
@ -817,7 +818,7 @@ dependencies = [
"by_address", "by_address",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.85", "syn 2.0.79",
] ]
[[package]] [[package]]
@ -879,7 +880,7 @@ dependencies = [
"phf_shared", "phf_shared",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.85", "syn 2.0.79",
] ]
[[package]] [[package]]
@ -1037,9 +1038,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.214" version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@ -1056,13 +1057,13 @@ dependencies = [
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.214" version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.85", "syn 2.0.79",
] ]
[[package]] [[package]]
@ -1153,7 +1154,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]] [[package]]
name = "sway-flash-indicator" name = "sway-flash-indicator"
version = "0.7.2" version = "0.7.1"
dependencies = [ dependencies = [
"clap", "clap",
"directories", "directories",
@ -1208,46 +1209,33 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.85" version = "2.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"unicode-ident", "unicode-ident",
] ]
[[package]]
name = "tempfile"
version = "3.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b"
dependencies = [
"cfg-if",
"fastrand",
"once_cell",
"rustix",
"windows-sys 0.59.0",
]
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "1.0.65" version = "1.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl",
] ]
[[package]] [[package]]
name = "thiserror-impl" name = "thiserror-impl"
version = "1.0.65" version = "1.0.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.85", "syn 2.0.79",
] ]
[[package]] [[package]]
@ -1262,14 +1250,14 @@ dependencies = [
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.41.0" version = "1.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"bytes", "bytes",
"libc", "libc",
"mio", "mio 1.0.2",
"parking_lot", "parking_lot",
"pin-project-lite", "pin-project-lite",
"signal-hook-registry", "signal-hook-registry",
@ -1286,7 +1274,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.85", "syn 2.0.79",
] ]
[[package]] [[package]]
@ -1413,7 +1401,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.85", "syn 2.0.79",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -1435,7 +1423,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.85", "syn 2.0.79",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -1661,5 +1649,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.85", "syn 2.0.79",
] ]

View file

@ -1,19 +1,19 @@
[package] [package]
name = "sway-flash-indicator" name = "sway-flash-indicator"
version = "0.7.2" version = "0.7.1"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
log = "0.4.22" log = "0.4.22"
log4rs = "1.3.0" log4rs = "1.3.0"
swayipc-async = "2.0.3" swayipc-async = "2.0.3"
tokio = { version = "1.41.0", features = ["full"] } tokio = { version = "1.40.0", features = ["full"] }
futures-util = "0.3.31" futures-util = "0.3.31"
directories = "5.0.1" directories = "5.0.1"
toml = "0.8.19" toml = "0.8.19"
serde = { version = "1.0.214", features = ["derive"] } serde = { version = "1.0.210", features = ["derive"] }
thiserror = "1.0.65" thiserror = "1.0.64"
notify-debouncer-mini = "0.5.0" notify-debouncer-mini = "0.4.1"
notify = "7.0.0" notify = "6.1.1"
palette = "0.7.6" palette = "0.7.6"
clap = { version = "4.5.20", features = ["derive"] } clap = { version = "4.5.20", features = ["derive"] }

View file

@ -138,10 +138,10 @@ async fn main() -> Res<()> {
if parent.node_type == swayipc_async::NodeType::Workspace { if parent.node_type == swayipc_async::NodeType::Workspace {
break 'ws parent.name.clone(); break 'ws parent.name.clone();
} }
last_node = parent; last_node = &parent;
}; };
if !v.is_some_and(|w| w.eq_ignore_ascii_case(workspace)) { if !v.is_some_and(|w| w.eq_ignore_ascii_case(&workspace)) {
// only run the command if we're on a different workspace // only run the command if we're on a different workspace
command_connection command_connection
.run_command(format!("move container to workspace {workspace}")) .run_command(format!("move container to workspace {workspace}"))
@ -149,10 +149,11 @@ async fn main() -> Res<()> {
} }
} }
if node.app_id.as_ref().is_some_and(|app_id| { if node
app_id.eq_ignore_ascii_case("code-url-handler") .app_id
|| app_id.eq_ignore_ascii_case("code") .as_ref()
}) { .is_some_and(|app_id| app_id.eq_ignore_ascii_case("code-url-handler"))
{
recent_code = Some((std::time::Instant::now(), node.id)); recent_code = Some((std::time::Instant::now(), node.id));
} else if recent_code.is_some_and(|(t, _)| { } else if recent_code.is_some_and(|(t, _)| {
std::time::Instant::now().duration_since(t) std::time::Instant::now().duration_since(t)
@ -224,7 +225,7 @@ async fn autosplit(
} }
// don't autosplit if we're in fullscreen // don't autosplit if we're in fullscreen
if any_parent(tree, node.id, |n| { if any_parent(&tree, node.id, |n| {
(n.node_type == swayipc_async::NodeType::Con (n.node_type == swayipc_async::NodeType::Con
|| n.node_type == swayipc_async::NodeType::FloatingCon) || n.node_type == swayipc_async::NodeType::FloatingCon)
&& n.fullscreen_mode.is_some_and(|m| m != 0) && n.fullscreen_mode.is_some_and(|m| m != 0)