Open YaLTeR opened 10 months ago
Now that it's implemented in smithay, can this be looked at again?
The reason this stalled is because right after that Smithay PR was merged, I implemented the idle protocol in niri, which means you can use tools like swayidle
to do this.
This issue is still open because doing it in niri will allow a nicer fade out animation, but it also needs some config design. Where to put the setting and how to call it? What else do we need, like running a command when the screens power off (swaylock
for instance)?
My naïve thought would be something like this, and you could have as many of these as you want.
idle {
timeout "300" // 300 seconds, could be "5m" instead
run-after { spawn "swaylockniri"; } // optional
}
What about the power off monitors part? :p Idle is a general term to run a command after idle, not necessarily turn off monitors.
And that's why I shouldn't write GitHub comments right before going to bed 😆
Although this could work...
idle {
timeout 300
monitor-off // this could be omitted for a non-monitor-off idle tast
run-after { spawn "swaylockniri"; }
}
I would somewhat prefer a spelling that emphasizes the turning off monitors part, since generic idle functionality can be done with swayidle
Maybe it could be a part of output
?
output "DP-1" {
// Other monitor settings
poweroff-timeout 300 // 300 seconds
}
Nah, they all turn off at the same time.
I would somewhat prefer a spelling that emphasizes the turning off monitors part, since generic idle functionality can be done with swayidle
What about a generic output
setting, where we don't specify any output name?
There we can write some generic output options.
outputs {
inactivity 300 {
turn-off
run-after { spawn "swaylock"; }
}
background-color "#000000"
}
Hmm... Maybe, not sure
Can be solved together with #104 because the Smithay PR linked there implements an idle timer perfect for this case.