Locking
This commit is contained in:
+19
-19
@@ -1,28 +1,28 @@
|
|||||||
general {
|
general {
|
||||||
lock_cmd = station-lock-screen # lock screen
|
lock_cmd = pidof hyprlock || hyprlock --grace 10 # lock screen
|
||||||
before_sleep_cmd = loginctl lock-session # lock before suspend.
|
# before_sleep_cmd = loginctl lock-session # lock before suspend.
|
||||||
after_sleep_cmd = sleep 1 && hyprctl dispatch dpms on # delay for PAM readiness, then turn on display.
|
# after_sleep_cmd = sleep 1 && hyprctl dispatch dpms on # delay for PAM readiness, then turn on display.
|
||||||
inhibit_sleep = 3 # wait until screen is locked
|
inhibit_sleep = 3 # wait until screen is locked
|
||||||
}
|
}
|
||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 300 # 5min
|
timeout = 600 # 10 minutes
|
||||||
on-timeout = pidof hyprlock || station-launch-screensaver # start screensaver (if we haven't locked already)
|
on-timeout = notify-send "You are idle and will be locked soon!" # command to run when timeout has passed.
|
||||||
|
on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
|
||||||
|
}
|
||||||
|
|
||||||
|
# listener {
|
||||||
|
# timeout = 20 # 6 minutes
|
||||||
|
# on-timeout = loginctl lock-session # lock screen when timeout has passed
|
||||||
|
# }
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 630 # 10.5min
|
||||||
|
on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "disable" })' # screen off when timeout has passed
|
||||||
|
on-resume = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })' && brightnessctl -r # screen on when activity is detected after timeout has fired.
|
||||||
}
|
}
|
||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 301 # 5min
|
timeout = 1800 # 30min
|
||||||
on-timeout = loginctl lock-session # lock screen when timeout has passed
|
on-timeout = systemctl suspend # suspend pc
|
||||||
}
|
|
||||||
|
|
||||||
listener {
|
|
||||||
timeout = 330 # 5.5min
|
|
||||||
on-timeout = brightnessctl -sd '*::kbd_backlight' set 0 # save state and turn off keyboard backlight
|
|
||||||
on-resume = brightnessctl -rd '*::kbd_backlight' # restore keyboard backlight
|
|
||||||
}
|
|
||||||
|
|
||||||
listener {
|
|
||||||
timeout = 330 # 5.5min
|
|
||||||
on-timeout = station-system-suspend # suspend when timeout has passed
|
|
||||||
on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Locks the system using hyprlock, but not before ensuring the screensaver stopped.
|
|
||||||
|
|
||||||
# Lock the screen
|
|
||||||
pidof hyprlock || hyprlock &
|
|
||||||
|
|
||||||
# Set keyboard layout to default (first layout)
|
|
||||||
hyprctl switchxkblayout all 0 > /dev/null 2>&1
|
|
||||||
|
|
||||||
# Avoid running screensaver when locked
|
|
||||||
pkill -f org.station.screensaver
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
STATE_FILE=~/.local/state/station/toggles/screensaver-off
|
|
||||||
|
|
||||||
if [[ -f $STATE_FILE ]]; then
|
|
||||||
rm -f $STATE_FILE
|
|
||||||
notify-send " Screensaver enabled"
|
|
||||||
else
|
|
||||||
mkdir -p "$(dirname $STATE_FILE)"
|
|
||||||
touch $STATE_FILE
|
|
||||||
notify-send " Screensaver disabled"
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user