Add scripts
This commit is contained in:
Executable
+37
@@ -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
|
||||
Reference in New Issue
Block a user