mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
15 lines
289 B
Bash
Executable File
15 lines
289 B
Bash
Executable File
#!/bin/sh
|
|
# Lock the session, then power off outputs only if the lock is still active.
|
|
|
|
set -eu
|
|
|
|
lock_delay="${HYPRLOCK_DPMS_DELAY:-30}"
|
|
|
|
loginctl lock-session
|
|
|
|
(
|
|
sleep "$lock_delay"
|
|
pidof hyprlock >/dev/null 2>&1 || exit 0
|
|
hyprctl dispatch dpms off
|
|
) >/tmp/hyprlock-dpms.log 2>&1 &
|