Compare commits
No commits in common. "1822f7cd8360f2084f61a964a2b57539ca738cd2" and "bec07d6feafbcaffd9acb0bee34bbffb9cbda241" have entirely different histories.
1822f7cd83
...
bec07d6fea
@ -2,14 +2,31 @@
|
|||||||
#
|
#
|
||||||
# Idle and lock configuration
|
# Idle and lock configuration
|
||||||
#
|
#
|
||||||
|
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||||
|
# your displays after another 60 seconds, and turn your screens back on when
|
||||||
|
# resumed. It will also lock your screen before your computer goes to sleep.
|
||||||
|
# The timeouts can be customized via `$lock_timeout` and `$screen_timeout`
|
||||||
|
# variables. For a predictable behavior, keep the `$screen_timeout` value
|
||||||
|
# lesser than the `$lock_timeout`.
|
||||||
|
#
|
||||||
|
# You can also lock the screen manually by running `loginctl lock-session` or
|
||||||
|
# add a binding for the command. Example:
|
||||||
|
# bindsym $mod+Shift+Escape exec loginctl lock-session
|
||||||
|
#
|
||||||
|
# Note that all swaylock customizations are handled via /etc/swaylock/config and
|
||||||
|
# can be overridden via $XDG_CONFIG_HOME/swaylock/config (~/.config/swaylock/config).
|
||||||
|
#
|
||||||
|
# Requires: swayidle
|
||||||
|
# Requires: swaylock
|
||||||
|
# Requires: /usr/bin/pkill, /usr/bin/pgrep
|
||||||
|
|
||||||
exec LT="900" && \
|
exec LT="$lock_timeout" ST="$screen_timeout" LT=${LT:-900} ST=${ST:-900} && \
|
||||||
swayidle -w \
|
swayidle -w \
|
||||||
timeout $LT \
|
timeout $LT 'swaylock -f' \
|
||||||
'swaylock -f' \
|
timeout $((LT + ST)) 'swaymsg "output * power off"' \
|
||||||
before-sleep \
|
resume 'swaymsg "output * power on"' \
|
||||||
'swaylock -f' \
|
timeout $ST 'pgrep -xu "$USER" swaylock >/dev/null && swaymsg "output * power off"' \
|
||||||
lock \
|
resume 'pgrep -xu "$USER" swaylock >/dev/null && swaymsg "output * power on"' \
|
||||||
'swaylock -f' \
|
before-sleep 'swaylock -f' \
|
||||||
unlock \
|
lock 'swaylock -f' \
|
||||||
'pkill -xu "$USER" -SIGUSR1 swaylock'
|
unlock 'pkill -xu "$USER" -SIGUSR1 swaylock'
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
scaling=fill
|
scaling=fill
|
||||||
color=000000
|
image=$HOME/Pictures/Wallpapers/.current
|
||||||
|
Loading…
Reference in New Issue
Block a user