Anyway to switch between workspaces

Hi, im trying to bind keys to switch between workspaces instead of selecting the exact workspace #. I tried back_and_forth but not having any luck. Any help would be appreciated. Thanks

Welcome to the community. :beers: Hope you find what you need and have a good time doing it. :smiley:

I think “workspace next” is what you are wanting. Hope this helps.

2 Likes

Not sure which DE you’re using. I know in XFCE, switching workspaces defaults as Ctrl+Alt+Left or Right Arrow Key.

Or - just put the mouse pointer on the ‘open’ screen background and spin the mouse wheel… (selectable item in Settings/Windows Manager Tweaks/Workspaces)

There are a variety of ways to do this dependent on whether you use a DE or, if you are like me, using a tiling window manager. Since you don’t know how to do it, I assume that you are using a desktop environment that you don’t know well. The two main methods are ctrl-alt-right (or left) and middle mouse wheel. The answer is usually in the docs or in the keybindings setting that you should be able to find in the menu.

1 Like

Thanks, I am not using any DE just i3. workspace next did not work. I guess I can get used to super+1234…

Try this:

# Alt tab workspace switching

bindsym Mod1+Tab workspace next
bindsym Mod1+Shift+Tab workspace prev

From i3’s user guide: https://i3wm.org/docs/userguide.html#_changing_named_workspaces_moving_to_workspaces

You can also switch to the next and previous workspace with the commands workspace next and workspace prev, which is handy, for example, if you have workspace 1, 3, 4 and 9 and you want to cycle through them with a single key combination. To restrict those to the current output, use workspace next_on_output and workspace prev_on_output. Similarly, you can use move container to workspace next, move container to workspace prev to move a container to the next/previous workspace and move container to workspace current (the last one makes sense only when used with criteria).

It’s been a while since I’ve used i3, but I would assume that would mean it would be

bindsym Mod1+Tab workspace next_on_output

For example. Pardon though, my i3 knowledge is not great these days, but their user guide is basically an i3wm version of the arch wiki. It’s VERY well documented and in depth, even if it is a bit hard to understand sometimes.

1 Like

This seems to be a feature not included in i3. I’ve tried all the suggestions and been through the i3 docs. Closest i’ve found is a script I can’t get to work. https://github.com/altdesktop/i3ipc-python/blob/master/examples/i3-cycle-focus.py

syntax error at "use strict;’
I made sure my java was up to date.

ideas?