Cozy Guide To Install Bspwm In Arch Linux
Welcome to this guide to install the tiling window manager BSPWM in your Arch Linux. Whether you’re a seasoned Linux user or a newcomer, we’ve got you covered. We’ll walk you through the process, explain the concepts, and provide tips and tricks to make your experience smooth and enjoyable.
Note: To follow this guide, we assume that you already have Arch Linux installed. If you have not installed it yet, you can refer to my Cozy Guide to Install Arch Linux.
1. Initializing the Desktop Environment
1.1. Installing BSPWM and SXHKD
We will start with the installation of bspwm and
sxhkd. SXHKD is an independent daemon to bind actions to
key combinations and/or mouse buttons essential to use BSPWM.
We will also install lightdm, which is a lightweight
display manager, along with lightdm-gtk-greeter and
lightdm-gtk-greeter-settings to provide a graphical user
interface for configuration. Finally, xorg, which is the
most popular public, free, and open-source window system.
To install these packages, open a terminal and run the following command:
$ sudo pacman -S bspwm sxhkd lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings xorg1.2. Enabling the Display Manager
Now we have to initialize the LightDM display manager. This can be done by enabling it through the system control as follows:
$ sudo systemctl enable lightdm1.3. Configuring BSPWM and SXHKD
Next, we need to create custom directories for BSPWM and SXHKD in the
.config directory. This can be done using the
mkdir command:
$ mkdir -p ~/.config/{bspwm,sxhkd}Once the directories are created, we can proceed to install the
necessary files with the appropriate permissions. We’ll use the
install command to copy the example configuration files
from the BSPWM and SXHKD documentation to our newly created
directories:
$ install -Dm755 /usr/share/doc/bspwm/examples/bspwmrc ~/.config/bspwm/
$ install -Dm644 /usr/share/doc/bspwm/examples/sxhkdrc ~/.config/sxhkd/After installing the files, it’s crucial to modify the
sxhkdrc file located in the .config/sxhkd/
directory. This file contains the configuration for the hotkeys,
including the one for opening the terminal. If this is not set up
correctly, you may encounter issues when trying to open a terminal after
a system restart.
In my case we will use Kitty as our terminal emulator,
so the configuration would be as follows:
# kitty
super + Return
kitty2. Customizing BSPWM
We will install the lxappearance, picom,
and nitrogen packages to customize the desktop
environment.
2.1. LXAppearance
LXAppearance is a desktop-independent theme manager that
allows us to change the appearance of our desktop environment. To
install it, run the following command:
$ sudo pacman -S lxappearanceOnce installed, you can run lxappearance in the terminal
to open the graphical user interface. Here you can change the GTK theme,
the icon theme, the font, and the cursor.
2.2. Picom
Picom is an independent compositor for Xorg, famous for
providing shading and transparency effects to windows. To install it,
run the following command:
$ sudo pacman -S picomAfter installation, you can start Picom with the command
picom &. To configure it, create a configuration file
in your home directory, for example
~/.config/picom/picom.conf, and adjust the settings
according to your needs.
2.3. Nitrogen
Nitrogen is a utility for changing the desktop
background in X Window systems. To install it, run the following
command:
$ sudo pacman -S nitrogenAfter installation, you can run
nitrogen /path/to/your/images/ to select an image as a
desktop background.
2.4. Autostarting Programs
If you want these programs to run when you start your computer, you
can add the following configuration to your .bspwmrc
file:
$ nitrogen --restore % &
$ picom --config ~/.config/picom/picom.conf &After this you’ve successfully set up the core components and explored some basic customization options. Remember, BSPWM is a powerful and flexible window manager, and this guide has just scratched the surface of its capabilities.