fix: subprocesses not killed properly when quickshell stopped

This commit is contained in:
2025-11-16 14:41:46 +01:00
parent 9b279d543b
commit ac4e77bba8
2 changed files with 12 additions and 1 deletions

View File

@@ -317,7 +317,7 @@ binds {
Mod+Space { spawn-sh "qs ipc call panels toggleControlCenter"; } Mod+Space { spawn-sh "qs ipc call panels toggleControlCenter"; }
Mod+Shift+D { spawn-sh "qs ipc call panels toggleCalendar"; } Mod+Shift+D { spawn-sh "qs ipc call panels toggleCalendar"; }
Mod+Shift+L { spawn-sh "qs ipc call lyrics toggleBarLyrics"; } Mod+Shift+L { spawn-sh "qs ipc call lyrics toggleBarLyrics"; }
Mod+Shift+K { spawn-sh "pkill -x quickshell || quickshell"; } Mod+Shift+K { spawn-sh "quickshell-kill || quickshell"; }
Mod+I { spawn-sh "qs ipc call idleInhibitor toggleInhibitor"; } Mod+I { spawn-sh "qs ipc call idleInhibitor toggleInhibitor"; }
Mod+Alt+R { spawn-sh "qs ipc call recording startOrStopRecording"; } Mod+Alt+R { spawn-sh "qs ipc call recording startOrStopRecording"; }

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
pid=$(pgrep -x quickshell)
[ -z "$pid" ] && exit 1
for child in $(pgrep -P "$pid" 2>/dev/null); do
kill "$child"
done
kill "$pid"