#! /bin/bash 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 -v xbindkeys -n \ 2> >( while read -r line do notify-send -u low 'xbindkeys' "$line" done )