mirror of
https://github.com/rywng/dotfiles.git
synced 2024-11-22 02:41:50 +08:00
Update screen locking
This commit is contained in:
parent
e08fe061df
commit
2e9e35e806
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user