[Hypr] hyprlock, hypridle
This commit is contained in:
@@ -10,41 +10,27 @@
|
||||
$LOCKSCREEN = lockscreen.sh # Calls $LOCKSCREEN set from hyprland
|
||||
|
||||
general {
|
||||
lock_cmd = $LOCKSCREEN
|
||||
unlock_cmd = #notify-send "unlock!" # same as above, but unlock
|
||||
before_sleep_cmd = $LOCKSCREEN # command ran before sleep
|
||||
after_sleep_cmd = # notify-send "Awake!" # command ran after sleep
|
||||
ignore_dbus_inhibit = 0
|
||||
lock_cmd = pidof hyprlock || hyprlock
|
||||
on_unlock_cmd = bash -c 'notify-send "Welcome back!"'
|
||||
before_sleep_cmd = loginctl lock-session
|
||||
after_sleep_cmd = bash -c 'brightnessctl -r; brightnessctl -d tpacpi::kbd_backlight set 1; hyprctl dispatch dpms on'
|
||||
}
|
||||
|
||||
# Dims the display
|
||||
listener {
|
||||
timeout = 120
|
||||
on-timeout = { brightnessctl -s && brightnessctl s 1% ;}
|
||||
on-resume = brightnessctl -r
|
||||
timeout = 210 # 5min
|
||||
on-timeout = loginctl lock-session # lock screen when timeout has passed
|
||||
}
|
||||
|
||||
# Lock it first before dpms off so that screen won't show for a moment after wake up.
|
||||
listener {
|
||||
timeout = 240
|
||||
on-timeout = $LOCKSCREEN
|
||||
timeout = 220 # 3.6 minutes
|
||||
on-timeout = bash -c 'brightnessctl -s set 10; brightnessctl -d tpacpi::kbd_backlight set 0; hyprctl dispatch dpms off'
|
||||
on-resume = bash -c 'brightnessctl -r; brightnessctl -d tpacpi::kbd_backlight set 1; hyprctl dispatch dpms on'
|
||||
}
|
||||
|
||||
# DPMS off
|
||||
|
||||
listener {
|
||||
timeout = 2300
|
||||
on-timeout = hyprctl dispatch dpms off #do not turn off display while media is playing
|
||||
on-resume = hyprctl dispatch dpms on
|
||||
timeout = 230 # 5.5min
|
||||
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
|
||||
on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
|
||||
}
|
||||
|
||||
# Suspend
|
||||
# listener {
|
||||
# timeout = 500
|
||||
# on-timeout = systemctl suspend
|
||||
# }
|
||||
|
||||
# hyprlang noerror true
|
||||
# Source anything from this path if you want to add your own listener
|
||||
# source command actually do not exist yet
|
||||
source = ~/.config/hypridle/*
|
||||
# hyprlang noerror false
|
||||
|
||||
Reference in New Issue
Block a user