The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

Switch to Urgent Workspace

asked 2014-12-12 06:18:14 +0000

phairland gravatar image

Is it possible that whenever an urgent flag appears from an application, meaning the workspace where the application is from becomes red or flagged, i3 will automatically switch to that workspace/application?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2014-12-12 06:57:33 +0000

Michael Rose gravatar image

This is actually a horrible idea as getting an email or message on irc will for example take you out of your game. Instead you can set up a key binding to take you to the urgent workspace.

edit flag offensive delete link more

answered 2015-01-22 15:40:46 +0000

Adaephon gravatar image

Yes, it is (somewhat) possible, but as Michael Rose wrote probably not a good idea.

If you add

for_window [urgent="latest"] focus

to your ~/.i3/config, then i3 will automatically focus a window once it becomes urgent.

You could also combine criteria if you only want to focus certain applications:

for_window [urgent="latest" class="XTerm"] focus

Note: There seem to be some cases where these - both single and multiple criteria - do not work reliably, but I am unsure what may be the cause. It may be a problem specific to my setup as for me [urgent="latest"] focus sometimes focuses windows, that are not even urgent anymore (although they once were).

edit flag offensive delete link more

answered 2015-01-22 13:16:30 +0000

Bouncing around work-spaces, etc. in an unmanaged fashion is certainly not the way to go, but the idea does have its merits. If user defined precedence levels were an option then, like interrupts there would be a manageable environment. In addition to the precedence management, also user configurable, application processes could be paused until focus is returned.

Case: Jim wants to play some Doom, but is waiting on a critical eMail notification about a friend's health. Jim sets the game's process management to pause when it loses focus and assigns a process priority of 1 above the general default of 0. Jim intuitively sets his eMail manager at a process priority of 2 so that it takes focus from any system below it. Now, when Jim gets an eMail the mail manager takes focus due to its priority the game process(es) pause as it loses focus; Jim reads his eMail then closes the eMail manager and returns to the game. Because the game now has focus again it resumes normally.

One consideration when returning to a paused process(es) is delay the execution of the thread a bit in order to let the user get settled in. The delay could use a user defined counter set to their tastes and enjoy a win win scenario.

The aforementioned services are quality, professional grade considerations and would serve well to round off i3 nicely.

Thanks for the inspiration and hope my suggestions inspire you all here at the i3 group & user group as much.

edit flag offensive delete link more

Question Tools


Asked: 2014-12-12 06:18:14 +0000

Seen: 520 times

Last updated: Jan 22