My journey of ricing Arch Linux
Overview
I was inspired to rice my own Arch Linux operating system once I saw the creation of [1]. I highly recommend checking out this theme because its github page has a list of useful desktop environment extensions.
Figure 1 illustrates a broken down view of the components which need to be selected and installed in order to create a fully-fledged Desktop Environment.
Thanks go to [2] for their detailed documentation which inspires this guide.
Research
A list of available software for each component is shown in Figure 1.
Display Server
Is required to run Graphical User Interfaces (GUIs). The big players are:
[3] - The most modern display server in the list, as of today some programs might not work completely with this display server.
Wayland is a replacement for the X11 window system protocol and architecture with the aim to be easier to develop, extend, and maintain. [3]
[4] - The oldest display server in the list.
The X.Org project provides an open source implementation of the X Window System. [4]
Check out [5] about the history of display servers.
Display Driver
The default driver modesetting
should work with most graphic cards, but it’s recommended to install a dedicated driver for AMD or NVIDIA products.
Window Manager
A window manager is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. [6]
Find a list of hand-picked window managers at [7]
Popular Window Managers
For X
- [8] - A dynamic window manager and the most used one.
- [9] - A tiling window manager that represents windows as the leaves of a full binary tree.
For Wayland
Check out [10] for a list of available Compositors. Here is a selection of the most interesting to me:
- [11] - A scrollable tiling window manager.
- [12] - A tiling window manager completely written from scratch.
Interoperable
- [13] - A highly configurable, next generation window manager with extensive standards support.
Compositors
Compositors are responsbile for the following features:
- transparent windows
- transitions and animations
- window drop shadows
- V-sync
They are not ideal for gaming as they introduce additional latency.
See [14] for a detailed description of compositors.
Display Manager
A display manager, or login manager, is typically a graphical user interface that is displayed at the end of the boot process in place of the default shell. [15]
A selection of interesting graphical display managers. The full list is available at [15].
- [16] - Fast and lightweight, supports fingerprint login. Supports both X and Wayland display server. Developed by canonical.
- [17] - The recommened display manager for the KDE and Plasma desktop environments.
Terminal Emulator
- A terminal emulator allows a user to interact with a shell from within Xorg.
- [18]
Therefore, a terminal emulator is absolutely necessary in order to further interact with the shell when the graphical user interface is set up.
Popular terminal emulators for the X Window System are:
Implementation
By going through Section 2 I ended up with the following components:
Component | Selection | Reason |
---|---|---|
Display Server | X.org | Because AwesomeWM is developed for X11 |
Window Manager | AwesomeWM | Due to its fast and modern design |
Display Manager | LightDM | Lightweight and fast, develop by canonical |
Terminal Emulator | kitty | Fast and lightweight |
Additional software to enhance the experience:
Software | Description |
---|---|
Nitrogen | A fast and lightweight (GTK2) desktop background browser and setter for X Window |
rua[21] | Arch User Repository (AUR) helper to install packages from the AUR |
rofi[22] | A popup window switcher and a replacement for dmenu |
neofetch[23] | A command-line system information tool |
Table 1: Selected components alongside the reason.
Set up Arch linux with the
archinstall
command and select thexorg
graphics profile with the corresponding drivers (Intel, AMD, NVIDIA, $\ldots$).Install the window and display managers, alonside other packages with
pacman -Syu awesome lightdm lightdm-gtk-greeter kitty nano
Install a greeter theme for lightdm with
pacman -Syu lightdm-gtk-greeter
Enable the display manager with
systemctl enable lightdm.service
Test that the greeter and window manager are working with
pacman -Syu xorg-server-xephyr
lightdm --test-mode --debug
Check the console output if anything goes wrong.
Install an AUR helper to simplify installation of packages from the [24]. I selected the helper [21], but more are listed at [25].
Install the window switcher
rofi
with
packman -Syu rofi
- Next up is the customization of the awesome window manager. Copy the default and edit it with
cp /etc/xdg/awesome/rc.lua ~/.config/awesome/
Search for the section -- Prompt
in the copied rc.lua
file and modify the behaviour for opening the launcher:
awful.key({modkey}, "r",
function()
awful.spawn.with_shell("rofi -show drun")
end,
{description = "run prompt", group = "launcher"}),
Inspirations from other ricings
[i3-gaps] Picturesque
Customization
Configuring the terminal
Install the following packages:
pacman -Syu neofetch
Then open the kitty
terminal configuration.
The configuration is inspired by
github/ParallaxWave’s blood_i3
# setup font settings #font_family Fira Code Retina Nerd Font Complete font_family JetBrainsMono Nerd Font font_size 9 disable_ligatures never # no bells. Ever. enable_audio_bell no bell_on_tab no # catppucin ## main colors background #1B1923 foreground #D7DAE0 selection_background #2D293B selection_foreground #F0AFE1 url_color #A4B9EF cursor #B3E1A3 ## tabs active_tab_background #1E1E28 active_tab_foreground #D7DAE0 inactive_tab_background #1B1923 inactive_tab_foreground #A4B9EF tab_bar_background #15121C ## normal color0 #6E6C7C color1 #E28C8C color2 #B3E1A3 color3 #EADDA0 color4 #A4B9EF color5 #C6AAE8 color6 #F0AFE1 color7 #D7DAE0 ## bright color8 #6E6C7C color9 #E28C8C color10 #B3E1A3 color11 #EADDA0 color12 #A4B9EF color13 #C6AAE8 color14 #F0AFE1 color15 #D7DAE0 color16 #ECBFBD color17 #3E4058
Configuring
awesomewm
The default configuration file resides in ~/.config/awesome/rc.lua
.
In order to configure autostart programs we need to create a new executable ~/.config/awesome/autorun.sh
:
#!/bin/sh
# See https://wiki.archlinux.org/title/Awesome#Autostart
run() {
if ! pgrep -f "$1" ;
then
"$@"&
fi
}
run "~/.config/polybar/launch.sh"
Then add the following line to the ~/.config/awesome/rc.lua
to run the autorun script whenever the window manager is starts up:
awful.spawn.with_shell("~/.config/awesome/autorun.sh")
Configuring the Status Bar
This guide is inspired by the installation guide provided by [27].
- For this we use [28], install it with
pacman -Syu polybar
- Copy the default configuration to the
~/.config/polybar
folder
mkdir ~/.config/polybar
cp /etc/polybar/config.ini ~/.config/polybar/
Adapt the configuration to suit your needs.
Run
polybar
with a window manager (awesomewm
) by creating a executable in~/.config/polybar/launch.sh
:
#!/bin/bash
# Terminate already running bar instances
killall -q polybar
# If all your bars have ipc enabled, you can also use
# polybar-msg cmd quit
# Launch Polybar, using default config location ~/.config/polybar/config.ini
polybar mybar 2>&1 | tee -a /tmp/polybar.log & disown
echo "Polybar launched..."
- Execute the
~/.config/polybar/launch.sh
when the window manager’s autorun script is called (see Section 5.2), by adding the following line to the~/.config/awesome/autorun.sh
:
run "$HOME/.config/polybar/launch.sh"
- Set up a polybar module for awesomewm to show the current open windows. Follow the installation guide from [29].
Other Resources
- GNOME - Touchpad Gesture Improvements for Wayland and X11.
- Utilities for AwesomeWM
- [30]
- [28] - A fast and easy to use tool for creating status bars
- Curated list of eye candy
References
[1] supaboss, “nobara-dotfiles,” GitHub. Nov. 2022 [Online]. Available: https://github.com/supaboss/nobara-dotfiles
[2] "General recommendations - ArchWiki." Nov. 2022 [Online]. Available: https://wiki.archlinux.org/title/General_recommendations
[3] “Wayland.” Nov. 2022 [Online]. Available: https://wayland.freedesktop.org
[4] “X.Org.” Oct. 2020 [Online]. Available: https://www.x.org/wiki
[5] Dimitrios, “Linux Jargon Buster: What is a Display Server in Linux? What is it Used for?” It’s FOSS, Dec. 2021 [Online]. Available: https://itsfoss.com/display-server
[6] Contributors to Wikimedia projects, “Window manager - Wikipedia.” Oct. 2022 [Online]. Available: https://en.wikipedia.org/w/index.php?title=Window_manager&oldid=1119230894
[7] “Window Managers.” Jun. 2022 [Online]. Available: https://nuxsh.is-a.dev/blog/window-managers.html#org508be78
[8] “AwesomeWM,” awesome window manager. Sep. 2022 [Online]. Available: https://awesomewm.org
[9] "bspwm," GitHub. Nov. 2022 [Online]. Available: https://github.com/baskerville/bspwm
[10] “Wayland - ArchWiki.” Nov. 2022 [Online]. Available: https://wiki.archlinux.org/title/Wayland
[11] "Cardboard / cardboard $\cdot$ GitLab," GitLab. Nov. 2022 [Online]. Available: https://gitlab.com/cardboardwm/cardboard
[12] "i3 - improved tiling wm." Oct. 2022 [Online]. Available: https://i3wm.org
[13] “Openbox.” Nov. 2014 [Online]. Available: http://openbox.org/wiki/Main_Page
[14] A. Sharma, “Compositors in Linux,” DEV Community xn–1uga01807aca52bc, Apr. 2020 [Online]. Available: https://dev.to/l04db4l4nc3r/compositors-in-linux-1hhb
[15] "Display manager - ArchWiki." Nov. 2022 [Online]. Available: https://wiki.archlinux.org/title/Display_manager
[16] "lightdm," GitHub. Nov. 2022 [Online]. Available: https://github.com/canonical/lightdm
[17] sddm, “sddm,” GitHub. Nov. 2022 [Online]. Available: https://github.com/sddm/sddm
[18] "Terminal emulators - ArchWiki." Nov. 2022 [Online]. Available: https://wiki.archlinux.org/title/Category:Terminal_emulators
[19] "kitty." Nov. 2022 [Online]. Available: https://sw.kovidgoyal.net/kitty
[20] “XTERM.” Jun. 2022 [Online]. Available: https://invisible-island.net/xterm
[21] vn971, “rua,” GitHub. Dec. 2022 [Online]. Available: https://github.com/vn971/rua
[22] davatorium, “rofi,” GitHub. Dec. 2022 [Online]. Available: https://github.com/davatorium/rofi
[23] dylanaraps, “neofetch,” GitHub. Dec. 2022 [Online]. Available: https://github.com/dylanaraps/neofetch
[24] “Arch User Repository.” Dec. 2022 [Online]. Available: https://aur.archlinux.org
[25] "AUR helpers - ArchWiki." Dec. 2022 [Online]. Available: https://wiki.archlinux.org/title/AUR_helpers
[26] CrypticSky, “r/unixporn - [i3-gaps] Picturesque,” reddit. Dec. 2022 [Online]. Available: https://www.reddit.com/r/unixporn/comments/okmx6u/i3gaps_picturesque
[27] “Polybar - ArchWiki.” Nov. 2022 [Online]. Available: https://wiki.archlinux.org/title/Polybar
[28] “Polybar,” Polybar.github. Oct. 2022 [Online]. Available: https://polybar.github.io
[29] tam-carre, “polywins,” GitHub. Dec. 2022 [Online]. Available: https://github.com/tam-carre/polywins
[30] "The Basics of Ricing Linux." Nov. 2016 [Online]. Available: https://jie-fang.github.io/blog/basics-of-ricing