#!/bin/sh # Get current set wallpaper for the lockscreen option read -r wallpaper<~/.cache/wallpaper #### Options ### power_off=" Shutdown" reboot="󰜉 Reboot" lock_screen=" Lock Screen" suspend=" Suspend" hibernate="󰒲 Hibernate" log_out="󰍃 Log Out" lock="swaylock -f -i "$wallpaper"" # Options passed to fuzzel options="$power_off\n$reboot\n$suspend\n$hibernate\n$log_out\n$lock_screen" lines="$(echo "$options" | wc -l)" fuzzel_command="fuzzel -d -w 14 -l $((lines))" chosen="$(echo -e "$options" | $fuzzel_command )" case $chosen in "$lock_screen") $lock ;; "$power_off") doas halt -p ;; "$reboot") doas reboot ;; # "$suspend") # $lock && zzz # ;; # "$hibernate") # # $lock && WIP # ;; "$log_out") mmsg -d quit ;; esac