1
1
Fork 0

hypridle: fix red background when locking

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-12-26 00:29:16 -05:00
parent 4ba4d8cfab
commit 4ead66e6b1
Signed by: Myned
GPG key ID: C7224454F7881A34

View file

@ -24,10 +24,20 @@ in {
services.hypridle = {
enable = true;
settings = {
general = {
before_sleep_cmd = "${pgrep} hyprlock || ${hyprlock} --immediate";
lock_cmd = "${pgrep} hyprlock || ${hyprlock}";
settings = let
# Workaround for red background immediately showing while lockscreen starts
# https://github.com/YaLTeR/niri/issues/808
do-screen-transition = "${niri} msg action do-screen-transition --delay-ms 1000 &&";
in {
general = let
lock = "${pgrep} hyprlock || ${
if config.custom.desktops.desktop == "niri"
then do-screen-transition
else ""
} ${hyprlock}";
in {
before_sleep_cmd = "${lock} --immediate";
lock_cmd = lock;
};
listener = [