dmenu-scripts/dmenu-kill

16 lines
323 B
Plaintext
Raw Normal View History

2022-03-21 18:05:05 +01:00
#!/bin/sh
2022-04-05 16:59:13 +02:00
# kill those pesky proceses
2022-03-21 18:05:05 +01:00
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"