blob: 6f154efb822a7abb7fbeb6215c1db155aa6d8669 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#+title: Power Options Script
Use =fuzzel= to open a menu to power off, reboot, or log out.
#+begin_src sh :tangle ~/.local/bin/poweroptions.sh :mkdirp yes :tangle-mode o755
#!/bin/sh
getoption () {
fuzzel --dmenu -l 3 -x 1 -r 10 << EOF
power off
restart
logout
EOF
}
option=$(getoption | xargs)
case $option in
' power off')
systemctl poweroff;;
' restart')
systemctl reboot;;
' logout')
hyprctl dispatch exit;;
esac
#+end_src
|