mirror of
https://github.com/rywng/dotfiles.git
synced 2024-11-22 10:51:49 +08:00
Update screen locking
This commit is contained in:
parent
e08fe061df
commit
2e9e35e806
@ -3,9 +3,9 @@
|
|||||||
# Modified from sway's locking script
|
# Modified from sway's locking script
|
||||||
|
|
||||||
|
|
||||||
if [[ ! -e /bin/swayidle ]]; then
|
if [[ ! $(which swayidle 2> /dev/null) ]]; then
|
||||||
notify-send "ERROR" "Swayidle not found"
|
notify-send "ERROR" "Swayidle not found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
choice=`echo -e "suspend\nshutdown\npoweroff\nreboot\nlock" | wofi -d --prompt " Choose power option" -Oalphabetical`
|
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' \
|
timeout 10 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' \
|
||||||
&
|
&
|
||||||
idlepid=$!
|
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
|
kill $idlepid
|
||||||
hyprctl dispatch dpms on
|
hyprctl dispatch dpms on
|
||||||
light -S $bright
|
light -S $bright
|
||||||
else
|
elif test -n "$choice"; then
|
||||||
loginctl $choice
|
loginctl $choice
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user