Closed MartinPit closed 9 months ago
SIGUSR1
is already used to interrupt the key polling (? something like that).
SIGUSR1
is already used to interrupt the key polling (? something like that).
I don't think it is, because the line is currently commented out, no?
That is not commented out, this is just a comment what the signal is used for.
We have a couple of places in the code which will send SIGUSR1
to the process. This will now always reload the config.
Oh, my bad then. Would it be fine if instead it would be switched to SIGUSR2?
I guess so. Have you thought about making this a key bind instead?
I feel like a signal would be better, as I and also the author of #683 would like to use it as a part of an automated script when switching desktop themes. But, there is also an option of making both signal handler and a key bind.
Edited with suggested changes.
Thanks for contributing!
Btop is now able to respond to
SIGUSR2
signal and apply any changes made to config file, which were made while it has been running. Also added a key bind to do so manually.This changes addresses my needs but also resolves #683.
SIGUSR2
signal the config is reloaded from diskctrl+r
in app also does the samectrl+r
entry