Make sure to exit on shutdown/error event

This commit is contained in:
Julian Ospald 2020-04-05 16:59:26 +02:00
parent 054013e11c
commit b9310e0e49
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
2 changed files with 6 additions and 2 deletions

View File

@ -9,10 +9,13 @@ license-file = "LICENSE"
clap = "2.33.0" clap = "2.33.0"
counter = "0.4.3" counter = "0.4.3"
error-chain = "0.12.1" error-chain = "0.12.1"
i3ipc = "0.10.1"
lazy_static = "1.4" lazy_static = "1.4"
log = "0.4" log = "0.4"
regex = "1" regex = "1"
signal-hook = "0.1.13" signal-hook = "0.1.13"
simple_logger = "1.5.0" simple_logger = "1.5.0"
xcb = "0.9.0" xcb = "0.9.0"
[dependencies.i3ipc]
version = "0.10.1"
features = ["i3-4-14"]

View File

@ -226,7 +226,8 @@ fn main() -> Result<()> {
}, },
_ => (), _ => (),
}, },
Err(err) => warn!("Error: {}", err), Ok(i3ipc::event::Event::ShutdownEvent(_info)) => std::process::exit(0),
Err(_err) => std::process::exit(0),
_ => (), _ => (),
} }
} }