Update formatting.

This commit is contained in:
CronyAkatsuki 2023-11-04 22:03:43 +01:00
parent 41754e8ad1
commit e1c508c53b
16 changed files with 287 additions and 278 deletions

View file

@ -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 $@