Workspaces grid in Ubuntu 20.04

In last article I have described why and how I use workspaces Workspace lover on my desktop. I was happy user of Ubuntu’s Unity inteface, but unfortunatelly it was abandoned by Canonical. So I had two options: Keep using Unity with persistent thought that one day it will be not supported any more. Or try to get used with Gnome 3.

I am probably getting old because I decided to stuck with Unity. Unfortunatelly Unity is second class passenger in 20.04 and therefore I often faced issues. Set keyboard shortcuts were lost, volume setting get 60 second delay, sometimes it freezed, … So I was forced to try Gnome 3.

Gnome 3 issues

I don’t care about appearance of UI that much so Gnome is fine for me. But soon I found first problems with usability:

  • only vertical list of workspaces is supported,

  • my old CTRL+ALT and CTRL+ALT+SHIFT based shortcuts was not working,

  • switching keyboard layout by SHIFT+ALT worked only when ALT was pressed first,

Adjusting Gnome for fitting my needs

Extensions, apps

I installed following extensions through Ubuntu Software app:

  • Workspace grid returns support for grid of workspaces (since 20.04 I use Workspaces Matrix)

  • No topleft hot corner disables opening Activities when accidentally cursor is positioned in top left corner of display

  • Multi monitors add-on gives control over top panel functionality and appearance

Also Gnome tweaks app is nice to have because you can see list of installed extensions and configure them. Also basic workspaces settings are available.

Keyboard shortcuts for workspaces, displays and windows

As I mentioned before I had problems with shortcuts containing keys CTRL, ALT, SHIFT. Therefore I was looking for alternative. I noticed that instead of them SUPER key (the nasty one with Windows symbol - why it is called SUPER then?) is used in default setting. OK, so here is my setting based on SUPER.

You can use dconf-editor or use command line.

Switching workspaces by SUPER+arrow keys

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['<Super>Down']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "['<Super>Up']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Super>Left']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Super>Right']"

Switching to specific workspace SUPER+numkey

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>KP_7']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<Super>KP_8']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['<Super>KP_9']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "['<Super>KP_4']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 "['<Super>KP_5']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-6 "['<Super>KP_6']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-7 "['<Super>KP_1']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-8 "['<Super>KP_2']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-9 "['<Super>KP_3']"

Move window among workspaces by SUPER+ALT+arrow keys

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-right "['<Super><Alt>Right']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "['<Super><Alt>Left']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up "['<Super><Alt>Up']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down "['<Super><Alt>Down']"

Move window to specific workspace SUPER+ALT+numkey

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<Super><Alt>KP_7']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<Super><Alt>KP_8']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<Super><Alt>KP_9']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<Super><Alt>KP_4']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5 "['<Super><Alt>KP_5']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-6 "['<Super><Alt>KP_6']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-7 "['<Super><Alt>KP_1']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-8 "['<Super><Alt>KP_2']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-9 "['<Super><Alt>KP_3']"

Positioning window among displays is done (by default) as SUPER+SHIFT+arrow keys

Positioning window on display is done by SUPER+CTRL+arrow keys

gsettings set org.gnome.mutter.keybindings toggle-tiled-left "['<Super><Ctrl>Left']"
gsettings set org.gnome.mutter.keybindings toggle-tiled-right "['<Super><Ctrl>Right']"
gsettings set org.gnome.desktop.wm.keybindings unmaximize "['<Super><Ctrl>Down']"
gsettings set org.gnome.desktop.wm.keybindings maximize "['<Super><Ctrl>Up']"

Keyboard shortcuts for multimedia

I hate different position of multimedia keys between laptop at work and desktop at home. So I prefer simple shortcuts which are available on all keyboards:

# Remove default binding

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-last "['']"

gsettings set org.gnome.settings-daemon.plugins.media-keys volume-up "['<Super>Page_Up']"
gsettings set org.gnome.settings-daemon.plugins.media-keys volume-down "['<Super>Page_Down']"
gsettings set org.gnome.settings-daemon.plugins.media-keys media "['<Super>Home']"
gsettings set org.gnome.settings-daemon.plugins.media-keys play "['<Super>End']"
gsettings set org.gnome.settings-daemon.plugins.media-keys next "['<Super>period']"
gsettings set org.gnome.settings-daemon.plugins.media-keys previous "['<Super>comma']"

Problematic shortcuts

Many times I pressed SUPER+P accidentally instead of CTRL+P. Unfortunatelly that caused switchin displays layout from join to clone. It is easy to switch it back but windows positions and displays setting are lost. To disable SUPER+P:

gsettings set org.gnome.mutter.keybindings switch-monitor '[]'

Troubleshooting shortcuts

Take a look into directory /usr/share/gnome-control-center/keybindings where you can grasp location of shortcuts in dconf. Knowing path you can list settings from command line:

gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys

Other problems:

  • some shortcuts accepts array “[‘<Super><Ctrl>Left’]” for multiple shortcuts some not “<Super>End”,

  • I noticed that sometimes is in settings control key called CTRL and sometimes CONTROL - have no idea what is correct

Workspaces isolation

When I work on certain workspace I don’t care about others:

# In ALT+TAB dialog show only local apps

gsettings set org.gnome.shell.app-switcher current-workspace-only true

# On dash show activity marks (small red pins showing number of windows on left side of icon) only from current workspace

gsettings set org.gnome.shell.extensions.dash-to-dock isolate-workspaces true

Replacement of indicator-multiload

I like to see simple usage statistic of CPU, RAM, network. Instead of not working indicator-multiload you can use extension system-monitor available in Ubuntu Software app.

Tiling windows

You can use gTile extension. I use following presets for 1/3 and 2/3 positioning:

3x1 1:1 2:1,2:1 3:1

3x1 1:1 1:1,2:1 2:1,3:1 3:1

Bound to Super+/ resp Super+*

First arranges window so it uses first 2/3 of screen width, next press to last 2/3 width. Second takes first 1/3 of screen and repetitive presses moves window so it uses 2nd and 3rd 1/3 of screen.

This is usable to arrange windows of multiple communicator tools (Google Chat, Skype, Telegram, …)

Conclusion

I am finally happy with Ubuntu 20.04. I hope it can help also others.

Tags:  Ubuntu  Gnome3