From f34384d89ef86cff7a5ab0571dbb2f6b410dba76 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Wed, 15 Apr 2026 11:31:33 +0100 Subject: Changed to work under Wayland using fuzzel --- .local/bin/powermenu.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to '.local/bin/powermenu.sh') diff --git a/.local/bin/powermenu.sh b/.local/bin/powermenu.sh index 44816cf..dba1fd1 100755 --- a/.local/bin/powermenu.sh +++ b/.local/bin/powermenu.sh @@ -1,6 +1,7 @@ #!/bin/sh -# read -r wallpaper<~/.cache/wallpaper +# Get current set wallpaper for the lockscreen option +read -r wallpaper<~/.cache/wallpaper #### Options ### power_off=" Shutdown" @@ -12,14 +13,15 @@ log_out="󰍃 Log Out" lock="swaylock -f -i "$wallpaper"" -# Options passed to rofi -# options="$power_off\n$reboot\n$suspend\n$hibernate\n$log_out\n$lock_screen" -options="$power_off\n$reboot\n$log_out\n$lock_screen" -rofi_command="rofi -theme themes/power-menu.rasi -i " -chosen="$(echo -e "$options" | $rofi_command -dmenu -mesg "Power Menu" )" +# Options passed to fuzzel +options="$power_off\n$reboot\n$suspend\n$hibernate\n$log_out\n$lock_screen" +lines="$(echo "$options" | wc -l)" +rofi_command="fuzzel -d -w 14 -l $((lines+1))" +chosen="$(echo -e "$options" | $rofi_command )" + case $chosen in "$lock_screen") - xlock + $lock ;; "$power_off") doas halt -p @@ -34,6 +36,6 @@ case $chosen in # # $lock && WIP # ;; "$log_out") - bspc quit + mmsg -d quit ;; esac -- cgit v1.2.3