From 7892d89487e410a450de198a7bbdfa535321fdc6 Mon Sep 17 00:00:00 2001 From: koekeishiya Date: Sun, 27 May 2018 21:57:28 +0200 Subject: fix annoying issue; setsid --- examples/skhdrc | 8 ++++---- src/hotkey.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/skhdrc b/examples/skhdrc index 81b2c8c..c531b6f 100644 --- a/examples/skhdrc +++ b/examples/skhdrc @@ -70,7 +70,7 @@ # default, test < cmd - return : open -na /Applications/Terminal.app # open terminal, blazingly fast compared to iTerm/Hyper -cmd - return : open -na /Applications/Kitty.app +cmd - return : /Applications/Kitty.app/Contents/MacOS/kitty --single-instance # open qutebrowser cmd + shift - return : ~/Scripts/qtb.sh @@ -121,7 +121,7 @@ cmd + alt - 3 : chunkc tiling::desktop --focus 3 cmd + alt - 4 : chunkc tiling::desktop --focus 4 cmd + alt - 5 : chunkc tiling::desktop --focus 5 cmd + alt - 6 : chunkc tiling::desktop --focus 6 -cmd + alt - 7 : chunkc tiling::desktop --focus 7 +# cmd + alt - 7 : chunkc tiling::desktop --focus 7 # send window to desktop shift + alt - x : chunkc tiling::window --send-to-desktop $(chunkc get _last_active_desktop) @@ -133,7 +133,7 @@ shift + alt - 3 : chunkc tiling::window --send-to-desktop 3 shift + alt - 4 : chunkc tiling::window --send-to-desktop 4 shift + alt - 5 : chunkc tiling::window --send-to-desktop 5 shift + alt - 6 : chunkc tiling::window --send-to-desktop 6 -shift + alt - 7 : chunkc tiling::window --send-to-desktop 7 +# shift + alt - 7 : chunkc tiling::window --send-to-desktop 7 # send window to desktop and follow focus shift + cmd - x : chunkc tiling::window --send-to-desktop $(chunkc get _last_active_desktop); chunkc tiling::desktop --focus $(chunkc get _last_active_desktop) @@ -145,7 +145,7 @@ shift + cmd - 3 : chunkc tiling::window --send-to-desktop 3; chunkc tiling::desk shift + cmd - 4 : chunkc tiling::window --send-to-desktop 4; chunkc tiling::desktop --focus 4 shift + cmd - 5 : chunkc tiling::window --send-to-desktop 5; chunkc tiling::desktop --focus 5 shift + cmd - 6 : chunkc tiling::window --send-to-desktop 6; chunkc tiling::desktop --focus 6 -shift + cmd - 7 : chunkc tiling::window --send-to-desktop 7; chunkc tiling::desktop --focus 7 +# shift + cmd - 7 : chunkc tiling::window --send-to-desktop 7; chunkc tiling::desktop --focus 7 # focus monitor ctrl + alt - z : chunkc tiling::monitor -f prev diff --git a/src/hotkey.c b/src/hotkey.c index a37e27c..0677ae9 100644 --- a/src/hotkey.c +++ b/src/hotkey.c @@ -102,6 +102,7 @@ fork_and_exec(char *command) int cpid = fork(); if (cpid == 0) { + setsid(); char *exec[] = { shell, arg, command, NULL}; int status_code = execvp(exec[0], exec); exit(status_code); -- cgit v1.2.3