summaryrefslogtreecommitdiff
path: root/.config/scripts/power.sh
blob: 6c5ad4e9e12f6e34e83f5078445adce67330090f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

options="lock\nlogout\nshutdown\nreboot"
choice=$(echo -e "$options" | rofi -dmenu -p "power" -i)

case "$choice" in
    lock)
        hyprlock
        ;;
    logout)
        command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit
        ;;
    shutdown)
        shutdown now
        ;;
    reboot)
        reboot
        ;;
esac