How to correctly implement the i3bar protocol?

asked 2014-07-09 20:21:13 +0000

tigrezno gravatar image

updated 2014-07-09 20:21:47 +0000

I've done a ruby script that works, but sometimes it hits a delay (the same as my sleep line) and only then, the status is drawn. If the sleep is set to 10 seconds, sometimes the bar will wait 10 seconds before the text is drawn.

I've tried using the verbose mode but no errors are showed.

I know it's not a ruby thing, since it happens too with the provided script at:

http://code.stapelberg.de/git/i3/tree/contrib/trivial-bar-script.sh?h=next

Change the delay from 1 to 10 seconds, and it will hit the delay randomly after a restart. Just keep restarting i3 and it will happen.

Because of this, programs like dropbox won't launch, because the tray is not active when it's launched (it's somehow sleeping).

I've also seen that I can skip that delay by changing workspaces, as events are generated the bar is forced to be drawn. May be I should try generating an event but I don't know how.

Any help would be great.

edit retag flag offensive close merge delete

Comments

Here is my script: http://pastebin.com/NUG7xR8K

tigrezno gravatar imagetigrezno ( 2014-07-09 20:26:27 +0000 )edit

Sounds like an i3bar bug then. Can you file a ticket at http://bugs.i3wm.org and include the output of `strace -f -o /tmp/strace.log -tt -s 2048 i3bar --bar_id=bar-0` (only include logfiles where you could reproduce the problem, keep the logfiles as short as possible)?

Michael gravatar imageMichael ( 2014-07-09 21:05:04 +0000 )edit