How to Install and Configure bspwm in Linux
How to Install and Configure bspwm in Linux
bspwm (Binary Space Partitioning Window Manager) is a tiling window manager for X11 that focuses on simplicity and flexibility. This guide will walk you through the installation and basic configuration of bspwm on a Linux system.
Prerequisites
Before installing bspwm, ensure that you have the following:
A Linux distribution with a package manager (e.g., Ubuntu, Arch, Fedora)
Xorg installed and running
Installation
On Ubuntu
Open your terminal and update the package list:
sudo apt update
Install bspwm and its dependencies:
sudo apt install bspwm sxhkd
On Arch Linux
Open your terminal and run:
sudo pacman -S bspwm sxhkd
On Fedora
Use the following command in your terminal:
sudo dnf install bspwm sxhkd
Basic Configuration
After installing bspwm, you need to set it up for your user.
Create Configuration Files:
You can find example configuration files in the /usr/share/doc/bspwm/examples directory. Copy them to your home directory:
mkdir -p ~/.config/bspwm
mkdir -p ~/.config/sxhkd
cp /usr/share/doc/bspwm/examples/bspwmrc ~/.config/bspwm/
cp /usr/share/doc/bspwm/examples/sxhkdrc ~/.config/sxhkd/
Make the bspwmrc Executable:
Run the following command to ensure the bspwmrc file is executable:
chmod +x ~/.config/bspwm/bspwmrc
Edit Configuration Files:
Open the bspwmrc and sxhkdrc files in your preferred text editor:
nano ~/.config/bspwm/bspwmrc
nano ~/.config/sxhkd/sxhkdrc
You can customize keybindings, window rules, and appearance in these files. The default configuration is a good starting point.
Starting bspwm
To start bspwm, you need to configure your display manager or use the following command in a terminal session:
startx ~/.xinitrc
Make sure your .xinitrc file contains the following line:
exec bspwm
Additional Tips
Installing a Panel: Consider installing a panel like polybar or tint2 for system information and task management.
Further Customization: Explore themes, icons, and additional tools like picom for window effects.
Conclusion
With bspwm, you have a powerful and flexible window management solution tailored to your needs. Experiment with configurations to find the perfect setup that works for you.
For further reading and advanced configurations, check out the official bspwm GitHub repository