hyprwm / hypridle

Hyprland's idle daemon
BSD 3-Clause "New" or "Revised" License
320 stars 16 forks source link

automatic reload #70

Closed Atemu closed 3 weeks ago

Atemu commented 3 weeks ago

Currently, in order for a change in the hypridle config to apply, one must kill the daemon and re-run it.

It'd be great if hypridle would automatically reload the config when it changes; just like Hyprland.

vaxerski commented 3 weeks ago

no point, restarting it is trivial

Atemu commented 3 weeks ago

Not quite, one must resort to hacks like nohup which is annoying to deal with as it litters every directory with .nohup files unless you do the nohup ... > /dev/null dance.

Or is there some other method I'm missing?

vaxerski commented 3 weeks ago

killall hypridle && hypridle&disown

Atemu commented 3 weeks ago

That's a good bit better.

Though I'd still like auto reload for the convenience alone.

vaxerski commented 3 weeks ago

write a script to get the last modified date every second and execute above if it changes?

Atemu commented 3 weeks ago

Sure you could do that but at that point you might aswell use a service manager...

vaxerski commented 3 weeks ago

you know that's precisely how it works in hyprland though? xD

Atemu commented 3 weeks ago

Sorry, I'm not following; how what works in Hyprland?

vaxerski commented 3 weeks ago

auto-reload. It stats the files every second and reloads if modified date changed

Atemu commented 3 weeks ago

Ah, yes of course that's how it'd have to work. Though in this case, it'd be integrated into the daemon itself and merely "reloads" rather than tearing everything down and bringing it up again. In the case of Hyprland, tearing it down is simply not possible without user interruption, so that's the only solution while here we can simply restart the daemon without any loss to the user.