Bspwm
Bspwm is a popular tiling window manager. It represents windows as the leaves of a full binary tree. Bspwm supports multiple monitors and is configured and controlled through messages. It's an alternate window manager in Archcraft.
The Ultimate Bspwm Configuration With Extra Functionality And Themes (25 Pre-Made + Infinite Auto Generated Themes With pywal
)
Get Bspwm Premium From ko-fi
And Support Archcraft Development.
Installation
Since Bspwm is the secondary/alternate window manager of Archcraft, It comes pre-installed. But if you choose another window manager (let's say openbox
) during installation of Archcraft or you ever want to install/reinstall Bspwm again, Then :
- Regular
- Premium
Open a terminal and run the following command to install the regular version of Bspwm :
$ sudo pacman -Sy archcraft-bspwm
Download the premium package from ko-fi, and save it in a directory. Open a terminal in same directory and run the following command to install Bspwm premium :
$ sudo pacman -U archcraft-bspwm-premium-X.Y-Z-any.pkg.tar.zst
Bspwm Premium comes pre-installed on Archcraft Prime ISO
Configuration
Bspwm is pre-configured in Archcraft. In this section, We'll see how the Bspwm window manager is configured, what tools and utilities are used to make it look and work like a complete desktop environment.
Config Structure
The configuration structure of Bspwm in Archcraft looks something like this:
~/.config
└── bspwm : bspwm config directory
├── alacritty : terminal config
├── scripts : scripts used for bspwm
├── themes : all themes (polybar, rofi configs)
├── bspwmrc : main bspwm config file
├── dunstrc : dunst config for notifications
├── picom.conf : compositor config
├── sxhkdrc : keybindings config file
└── xsettingsd : gtk themes, icons and fonts config file
Terminal
Alacritty is the default terminal. In the Bspwm window manager, alacritty is launched with an alternative config file. If you need to change anything, make sure you modify the config files in ~/.config/bspwm/alacritty
directory. These are the following config files you can modify to change the behaviour of your terminal:
~/.config/bspwm/alacritty/alacritty.toml
: Main configuration file
~/.config/bspwm/alacritty/colors.toml
: Colors configurations
~/.config/bspwm/alacritty/fonts.toml
: Fonts configurations
If you need any help with alacritty config, run :
man 5 alacritty
in terminal.
When you change the theme
, the colors.toml and fonts.toml file get overwritten by the theme script.
Notification
Dunst is used as a notification daemon for notifications in Bspwm. In the Bspwm window manager, dunst is launched with an alternative config file, which is ~/.config/bspwm/dunstrc
. So, If you need to modify anything, make sure you edit this file.
If you need any help with dunst config, run :
man 5 dunst
in terminal.
When you change the theme
, the fonts and colors in dunstrc file get overwritten by the theme script.
Wallpaper
Feh sets the wallpaper in the Bspwm. If you want to change the wallpaper, Edit the script ~/.fehbg
#!/bin/sh
feh --no-fehbg --bg-fill '/path/to/your/wallpaper'
When you change the theme
, the script ~/.fehbg
get overwritten by the theme script.
Statusbar
Polybar is used as the statusbar in Archcraft's Bspwm window manager.
The configurations for polybar can be found inside the currently applied theme's directory, which is inside the themes directory of Bspwm ~/.config/bspwm/themes
Let's say that the currently applied theme is default
and you want to modify the polybar settings, or perhaps want to add/remove modules, then you need to edit the following files :
~/.config/bspwm/themes/default/polybar/config.ini
: Main config file
~/.config/bspwm/themes/default/polybar/colors.ini
: Colors config file
~/.config/bspwm/themes/default/polybar/modules.ini
: Modules config file
If you need any help with polybar config, visit : polybar wiki
When you change the theme
, the fonts in config.ini file and colors.ini file of polybar get overwritten by the theme script.
Launchers and Applets
Rofi is used for application launchers, command runner and various applets. To modify the rofi config, edit ~/.config/rofi/config.rasi
file.
If you need any help with rofi config, run :
man rofi
in terminal.
The scripts for rofi that are used in Bspwm can be found it ~/.config/bspwm/scripts
directory. These are the following scripts that uses rofi to provide the launchers and applets in Bspwm :
rofi_askpass
: rofi based sudo
frontend to get root password
rofi_asroot
: applet to open apps as root
rofi_bluetooth
: bluetooth applet to quickly connect to BT devices
rofi_launcher
: an application launcher, cmd runner, file manager and task manager
rofi_music
: music applet, that controls MPD with mpc
rofi_powermenu
: power menu, with confirmation dialog
rofi_runner
: quickly lets you run a command
rofi_screenshot
: screenshot applet that works with maim
rofi_themes
: applet to change the themes
rofi_windows
: applet to manage opened windows
If you want to modify any applet or perhaps want to extend the functionality of the applet, just edit these scripts.
The configuration of each script can be found inside the currenty applied theme's directory, which is inside the themes directory of Bspwm ~/.config/bspwm/themes
Let's say that the currently applied theme is default
and you want to modify the looks of launcher, then you need to edit the ~/.config/bspwm/themes/default/rofi/launcher.rasi
file. Same goes for every other applet, Edit the respective file in the same directory.
If you need any help with rofi theming, run :
man rofi-theme
in terminal.
To change the colors and fonts of the launchers and applets, Edit the ~/.config/bspwm/themes/<THEME>/rofi/shared/colors.rasi
and ~/.config/bspwm/themes/<THEME>/rofi/shared/fonts.rasi
files.
When you change the theme
, the shared/colors.rasi and shared/fonts.rasi files get overwritten by the theme script.
Compositor
Picom is used for compositing. It's a lightweight compositor with shadowing, advanced blurring and fading. In Bspwm, picom is launched with an alternative config file, which is ~/.config/bspwm/picom.conf
.
If you need to change anything related to picom, Edit this picom config file.
If you need any help with picom config, check the picom's default config file in
/etc/xdg/picom.conf
If you're having screen-tearing issues, using glx
backend can solve this issue.
If you're facing lagging, hangs and freezes, try switching between xrender
and glx
backend.
When you change the theme
, things like backend, shadows, blurring in picom.conf file gets overwritten by theme script.
Window Manager
The configuration of Bspwm is available in ~/.config/bspwm
. To configure Bspwm window manager, these are the files that are used :
bspwmrc
: main configuration file responsible for determining the behaviour and settings of the overall session. Edit this file to run your apps on startup, set window rules, configure workspaces, and bspwm appearance.
sxhkdrc
: Bspwm does not handle any keyboard input and instead provides the bspc
program as its interface. So, For keyboard shortcuts, a hotkey daemon sxhkd
is used. Edit this file to add/remove keybindings.
If you need any help with bspwm configuration, run :
man bspwm
in terminal.
If you need any help with sxhkd configuration, run :man sxhkd
in terminal.
When you change the theme
, things like border colors, border width, gaps and split ratio in bspwmrc file gets overwritten by the theme script.
Keybindings
Here's a list of some important keybinds you need to know for operating Bspwm easily. If you want to view, modify or add new keybinds, Edit ~/.config/bspwm/sxhkdrc
file.
Applications
Keys | Action |
---|---|
super + Return | Open terminal (alacritty) |
super + shift + Return | Open floating terminal |
super + alt + Return | Open fullscreen terminal |
super + shift + F | Open file manager (thunar) |
super + shift + E | Open text editor (geany) |
super + shift + W | Open web browser (firefox) |
Menu and Applets
Keys | Action |
---|---|
super | Open application launcher |
alt + F1 | Open application launcher |
alt + F2 | Open command runner |
super + N | Open network manager applet |
super + B | Open bluetooth applet |
super + M | Open music applet |
super + X | Open powermenu applet |
super + S | Open screenshots applet |
super + R | Open apps as root applet |
super + T | Open theme applet |
super + W | Open window applet |
Hardware Keys
Keys | Action |
---|---|
Take screenshot | |
alt + Print | Take screenshot in 5 seconds delay |
shift + Print | Take screenshot in 10 seconds delay |
ctrl + Print | Take screenshot of currently focused window |
super + Print | Take screenshot of selected area |
XF86AudioRaiseVolume | Increase volume |
XF86AudioLowerVolume | Decrease volume |
XF86AudioMute | Toggle mute speakers |
XF86AudioMicMute | Toggle mute microphone |
XF86Audio + Next/Prev/Play/Stop | Media controls (MPD) |
XF86MonBrightnessUp | Increase display brightness |
XF86MonBrightnessDown | Decrease display brightness |
Workspaces
Keys | Action |
---|---|
super + 1..8 | Switch to respective workspace |
super + shift + 1..8 | Send active window to respective workspace |
ctrl + alt + Left/Right | Switch to previous/next workspace |
super + ctrl + shift + Left/Right | Send focused window to previous/next workspace |
Window Management
Keys | Action |
---|---|
super + C | Close focued window |
super + shift + C | Kill focued window |
super + shift + H | Hide/Unhide window |
super + Left/Right/Up/Down | Change focus of the window directionally |
super + shift + Left/Right/Up/Down | Swap windows directionally |
super + alt + shift + Left/Right/Up/Down | Move floating windows directionally |
super + ctrl + Left/Right/Up/Down | Expand windows directionally |
super + alt + Left/Right/Up/Down | Shrink windows directionally |
super + H/V/Q | Split tiles horizontally / vertically / cancel |
super + ctrl + 1..9 | Preselect the ratio of tile |
super + L | Toggle Layout (Tiled/Monocle) |
super + F | Toggle fullscreen mode |
super + Space | Toggle between floating and tiled mode |
super + shift + Space | Toggle between pseudo tile and tiled mode |
super + ctrl + M/X/Y/Z | Set node flag, marked/locked/sticky/private |
alt + Tab | Change focus to next window, including floating window |
Window Manager
Keys | Action |
---|---|
ctrl + shift + R | Restart bspwm |
ctrl + shift + Q | Quit bspwm |
super + Escape | Reload Keybindings |
Misc Keys
Keys | Action |
---|---|
ctrl + alt + V | Open vim in terminal |
ctrl + alt + R | Open ranger in terminal |
ctrl + alt + H | Open htop in terminal |
ctrl + alt + M | Open ncmpcpp with album art in terminal |
ctrl + alt + L | Trigger lockscreen |
super + P | Run colorpicker |
ctrl + alt + Escape | Run xkill |
Screenshots
Desktop
Here's few screenshots of Bspwm
desktop. These'll give you an idea of the experience of Bspwm in Archcraft.
Desktop 1 | Desktop 2 | Desktop 3 | Desktop 4 |
---|---|---|---|
Desktop 5 | Desktop 6 | Desktop 7 | Desktop 8 |
---|---|---|---|
Desktop 9 | Desktop 10 | Desktop 11 | Desktop 12 |
---|---|---|---|
Desktop 13 | Desktop 14 | Desktop 15 | Desktop 16 |
---|---|---|---|
Themes
To Change the theme/style, Press SUPER + T
and select the theme/style from the applet.
- Regular
- Premium
- Random
There are 10 styles available in regular Bspwm.
Theme 1 | Theme 2 | Theme 3 | Theme 4 | Theme 5 |
---|---|---|---|---|
Theme 6 | Theme 7 | Theme 8 | Theme 9 | Theme 10 |
---|---|---|---|---|
There are 25 styles (plus infinite auto-generated themes with pywal
) available for Bspwm premium.
Theme 1 | Theme 2 | Theme 3 | Theme 4 | Theme 5 |
---|---|---|---|---|
Theme 6 | Theme 7 | Theme 8 | Theme 9 | Theme 10 |
---|---|---|---|---|
Theme 11 | Theme 12 | Theme 13 | Theme 14 | Theme 15 |
---|---|---|---|---|
Theme 16 | Theme 17 | Theme 18 | Theme 19 | Theme 20 |
---|---|---|---|---|
Theme 21 | Theme 22 | Theme 23 | Theme 24 | Theme 25 |
---|---|---|---|---|
Auto Generated themes with pywal
. This feature is only available in Bspwm premium.
Press SUPER + T
and select Random to apply a random theme.
FAQs
How to update my config to new configs?
When a new version of Archcraft Bspwm get released, And you update the system by sudo pacman -Syu
or you update the Bspwm package by sudo pacman -S archcraft-bspwm
, New config files get installed as bspwm_pacnew_YYYY-MM-DD in your ~/.config
directory.
To use new configs, backup your old ~/.config/bspwm
directory and move ~/.config/bspwm_pacnew_YYYY-MM-DD
to ~/.config/bspwm
and login again.
For
Bspwm Premium
, download the updated package from ko-fi (for free) and just install it to update to new configs.
How to open apps as root in Bspwm?
To open apps as root, Press Super + R
, select the app and type your root password to open the app.
How to change GTK theme, icons and cursor?
To change GTK theme, icons and cursor in Bspwm session, Edit ~/.config/bspwm/xsettingsd
file and restart Bspwm to apply the changes.
Net/ThemeName "Arc-Dark"
Net/IconThemeName "Arc-Circle"
Gtk/CursorThemeName "Qogirr"
How to manage multiple monitors and resolution in Bspwm?
If you use multiple monitors with Bspwm window manager, you can manage them as follow:
- Run
launcher
and type either Manager Monitors or archcraft-randr and use the app. - Edit
~/.config/bspwm/bspwmrc
file and use the relevant monitor_workspaces function. For example, In the case of two monitors, usetwo_monitors_workspaces
function.
70 ## Uncomment only one function according to your needs
71 #default_workspaces
72 two_monitors_workspaces
73 #three_monitors_workspaces
Why Alacritty is not working on my computer?
Since Alacritty is a OpenGL based terminal emulator, It may not work on some computer hardwares. You can make it work on such computers by following these methods :
- Open alacritty with LIBGL_ALWAYS_SOFTWARE=1 variable. Edit the keybindings/script launching alacritty and replace
alacritty
withLIBGL_ALWAYS_SOFTWARE=1 alacritty
- Edit /usr/share/applications/Alacritty.desktop desktop file and replace
Exec=alacritty
withExec=env LIBGL_ALWAYS_SOFTWARE=1 alacritty