Add scripts

This commit is contained in:
Thraix
2026-07-15 17:24:10 +02:00
parent 8e28f60c91
commit b6e779c324
9 changed files with 245 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/sh
uptime="$(uptime -p | sed -e 's/up //g')"
shutdown='⏻ Shutdown'
reboot=' Reboot'
lock=' Lock'
suspend='󰒲 Suspend'
logout='󰈆 Logout'
hibernate=' Hibernate'
rofi_cmd() {
echo -e "$lock\n$suspend\n$logout\n$hibernate\n$shutdown\n$reboot" |
rofi -dmenu -mesg "Uptime: $uptime" -theme ~/.config/rofi/power.rasi
}
chosen="$(rofi_cmd)"
case ${chosen} in
$shutdown)
systemctl poweroff
;;
$reboot)
systemctl reboot
;;
$lock)
hyprlock
;;
$suspend)
systemctl suspend
;;
$logout)
hyprctl dispatch exit
;;
$hibernate)
systemctl hibernate
;;
esac