Compare commits

..

No commits in common. "main" and "v0.0.3" have entirely different histories.
main ... v0.0.3

2 changed files with 3 additions and 6 deletions
README.md
easyconf_lemonbar

View file

@ -71,9 +71,7 @@ signal to listen for, e.g.
In the example above, the refresh is `0`. This means that the module *will never
refresh on its own*; it will wait for the RTMIN+1 signal. You may also configure
your module to both refresh on a time interval AND listen for a signal. Also
note: multiple modules may listen for the same signal. They will all be
refreshed when the signal is recieved.
your module to both refresh on a time interval AND listen for a signal.
Unfortunately, to send the signal, you cant just `pkill easyconf-lemonbar`. You
have to read the PID from eclb's pidfile. I would recommend creating an alias in

View file

@ -6,9 +6,8 @@ class SignalRouter:
self.signal_thread_dictionary = {}
def __route_signal(self, signal, frame):
for thread_ident in self.signal_thread_dictionary[signal]:
pthread_kill(thread_ident, signal)
pthread_kill(self.signal_thread_dictionary[signal], signal)
def register_signal_thread(self, signal, thread_ident):
self.signal_thread_dictionary.setdefault(signal, []).append(thread_ident)
self.signal_thread_dictionary[signal] = thread_ident
sigsignal(signal, self.__route_signal)