Update formatting.
This commit is contained in:
parent
41754e8ad1
commit
e1c508c53b
16 changed files with 287 additions and 278 deletions
20
dmenu-kill
20
dmenu-kill
|
@ -2,24 +2,24 @@
|
|||
|
||||
# kill those pesky proceses
|
||||
|
||||
load_config () {
|
||||
. $HOME/.config/dmenu/config
|
||||
load_config() {
|
||||
. $HOME/.config/dmenu/config
|
||||
}
|
||||
|
||||
main () {
|
||||
load_config
|
||||
main() {
|
||||
load_config
|
||||
|
||||
pid=$(ps -e -o pid,%mem,%cpu,comm,cmd | sort -b -k3 -r | $DMENU -l 15 -i -p "Choose procces to kill: " | awk '{print $1}')
|
||||
pid=$(ps -e -o pid,%mem,%cpu,comm,cmd | sort -b -k3 -r | $DMENU -l 15 -i -p "Choose procces to kill: " | awk '{print $1}')
|
||||
|
||||
[ -n "$pid" ] || exit
|
||||
[ -n "$pid" ] || exit
|
||||
|
||||
answer=$(printf "yes\\nno" | $DMENU -p "Are you sure?")
|
||||
answer=$(printf "yes\\nno" | $DMENU -p "Are you sure?")
|
||||
|
||||
[ $answer = "yes" ] || exit
|
||||
[ $answer = "yes" ] || exit
|
||||
|
||||
kill -15 $pid 2>/dev/null
|
||||
kill -15 $pid 2>/dev/null
|
||||
|
||||
quick-notify "Killed Procces" "$pid"
|
||||
quick-notify "Killed Procces" "$pid"
|
||||
}
|
||||
|
||||
main $@
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue