simplified the kill script.
This commit is contained in:
parent
4ad6661c5f
commit
436a2b9505
@ -4,14 +4,14 @@
|
||||
|
||||
source $HOME/.config/dmenu/config
|
||||
|
||||
selected=$(ps --user "$USER" -F | $DMENU -p "Select procces to kill:" -l 5 | awk '{print $2" "$11}')
|
||||
pid=$(ps -u $USER -o pid,%mem,%cpu,comm,cmd | sort -b -k3 -r | dmenu -l 15 -i -p "Choose procces to kill: " | awk '{print $1}')
|
||||
|
||||
[ -n "$selected" ] || exit
|
||||
[ -n "$pid" ] || exit
|
||||
|
||||
answer=$(printf "yes\\nno" | $DMENU -p "Are you sure?")
|
||||
|
||||
[ $answer = "yes" ] || exit
|
||||
|
||||
kill -9 "${selected%% *}"
|
||||
kill -15 $pid 2>/dev/null
|
||||
|
||||
quick-notify "Killed Procces" "$selected"
|
||||
quick-notify "Killed Procces" "$pid"
|
||||
|
Loading…
Reference in New Issue
Block a user