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

Bindsym workspace and command

asked 2014-04-09 12:03:16 +0000

ibews gravatar image


I'm trying to bind a key to switching to a workspace as well as a command. My config looks like:

bindsym $mod+w workspace www, exec hamster stop

which works nicely by itself. This is neccessary, since a feature of hamster which tracks activities based on the currently active desktop depend on features which aren't supported by i3 (Unfortunately I can't link the question and the answer so I'll quote the relevant part):

The workspace stuff hamster uses are probably some Extended Window Manager Hints (_NET_NUMBER_OF_DESKTOPS comes to mind), which i3 doesn't support (yet).

EDIT: Just checked the source for hamster and indeed, it depends on libwnck, which in turn relies on EWMH and ICCCM. This means that currently, it's not possible to make i3 and hamster play nice together automatically.

This is a quote from 2012. But it still doesn't seem to be supported.

I can use mod+w to move windows to the workspace called "www" and hamster is executed as I wish.

But if I connect another monitor and enable it like

xrandr --output VGA1 --auto --above LVDS1

I'll end up with a new workspace (on that monitor) called "www, exec hamster stop" (or whichever comes first).

Is there a way to indicate the end of the workspace name here? It looks like it takes all the rest of the line if i3 creates a new workspace on it's own.

Replacing the comma with a semi-colon or prefixing those with a backslash didn't fix the problem. Surrounding the workspace names with curly brackets or quotation marks didn't work either. This just changes the name of the created workspace.

I haven't tried replacing all these bindsyms by something like

bindsym $mod+w exec "i3-msg workspace www; exec hamster stop"

because I would like to avoid this situation.

edit retag flag offensive close merge delete


I think you should do a formal bug report at for both your command parsing issue and the ewmh stuff you want.

TonyC gravatar imageTonyC ( 2014-04-09 14:17:17 +0000 )edit

1 answer

Sort by » oldest newest most voted

answered 2014-04-17 12:33:24 +0000

Michael gravatar image

The correct way to specify what you want is:

bindsym Mod4+x workspace "5: blah", exec urxvt

Which works fine for me in the latest git version (presumably also in 4.7.2). If it doesn’t work for you, please file a bug report at as TonyC suggested.

edit flag offensive delete link more

Question Tools


Asked: 2014-04-09 12:03:16 +0000

Seen: 515 times

Last updated: Apr 17 '14