exit on rx of SocketNotFound err
This commit is contained in:
parent
3e1c4df585
commit
5f69b9e105
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -789,7 +789,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sway-flash-indicator"
|
name = "sway-flash-indicator"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"directories",
|
"directories",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sway-flash-indicator"
|
name = "sway-flash-indicator"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
@ -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.4.1
|
pkgver=0.4.2
|
||||||
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')
|
||||||
|
|
|
@ -45,6 +45,10 @@ async fn main() -> Res<()> {
|
||||||
let mut recent_code = None;
|
let mut recent_code = None;
|
||||||
|
|
||||||
while let Some(event) = events.next().await {
|
while let Some(event) = events.next().await {
|
||||||
|
if let Err(swayipc_async::Error::SocketNotFound) = event {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if let Ok(event) = event {
|
if let Ok(event) = event {
|
||||||
match event {
|
match event {
|
||||||
swayipc_async::Event::Binding(swayipc_async::BindingEvent { binding, .. }) => {
|
swayipc_async::Event::Binding(swayipc_async::BindingEvent { binding, .. }) => {
|
||||||
|
|
Loading…
Reference in a new issue