Add power menu to hyprland
This commit is contained in:
parent
4e7fcaf3a5
commit
c5c233509c
2 changed files with 23 additions and 0 deletions
12
misc/power-menu.sh
Executable file
12
misc/power-menu.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
cmds=('shutdown now' 'reboot' 'hyprlock' 'hyprctl dispatch exit')
|
||||
|
||||
count=${#cmds[@]}
|
||||
default=15
|
||||
|
||||
lines=$((count > default ? default : count))
|
||||
|
||||
a=$(printf ' Shut down\n Reboot\n Lock\n Log out' | fuzzel --dmenu --index --lines $lines --placeholder "Power action: " -I)
|
||||
|
||||
if [ -n "$a" ]; then
|
||||
${cmds[a]}
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue