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

How can I move a workspace?

asked Jun 9 '12

Is there any way (command) to move the entire workspace? Let's say, all windows in workspace 1 to workspace 2, as they are (size, etc). I caught myself doing this manually (moving window by window) a couple of times, so I decided to ask.

Thanks,

2 answers

Sort by » oldest newest most voted
1

answered Jun 9 '12

Tucos gravatar image

The closes you can get is renaming the workspace with rename workspace <old_name> to <new_name> (see userguide: renaming workspaces). This is equivalent to moving everything there if the workspace doesn't exist yet, but otherwise you can focus parent a bunch of times and move that container.

Comments

Thanks. This is close, but unfortunately we can not define to which workspace I want to move on the fly, right? By putting this on config, I get stuck with this biding-action.

bruno.braga gravatar imagebruno.braga (Jun 9 '12)edit

Hm. normally i3-input can be used for dynamic input, but it's limited to 1 value and there's no magic names for <old_name> such as 'current', which means it's not possible to use i3-input in this case… guess you'll have to stick to focus parent + move

Tucos gravatar imageTucos (Jun 9 '12)edit

joepd answer looks promising, but I couldnt get it to work... can you?

bruno.braga gravatar imagebruno.braga (Jun 10 '12)edit

For me, it works as of Version 4.4, also with unstacked/untabbed containers (it might have worked earlier).

joepd gravatar imagejoepd (Jan 8 '13)edit

Yep! Worked well!

bruno.braga gravatar imagebruno.braga (Jan 18 '13)edit
0

answered Jun 9 '12

joepd gravatar image

I do it like this:

Select the master container of the workspace by pressing $mod+a a few times.

Then throw in your move command. The whole lay-out is replicated on the new workspace :)

Comments

Wow, I think this is where I want to go!!! But, after selecting it all, hitting mod+Shift+{new workspace} does nothing... could that be a different command, or an extra setting in config file?

bruno.braga gravatar imagebruno.braga (Jun 9 '12)edit

Turns out that you cannot move an entire workspace that way, so you'll have to somehow script your way around rename after all (unless you use workspace_layout stacked or so).<secure> that’s just a limitation in the code (and the debug log says so)

Tucos gravatar imageTucos (Jun 10 '12)edit

Thanks for looking into it!

bruno.braga gravatar imagebruno.braga (Jun 10 '12)edit

Apparently i just use this occasionally when the main container is tabbed or stacked. So, a hacky solution is this. Focus the main container with $mod+a, create a new xterm or whatever next to it, make this layout tabbed. Now you can throw the container around to another workspace.

joepd gravatar imagejoepd (Jun 10 '12)edit

Question Tools

Stats

Asked: Jun 9 '12

Seen: 976 times

Last updated: Jun 09 '12