Additional Workspaces in Gnome

I use Gnome on Ubuntu 18.04 with static workspaces and switch between them using keyboard shortcuts - for example, ALT+1 takes me to workspace one. Unfortunately, using the graphical settings editor, I was only able to assign keyboard shortcuts to the first four workspaces. After a bit of research and playing with gconf-editor, I found the command line to achieve what I need.

Let's have a look at the settings involved here:

$ gsettings get org.gnome.mutter dynamic-workspaces
false
$ gsettings get org.gnome.desktop.wm.preferences num-workspaces
5
$ gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-1
['<Alt>1']
$ gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-5
['disabled']
$

The first two settings enable five static workspaces. The keybindings show that while I have correctly set a keybinding for the first one, the shortcut for workspace 5 is disabled. That is fixable, just be careful, you need double quoting:

$ gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 '["<Alt>5"]'

The setting takes effect immediately.

social