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

How to capture i3bar click events raw data?

asked 2014-06-17 12:51:30 +0000

phairland gravatar image

updated 2014-06-17 12:53:04 +0000

Excerpt from http://i3wm.org/docs/i3bar-protocol.html

. . .

2.3. Click events

If enabled i3bar will send you notifications if the user clicks on a block.

Example:

{
 "name": "ethernet",
 "instance": "eth0",
 "button": 1,
 "x": 1320,
 "y": 1400
}

. . .

What command do I need to run on the console to give me the location of the mouse while clicking on the i3bar?

OR

Where the i3bar will send the notifications to?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-06-17 13:53:05 +0000

Ultrabug gravatar image

AFAIK the i3bar will only output the json to the stdin of the program which is responsible of displaying information on it aka status_command (i3status by default or py3status if you use it).

So if you want to catch this data you need to do it from within the given program (AFAIK i3status doesn't support click events).

If you use py3status, you can use the i3barclickevents.py module to catch and handle any click made on your i3bar. Then it's up to you to do whatever you want with the information ;)

See the py3status github wiki page : "Handle i3status and i3bar click events" for more information.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-06-17 12:51:30 +0000

Seen: 869 times

Last updated: Jun 17 '14