Clean up any previous xbindkeys instances
authorSiraaj Khandkar <siraaj@khandkar.net>
Thu, 29 Sep 2022 10:39:24 +0000 (06:39 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Thu, 29 Sep 2022 10:39:24 +0000 (06:39 -0400)
home/.xlaunch.d/xbindkeys

index 73cb8e9..2a3569d 100755 (executable)
@@ -2,4 +2,8 @@
 
 set -e
 
+# XXX Since this script is also named xbindkeys, we avoid suicide by:
+#     1. not using killall;
+#     2. using "command" (or "cmd") instead of "comm".
+ps -eo pid,command | awk '$2 ~ "^xbindkeys" {print $1}' | xargs -I% kill %
 xbindkeys -n
This page took 0.019246 seconds and 4 git commands to generate.