dmenu-scripts/dmenu-kill
2022-07-17 11:03:13 +02:00

18 lines
360 B
Bash
Executable File

#!/bin/sh
# kill those pesky proceses
source $HOME/.config/dmenu/config
selected=$(ps --user "$USER" -F | $DMENU -p "Select procces to kill:" -l 5 | awk '{print $2" "$11}')
[ -n "$selected" ] || exit
answer=$(printf "yes\\nno" | $DMENU -p "Are you sure?")
[ $answer = "yes" ] || exit
kill -9 "${selected%% *}"
quick-notify "Killed Procces" "$selected"