Browse Source

Make sure to exit on shutdown/error event

master
Julian Ospald 4 years ago
parent
commit
b9310e0e49
No known key found for this signature in database GPG Key ID: 511B62C09D50CD28
2 changed files with 6 additions and 2 deletions
  1. +4
    -1
      Cargo.toml
  2. +2
    -1
      src/main.rs

+ 4
- 1
Cargo.toml View File

@@ -9,10 +9,13 @@ license-file = "LICENSE"
clap = "2.33.0"
counter = "0.4.3"
error-chain = "0.12.1"
i3ipc = "0.10.1"
lazy_static = "1.4"
log = "0.4"
regex = "1"
signal-hook = "0.1.13"
simple_logger = "1.5.0"
xcb = "0.9.0"

[dependencies.i3ipc]
version = "0.10.1"
features = ["i3-4-14"]

+ 2
- 1
src/main.rs 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),
_ => (),
}
}


Loading…
Cancel
Save