Skip to main content

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.

video

Bspwm Premium

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 :

Open a terminal and run the following command to install the regular version of Bspwm :

$ sudo pacman -Sy archcraft-bspwm
Archcraft Prime

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.

warning

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.

warning

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'
warning

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

warning

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.

warning

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

info

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.

warning

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.

warning

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

KeysAction
super + ReturnOpen terminal (alacritty)
super + shift + ReturnOpen floating terminal
super + alt + ReturnOpen fullscreen terminal
super + shift + FOpen file manager (thunar)
super + shift + EOpen text editor (geany)
super + shift + WOpen web browser (firefox)
KeysAction
superOpen application launcher
alt + F1Open application launcher
alt + F2Open command runner
super + NOpen network manager applet
super + BOpen bluetooth applet
super + MOpen music applet
super + XOpen powermenu applet
super + SOpen screenshots applet
super + ROpen apps as root applet
super + TOpen theme applet
super + WOpen window applet

Hardware Keys

KeysAction
PrintTake screenshot
alt + PrintTake screenshot in 5 seconds delay
shift + PrintTake screenshot in 10 seconds delay
ctrl + PrintTake screenshot of currently focused window
super + PrintTake screenshot of selected area
XF86AudioRaiseVolumeIncrease volume
XF86AudioLowerVolumeDecrease volume
XF86AudioMuteToggle mute speakers
XF86AudioMicMuteToggle mute microphone
XF86Audio + Next/Prev/Play/StopMedia controls (MPD)
XF86MonBrightnessUpIncrease display brightness
XF86MonBrightnessDownDecrease display brightness

Workspaces

KeysAction
super + 1..8Switch to respective workspace
super + shift + 1..8Send active window to respective workspace
ctrl + alt + Left/RightSwitch to previous/next workspace
super + ctrl + shift + Left/RightSend focused window to previous/next workspace

Window Management

KeysAction
super + CClose focued window
super + shift + CKill focued window
super + shift + HHide/Unhide window
super + Left/Right/Up/DownChange focus of the window directionally
super + shift + Left/Right/Up/DownSwap windows directionally
super + alt + shift + Left/Right/Up/DownMove floating windows directionally
super + ctrl + Left/Right/Up/DownExpand windows directionally
super + alt + Left/Right/Up/DownShrink windows directionally
super + H/V/QSplit tiles horizontally / vertically / cancel
super + ctrl + 1..9Preselect the ratio of tile
super + LToggle Layout (Tiled/Monocle)
super + FToggle fullscreen mode
super + SpaceToggle between floating and tiled mode
super + shift + SpaceToggle between pseudo tile and tiled mode
super + ctrl + M/X/Y/ZSet node flag, marked/locked/sticky/private
alt + TabChange focus to next window, including floating window

Window Manager

KeysAction
ctrl + shift + RRestart bspwm
ctrl + shift + QQuit bspwm
super + EscapeReload Keybindings

Misc Keys

KeysAction
ctrl + alt + VOpen vim in terminal
ctrl + alt + ROpen ranger in terminal
ctrl + alt + HOpen htop in terminal
ctrl + alt + MOpen ncmpcpp with album art in terminal
ctrl + alt + LTrigger lockscreen
super + PRun colorpicker
ctrl + alt + EscapeRun xkill

Screenshots

Desktop

Here's few screenshots of Bspwm desktop. These'll give you an idea of the experience of Bspwm in Archcraft.

Desktop 1Desktop 2Desktop 3Desktop 4
imgimgimgimg
Desktop 5Desktop 6Desktop 7Desktop 8
imgimgimgimg
Desktop 9Desktop 10Desktop 11Desktop 12
imgimgimgimg
Desktop 13Desktop 14Desktop 15Desktop 16
imgimgimgimg

Themes

To Change the theme/style, Press SUPER + T and select the theme/style from the applet.

There are 10 styles available in regular Bspwm.

Theme 1Theme 2Theme 3Theme 4Theme 5
imgimgimgimgimg
Theme 6Theme 7Theme 8Theme 9Theme 10
imgimgimgimgimg

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:

  1. Run launcher and type either Manager Monitors or archcraft-randr and use the app.
  2. Edit ~/.config/bspwm/bspwmrc file and use the relevant monitor_workspaces function. For example, In the case of two monitors, use two_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 :

  1. Open alacritty with LIBGL_ALWAYS_SOFTWARE=1 variable. Edit the keybindings/script launching alacritty and replace alacritty with LIBGL_ALWAYS_SOFTWARE=1 alacritty
  2. Edit /usr/share/applications/Alacritty.desktop desktop file and replace Exec=alacritty with Exec=env LIBGL_ALWAYS_SOFTWARE=1 alacritty