exit on sway shutdown
This commit is contained in:
parent
761405e7ce
commit
488f2fb99d
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -653,7 +653,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sway-flash-indicator"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
dependencies = [
|
||||
"directories",
|
||||
"futures-util",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "sway-flash-indicator"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Maintainer: Alex Janka <alex@alexjanka.com>
|
||||
|
||||
pkgname=sway-flash-indicator
|
||||
pkgver=0.3.0
|
||||
pkgver=0.3.1
|
||||
pkgrel=1
|
||||
pkgdesc="flashes sway indicator border rather than always showing it"
|
||||
arch=('x86_64' 'aarch64')
|
||||
|
|
|
@ -39,6 +39,7 @@ async fn main() -> Res<()> {
|
|||
.subscribe([
|
||||
swayipc_async::EventType::Binding,
|
||||
swayipc_async::EventType::Window,
|
||||
swayipc_async::EventType::Shutdown,
|
||||
])
|
||||
.await?;
|
||||
|
||||
|
@ -111,6 +112,9 @@ async fn main() -> Res<()> {
|
|||
}
|
||||
}
|
||||
}
|
||||
swayipc_async::Event::Shutdown(_) => {
|
||||
return Ok(());
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
@ -163,6 +167,7 @@ async fn code_trigger<T: AsRef<str> + std::cmp::PartialEq<str>>(
|
|||
connection
|
||||
.run_command(format!("swap container with con_id {}", other.id))
|
||||
.await?;
|
||||
// tokio::time::sleep(std::time::Duration::from_millis(50)).await;
|
||||
}
|
||||
|
||||
connection
|
||||
|
|
Loading…
Reference in a new issue