nixos/config/home/scripts/system/power.sh
2024-11-28 21:40:48 +00:00

18 lines
376 B
Bash

#!/bin/bash
option=$(printf "Sleep\nLogout\nShutdown\nRestart" | rofi -dmenu -theme Arc-Dark -font 'hack 18')
if [ "$option" = "Sleep" ];
then
i3lock-fancy -g -t "System Locked" -f Hack-Regular
systemctl suspend
elif [ "$option" = "Logout" ];
then
i3-msg exit
elif [ "$option" = "Shutdown" ];
then
poweroff
elif [ "$option" = "Restart" ];
then
reboot
fi