I hate this

This commit is contained in:
Michał Gdula 2023-04-19 11:04:08 +01:00
parent a9846b4ecd
commit 8c7569868d
416 changed files with 1549 additions and 208 deletions

24
configs/eww/scripts/powermenu Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env bash
rofi_command="rofi -theme ~/.config/rofi/power.rasi -hover-select"
uptime=$(uptime -p | sed -e 's/up //g')
# Options
shutdown="Shutdown"
reboot="Restart"
lock="Lock"
options="$reboot\n$shutdown\n$lock"
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)"
case $chosen in
$shutdown)
systemctl poweroff
;;
$reboot)
systemctl reboot
;;
$lock)
dm-tool lock
;;
esac