[i3] i3status patch

  • From: Pavel Löbl <lobl.pavel@xxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Sat, 10 Mar 2012 21:33:44 +0100

I know i3status is already efficient, so it's probably not a big
hurt to set the refresh time quite low. But sometimes it
would be nice to reflect changes immediately.

Adding empty signal handler to i3status allows me to interrupt
nanosleep call by sendig USR1 signal and print the output sooner
then next update comes.

172,175d17
< void sig_handler (int sigint) {
< /* do nothing, we just interrupted nanosleep */
< }
<
286,287d281
<
< signal (SIGUSR1, sig_handler);

But this likely requires all the other calls in i3status properly handle
EINTR error. I've not read the whole source but just `grep -r EINTR *`
gives nothing.

So would it be possible to have something like this in i3status or it's
just an ugly hack?

Other related posts:

  • » [i3] i3status patch - Pavel Löbl