AdaShoelace / hadlock

X window manager
MIT License
156 stars 9 forks source link

Hot reload/automatically reload config #42

Open AdaShoelace opened 4 years ago

AdaShoelace commented 4 years ago

Hadlock should be able reload the config if the config file is modified. This means that every change change in the config file should be applied without restart of Hadlock or require to close any other application.

Suggested method: What the config file provided upon start using inotify and reconfigure Hadlock (during runtime) if an event indicating change to the config file is received.

wezm commented 4 years ago

Alacritty does this. You might able to take some inspiration from that, or even reuse the code.

https://github.com/alacritty/alacritty/blob/13eb50de799c4c6f7ebed1a7fa1ab25b378580bb/alacritty/src/config/monitor.rs

AdaShoelace commented 4 years ago

I planned to start working on this tonight so I am definitely gonna look into this!