I use Pop!_OS (which itself is Ubuntu-based) so these instructions may work for you if you use Ubuntu 20.04 and above.
This is a guide on setting up i3-gaps with MATE desktop on Pop!_OS 20.10. In this flow, I log into an i3
session with lightdm
.
Setup i3
Build dependencies
sudo apt update && sudo apt install -y meson ninja-build intltool libtool
xcb-util-xrm
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev xutils-dev libxcb-shape0-dev autoconf
# Install
cd /tmp
git clone https://github.com/Airblader/xcb-util-xrm
cd xcb-util-xrm
git submodule update --init
./autogen.sh --prefix=/usr
make
sudo make install
i3-gaps
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev \
libxcb-util0-dev libxcb-icccm4-dev libyajl-dev \
libstartup-notification0-dev libxcb-randr0-dev \
libev-dev libxcb-cursor-dev libxcb-xinerama0-dev \
libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev \
autoconf libxcb-xrm0 libxcb-xrm-dev automake libxcb-shape0-dev
# Install
cd /tmp
git clone https://www.github.com/Airblader/i3 i3-gaps
cd i3-gaps
mkdir -p build && cd build
meson ..
ninja
meson install
# Install desktop files
cd /tmp/i3-gaps
sudo cp share/applications/*.desktop /usr/share/applications/
sudo cp share/xsessions/*.desktop /usr/share/xsessions/
i3status-rust
# https://doc.rust-lang.org/cargo/getting-started/installation.html
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
cargo install --git https://github.com/greshake/i3status-rust i3status-rs
Setup MATE Desktop
sudo apt install mate-desktop-environment mate-desktop-environment-extras ubuntu-mate-themes
Disable desktop background management
You may want to disable MATE's desktop management so you can use something else to set the background image in the i3 session:
dconf write /org/mate/desktop/background/show-desktop-icons "false"
dconf write /org/mate/desktop/background/draw-background "false"
Use lightdm
instead of gdm
For whatever reason, I've found that the latter doesn't play well with anything that isn't GNOME, so I had to install lightdm and set that as the default display manager.
sudo apt install lightdm
# You should be prompted to select a DM during installation. Select Lightdm.
After installing, reboot your computer.
Example Configuration
I have my dotfiles to act as a reference for an i3 configuration.