mirror of
https://github.com/reisub0/sway-alttab
synced 2024-05-27 09:36:04 +02:00
Unbind for non-default key combo case as well
Signed-off-by: Jason Nader <jason.nader@protonmail.com>
This commit is contained in:
parent
a398d36667
commit
1449756a7e
|
@ -26,13 +26,17 @@ fn handle_signal(last_focused: &Arc<Mutex<i64>>) -> Res<()> {
|
|||
}
|
||||
|
||||
fn unbind_key() -> Res<()> {
|
||||
let yml = load_yaml!("args.yml");
|
||||
let args = App::from_yaml(yml).version(crate_version!()).get_matches();
|
||||
let key_combo = args.value_of("combo").unwrap_or("Mod1+Tab");
|
||||
|
||||
let pid_file = format!(
|
||||
"{}/sway-alttab.pid",
|
||||
var("XDG_RUNTIME_DIR").unwrap_or("/tmp".to_string())
|
||||
);
|
||||
Connection::new()?.run_command(format!(
|
||||
"unbindsym Mod1+Tab exec pkill -USR1 -F {}",
|
||||
pid_file
|
||||
"unbindsym {} exec pkill -USR1 -F {}",
|
||||
key_combo, pid_file
|
||||
))?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue