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

Output urgent workspace name to notify-send

asked 2014-05-19 22:06:47 +0000

casucci gravatar image

Is there a way to output the urgent workspace name to a notify-send message? I can call a for_window hint to display a message with notify-send such as: for_window [urgent=latest] exec notify-send "your message here". I would like to add the workspace name or window name to the output of notify-send. Thanks.

edit retag flag offensive close merge delete

Comments

I, think that will be difficult: it seem that i3 only exposes that a window has an urgent flag but not which window has the latest urgent flag. So you will probably have to keep track of urgent windows yourself.

Adaephon gravatar imageAdaephon ( 2014-05-20 09:11:42 +0000 )edit

Thank you for your reply.

casucci gravatar imagecasucci ( 2014-05-20 16:08:46 +0000 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2014-05-25 18:02:16 +0000

Michael gravatar image

Sure, but you’ll need to write a custom script to do that. See http://build.i3wm.org/docs/ipc.html

Get the layout tree, search for nodes that have the urgent property set to true and then call your command.

edit flag offensive delete link more

Comments

Thanks Michael. I used get_workspaces and wrote a bash script with the help of jshon to parse the output.

casucci gravatar imagecasucci ( 2014-05-27 06:37:45 +0000 )edit

Question Tools

Stats

Asked: 2014-05-19 22:06:47 +0000

Seen: 275 times

Last updated: May 25 '14