Skip to content

i3wm bash script to change to previous or next workspace. If the workspace does not yet exist it will be created.

Notifications You must be signed in to change notification settings

lesnoh/i3wm-wsswitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

i3wm-wsswitch

Use at your own risk...

i3wm-wsswitch is a script that will cycle through your workspaces.

If you have two created workspaces "1" and "3" and "1" is focused then "i3wm-wsswitch.sh -r" will create an empty workspace "2" and switch to it. If the script is directly executed again it will change the focus to the existing workspace "3".

If you are on workspace 1 and move to the left, the highest already created workspace will be choosen.

If you are moving right the script will create new workspaces up to $WORKSPACE_MAX. If you have reached $WORKSPACE_MAX it will move to workspace 1.

this has not been tested on multi monitor setups

config

XF86Forward and XF86Back can for example be found on Thinkpad T61 above the left and right arrow keys. Change it to your demands.

Currently the script only works with bash.

Add somthing like this to your i3 config

# move to prev / next workspace
bindsym $mod+XF86Forward workspace next
bindsym $mod+XF86Back workspace prev

# move to prev / next workspace number and create it if it does not exist
bindsym XF86Forward exec "bash ~/src/i3wm-workspaceswitch/i3wm-wsswitch.sh -r"
bindsym XF86Back exec "bash ~/src/i3wm-workspaceswitch/i3wm-wsswitch.sh -l"

About

i3wm bash script to change to previous or next workspace. If the workspace does not yet exist it will be created.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages