summaryrefslogtreecommitdiff
path: root/.local/bin/dmenu/dm-power
blob: fb856bb7fe1a53e0c41cb5d28898070746c75031 (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) exec loginctl terminate-session ${XDG_SESSION_ID-};;
    Suspend) exec systemctl suspend;;         
    Lock) exec systemctl --user start lock.target;; 
esac