In the last six months I must have set up my default Ubuntu 16.04 + Xmonad desktop environment on like four or more machines. The goal looks like this (I like to have the top bar for status and widgets):
Here is a small guide for future reference:
Install the Xmonad package:
sudo apt install xmonad
At this point you can already select an Xmonad session at the login screen. But this is not recommended.
So additionally you should install the
sudo add-apt-repository ppa:gekkio/xmonad sudo apt-get update sudo apt-get install gnome-session-xmonad
Configure Xmonad. The Xmonad configuration is written in Haskell. If you are uncertain or need something working to start from, you are free to take my configuration. Place it here:
Relog and choose the GNOME + XMonad session at the login screen.
If you dislike the bottom panel (like I do, see above screenshot), you can disable it with:
dconf write /org/gnome/gnome-panel/layout/toplevel-id-list "['top-panel']"
To redisplay it, execute:
dconf write /org/gnome/gnome-panel/layout/toplevel-id-list "['top-panel','bottom-panel']"
The above guide also works for Ubuntu 18.04 and 20.04. However, for version 20.04 further tweaks are needed:
Fix layout switch (Super+Space):
The shortcut is claimed by GNOME and needs to be disabled in "Settings > Keyboard Shortcuts > Switch to next input source"
Remove the Terminal title bar:
sudo apt install gnome-shell-extension-pixelsaver gnome-extensions enable firstname.lastname@example.org gsettings set org.gnome.Terminal.Legacy.Settings headerbar false
Hide desktop icons:
Inspired by: https://askubuntu.com/questions/1230877/how-to-remove-home-folder-icon-from-desktop-in-ubuntu-20-04 (the keys however don't work for
GNOME + XMonad session). Correct key:
gsettings set org.gnome.gnome-flashback.desktop show-icons false
It's called 'Yaru-dark' (default is 'Yaru', a light theme) and can be set under
Chromium snap context menu
For me, context menu (e.g. right click on links) didn't work with the new Chromium snap. The solution is to disable hardware accerlation.
If top Gnome Panel disappears randomly on login:
gsettings set org.gnome.gnome-flashback root-background true gsettings set org.gnome.gnome-flashback desktop false