Yes, this is possible and is an action I perform all the time. Here are the two common scenarios:
Moving Between Workspaces
If you’re looking to move all of the applications you have open on screen (a workspace) to another workspace, then you’ll have to “focus” all of the windows on that workspace. To do this, you would use the key combination $mod+a
. This basically tells i3 that you’d like the next command to take affect on all the windows within a container.
Note: You may have to issue the $mod+a
command a few times to capture all of the windows on the screen. As @airclay mentioned, the documentation as more details on how “containers” work.
So, to use your example, let’s assume your windows are on workspace one. If you were focused on the left window, then issuing the $mod+a
key combination would select the “parent container” (all the windows, including the two to the right of your focused window). Then, you could use the key combination $mod+3
to move all the windows to workspace three.
Moving Between Monitors
In this scenario, you have your windows on a primary monitor, but you’d like to move them all to a secondary monitor. This is achieved using the move workspace
command as mentioned by @sixwinger. You can find more information in the “Moving workspaces to a different screen” section of the i3 manual.
What’s key to understand is that this action is only possible if you have it mapped within your i3 config. As an example, here’s what I’ve added to my config file (~/.config/i3/config):
# move focused workspace between monitors (outputs)
bindsym $mod+Ctrl+greater move workspace to output right
bindsym $mod+Ctrl+less move workspace to output left
So, to use your example once more, let’s assume you have your windows laid out on workspace two which is currently displayed on your primary monitor. You’re ready to work from your laptop (because everyone needs a coffee break) and so you want to move all the windows to your laptop’s display. Assuming you’ve added the mapping above, then you would issue the $mod+ctrl+>
key combination to move the workspace to the laptop screen.
Of course, the laptop has to be configured as “right” of your primary monitor. Otherwise you’d have to use the other key combination.
What’s important to note here is that the windows did not move to a new workspace, but the workspace itself (workspace two) moved to the laptop monitor.