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

Automaticly switch to workspace when app active

asked 2015-07-02 21:12:27 +0000

Stephan Meijer gravatar image

I want to switch to an active workspace automaticly if this workspace is active (if the square dot on the left-side of the bottom-bar is red). Is there any way to do that?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-07-02 21:22:12 +0000

Stephan Meijer gravatar image

updated 2015-07-02 21:35:28 +0000

I found the answer in another question on the FAQ of i3wm.

This seems not to be possible in the current branch.

edit flag offensive delete link more


If the workspace button turns red it means the urgent flag was set. You can use "for_window [urgent=latest] focus" in your config to automatically switch to it.

Airblader gravatar imageAirblader ( 2015-07-02 21:27:48 +0000 )edit

Thanks! This works perfectly! What's the difference between this and `focus_on_window_activation`?

Stephan Meijer gravatar imageStephan Meijer ( 2015-07-02 21:35:07 +0000 )edit

That directive configured how i3 should react to a certain event. The default is to set the urgent flag if it's on another workspace and of course you can react to that. The directive would allow you to handle the initial event differently.

Airblader gravatar imageAirblader ( 2015-07-02 21:42:16 +0000 )edit

Your fix is not always working; Sometimes I want to edit a specific file with Sublime Text. I will then open Sublime, and run `subl3 <filename>` to edit a specific file. My workspacebutton turns red, but i3wm doesn't switch my workspace.

Stephan Meijer gravatar imageStephan Meijer ( 2015-07-02 22:16:26 +0000 )edit

Sorry, this is confusing... Why is the answer marked correct while the first comment contradicts it? I think that comment should be converted to an answer and then marked correct.

oberon gravatar imageoberon ( 2015-07-02 22:27:36 +0000 )edit

Question Tools


Asked: 2015-07-02 21:12:27 +0000

Seen: 116 times

Last updated: Jul 02