diff --git a/.config/hypr/scripts/logout.sh b/.config/hypr/scripts/logout.sh index 394eae1..795b66e 100755 --- a/.config/hypr/scripts/logout.sh +++ b/.config/hypr/scripts/logout.sh @@ -3,9 +3,9 @@ # Modified from sway's locking script -if [[ ! -e /bin/swayidle ]]; then - notify-send "ERROR" "Swayidle not found" - exit 1 +if [[ ! $(which swayidle 2> /dev/null) ]]; then + notify-send "ERROR" "Swayidle not found" + exit 1 fi choice=`echo -e "suspend\nshutdown\npoweroff\nreboot\nlock" | wofi -d --prompt "󰚥 Choose power option" -Oalphabetical` @@ -16,10 +16,12 @@ if test "$choice" = lock ; then timeout 10 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' \ & idlepid=$! - swaylock -e -c 282828 --inside-color 00000003 + # swaylock -e -c 282828 --inside-color 00000003 + swaylock -S --effect-blur "5x5" --effect-vignette 0.5:0.5 --inside-color 00000003 \ + -e --ring-color 00000005 --line-color 00000035 kill $idlepid hyprctl dispatch dpms on light -S $bright -else +elif test -n "$choice"; then loginctl $choice fi