about summary refs log blame commit diff
path: root/i3_exit
blob: f411d4e57c9596b4c34ac3dc745901063a2aa22c (plain) (tree)





























                                                                        
#!/bin/sh
lock() {
    i3lock
}

case "$1" in
    lock)
        xsecurelock
        ;;
    logout)
        i3-msg exit
        ;;
    suspend)
        lock && systemctl suspend
        ;;
    hibernate)
        lock && systemctl hibernate
        ;;
    reboot)
        systemctl reboot
        ;;
    shutdown)
        systemctl poweroff
        ;;
    *)
        echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
        exit 2
esac

exit 0