summaryrefslogtreecommitdiff
path: root/.local/bin/dmenu/dm-power
blob: 2202bc4f10cd44b7e030ea2726c31db171713ef3 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

DMENU_CMD="dmenu -p 'sys:' -l 8 -b -i -fn 'JetBrainsMono Nerd Font:size=11'"

case "$(printf "Shutdown\nRestart\nLogout\nSuspend\nLock" | eval "$DMENU_CMD")" in         
    Shutdown) exec systemctl poweroff;;         
    Restart) exec systemctl reboot;;         
    Logout) kill -HUP "$XDG_SESSION_PID";;         
    Suspend) exec systemctl suspend;;         
    Lock) exec systemctl --user start lock.target;; 
esac