3

I'm trying to figure out how to quickly send the window with focus to the next workspace numerically.

Using the following lines in my ~/.config/i3/config file, I'm able to bind Super [ and Super ] to move the currently focused window to the previous and next workspace.

# use brackets to move window to adjacent workspace
bindsym $mod+bracketright move to workspace prev
bindsym $mod+bracketleft  move to workspace next

However, only workspaces with windows currently in them are candidates for receiving the window.

In particular, if only one workspace is currently non-empty, Super [ and Super ] can't be used to declutter the current workspace by moving windows to an adjacent workspace.

Does i3 expose the ability to send a window to workspace n+1 or n-1 regardless of whether the workspace is empty or not?

Greg Nisbet
  • 3,076
  • There is no feature to do what you want. Maybe you will have to do by hand the "get current workspace number"(https://faq.i3wm.org/question/6200/obtain-info-on-current-workspace-etc.1.html) and than, do the math to move (n+1)... –  Feb 07 '19 at 09:42

3 Answers3

1

This should do what you want (amongst other things).

i3-ws.py move 3

It's here: http://bhepple.com/doku/doku.php?id=unixscripts:0-intro

$ i3-ws.py -h

i3-ws.py [up|down|next|prev] [go|move] i3-ws.py [go|move] number i3-ws.py open i3-ws.py dynamic [go|move]

'open' uses dmenu to prompt for an application to run 'dynamic' uses dmenu to prompt for a workspace number

wef
  • 472
0

Use $Mod + Shift + '<Your Workspace Number>' to move the window to specified workspace !!!

0
bindsym $mod+ctrl+Shift+Left move to workspace prev
bindsym $mod+ctrl+Shift+Right move to workspace next

This did the job for me.

tinlyx
  • 678