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

Is it possible to subscribe to 'window' event ?

asked 2013-03-08 04:35:48 +0000

syl20bnr gravatar image

I would want to prepend an incremental number (up to 9) in windows title inside a same workspace in order to be able to quickly switch to a them with that number.

One possibility to achieve this would be to use a combination of IPC for setting the windows title and i3 configuration for the shortcuts. But I can't find how to subscribe to window events and get something like 'new window' and 'closed window'.

As I'm starting to understand Michael philosophy I'm sure it is intended and there must be another 'more standard' way to do it.

Anyone could point me in the right direction ?

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2013-03-08 18:11:06 +0000

Michael gravatar image

There is a window event (in the git version): http://build.i3wm.org/docs/ipc.html#windowevent

You won’t get the window event when closing a window, but patches for that will be accepted.

Please keep us updated about your script, I think it’s an interesting one.

edit flag offensive delete link more

Comments

I played a bit with it, the event on window works great for the property change = new.In order to be able to prepend numbers to windows with IPC I need some other properties: window -> change = title window -> change = delete I also need a new command for window like the rename workspace command.

syl20bnr gravatar imagesyl20bnr ( 2013-03-09 14:39:20 +0000 )edit

Question Tools

Stats

Asked: 2013-03-08 04:35:48 +0000

Seen: 170 times

Last updated: Mar 09 '13