The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
2

click events

asked 2013-08-08 09:34:09 +0000

BroX gravatar image

The information regarding 'click events' is rather sparse. See bottom of http://i3wm.org/docs/i3bar-protocol.html

How can one make use of this new (i3-4.6) feature? Does it mean that one can generate events when clicked on a certain part of the status bar?

edit retag flag offensive close merge delete

Comments

I was willing to ask the same question. How to react on those clicks ? for instance I would like to open wicd when clicking the network i3status part.

teto gravatar imageteto ( 2013-08-19 11:57:22 +0000 )edit
Ultrabug gravatar imageUltrabug ( 2014-01-15 16:50:24 +0000 )edit

@Ultrabug Seen your py3status page, it only specifies mouse click on each module. Is there a way to handle a click event on any part of the i3bar, for example I got some empty space on my i3bar and I want to click on that and execute dmenu.

phairland gravatar imagephairland ( 2014-06-17 12:31:11 +0000 )edit

@phairland : AFAIK i3bar does not send any event message when you click on a blank part of your bar so the answer is no I'm afraid. If it did tho, it would be possible to implement it with the i3bar_click_events module ( https://github.com/ultrabug/py3status/wiki/handle-i3status-and-i3bar-click-events )

Ultrabug gravatar imageUltrabug ( 2014-06-17 12:36:23 +0000 )edit

@Ultrabug Thank you for your answer. I just post a question, unsure if you answered it already...

phairland gravatar imagephairland ( 2014-06-17 12:55:11 +0000 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-08-10 06:47:03 +0000

Michael gravatar image

See the code if in doubt: http://code.stapelberg.de/git/i3/comm...

And/or contact the author (see above link).

Once you figure it out, the right thing to do is send a patch that improves the documentation.

edit flag offensive delete link more
0

answered 2013-09-02 17:43:07 +0000

Ultrabug gravatar image

i3bar sends those events (as JSON messages) to the stdin of the command specified in 'status_command' in your config which is responsible for displaying the content of your bar (usually i3status).

If the program above listens for them and can handle them, you can take advantage of those click events (which AFAIK i3status doesnt).

(disclamer : the part below is biased due to the fact that I'm the developer of py3status)

You can have a wrapper such as py3status take care of your i3status and bar seamlessly and benefit from click events easily. The provided modules examples can help you understand how, then everything is possible ! :)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-08-08 09:34:09 +0000

Seen: 1,108 times

Last updated: Sep 02 '13