From: Siraaj Khandkar Date: Thu, 29 Sep 2022 10:39:24 +0000 (-0400) Subject: Clean up any previous xbindkeys instances X-Git-Url: https://git.xandkar.net/?p=khome.git;a=commitdiff_plain;h=d78db511f9c2430c160daca5fd71c8edb68061b6 Clean up any previous xbindkeys instances --- diff --git a/home/.xlaunch.d/xbindkeys b/home/.xlaunch.d/xbindkeys index 73cb8e9..2a3569d 100755 --- a/home/.xlaunch.d/xbindkeys +++ b/home/.xlaunch.d/xbindkeys @@ -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