Oooh I'm hypnotized
This commit is contained in:
parent
fab483191f
commit
a6b87ee942
10 changed files with 98 additions and 70 deletions
29
.local/bin/sysutils
Executable file
29
.local/bin/sysutils
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $(printf "%s\n" " Lock session" " Log out" " Kill process" " Suspend" " Reboot" " Shut down" | fuzzel -d -l 7) in
|
||||
" Lock session")
|
||||
swaylock
|
||||
;;
|
||||
" Log out")
|
||||
if pidof dwl > /dev/null; then
|
||||
kill "$(pidof dwl)"
|
||||
elif pidof river > /dev/null; then
|
||||
kill "$(pidof river)"
|
||||
fi
|
||||
;;
|
||||
" Kill process")
|
||||
ps -o pid,comm,user | \
|
||||
awk -v u="$USER" '$3 == u { print $1, $2 }' | \
|
||||
fuzzel -d -l 10 -p "Kill: " | awk '{ print $1 }' | \
|
||||
xargs -r kill
|
||||
;;
|
||||
" Suspend")
|
||||
loginctl suspend
|
||||
;;
|
||||
" Reboot")
|
||||
loginctl reboot
|
||||
;;
|
||||
" Shut down")
|
||||
loginctl poweroff
|
||||
esac
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue