- Added ability to kill xkeysnail duplicate processes

This commit is contained in:
Ben Reaves
2020-08-04 17:05:48 -05:00
parent 91b58f0100
commit d180b94bd9
3 changed files with 21 additions and 1 deletions

19
xkeysnail-config/killdups.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
xkeycount=$(pgrep 'xkeysnail' | wc -l)
if [[ $xkeycount -lt 1 ]]; then
# No dups found
exit 0
fi
while ! zenity --entry --title="Kinto Duplicates" --text="Type Password to end duplicates:" --hide-text| sudo -S cat /dev/null >/dev/null; do
if ! $(zenity --question --text="Wrong password, try again?"); then
# Dups still exist
exit 1
fi
done
pgrep 'xkeysnail' | head -n -1 | xargs -r -n1 sudo kill
sudo -K # remove privilege
# No dups should exist
exit 0