-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for hot-reloading config #33
Comments
Hello, Thank you for the suggestion. It is a nice feature indeed but I think it may be a bit overkill (the second method based on listeners using inotify/libfluffy) for xob: it makes sense for software which is cumbersome to restart, where it implies losing some work, etc. or when you change the configuration a lot. The work and changes required to implement this do not seem worth it and I doubt most users actually care about such a feature. I may be completely wrong however and I am leaving this open just in case. The Along with #32, I am keeping this issue as a reminder to make clearer in future versions of the documentation how to tweak your configuration using another instance of xob in a terminal that you start and stop between each change in the config. |
This is what I had in mind when suggesting this feature. At first, I thought signal method was sufficient because I always thought these kind of programs are usually used by users who're willing to get their hands dirty. But, as you already know, that isn't the case. The problem with signal method is that you'll have to first find the pid of the xob instance and then use |
Maybe we don't need all these? I just read man page and found this sentence interesting:
Maybe we can use this for sending "commands" to running xob? E.g.
This could also be (ab)used for things like changing style of an already running xob:
|
I thought about that at some point when designing the configuration module (to the point of using that instead of the current alternate state feature). In the end I think the standard input should remain only for the actual input value and not also meta instructions. The named-pipe method is a fallback method. The ideal way to use xob is launching I don't think there are actual use cases where you need to change the style of the bar while running. Either you want to display some alternate state and you use the builtin alternate state feature with Using Therefore I think the best compromise is the |
I was thinking of another use case of hot-reloading: change in output layout on multihead setups. |
You're right. I forgot about
Are startup scripts run as current user or
👍 |
They are (and should be) run as current user. |
Perhaps through
USR1
signal? Or, by watching file using inotify? Latter could be enabled using a cli flag. For inotify, libfluffy[1] seems good enough?[1] https://github.com/tinkershack/fluffy
The text was updated successfully, but these errors were encountered: