mirror of
https://github.com/Fluffy-Bean/dots.git
synced 2025-05-30 23:33:10 +00:00
I hate this
This commit is contained in:
parent
a9846b4ecd
commit
8c7569868d
416 changed files with 1549 additions and 208 deletions
24
configs/eww/scripts/powermenu
Executable file
24
configs/eww/scripts/powermenu
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue