PRIMARY CATEGORY → SETUP

bspwm → Binary Space Partitioning Window Manager

bspwm is launched as a process and It receives as an argument a socket on which to listen

$ pgrep --list-full --exact bspwm
2604 bspwm -s /tmp/bspwm_0_0-state -o 4 # Note -s option argument
$ file /tmp/bspwm_0_0-socket
/tmp/bspwm_0_0-socket: socket

bspc binary writes messages to bspwm’s socket. Those messages are all the commands executed in bspwmrc init file

$ command -V bspc
bspc is /usr/local/bin/bspc

This Windows Manager generates and divides each OS Window in half (Binary Partitioning)

OS Windows Layouts/States

There are several types of OS Windows Layouts →

  • Tiled
  • Monocle
  • Floating
  • Full-Screen

Configuration File → ~/.config/bspwm/bspwmrc

More information here


Installation

First of all, install the following requirements →

$ sudo apt install -y -- build-essential git vim xcb libxcb-util0-dev libxcb-ewmh-dev libxcb-randr0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-xinerama0-dev libasound2-dev libxcb-xtest0-dev libxcb-shape0-dev

Clone the bspwm’s Github Repository

$ cd ~/Downloads
$ git clone https://github.com/baskerville/bspwm.git bspwm
$ cd !$ # cd ~/Downloads/bspwm
$ make
$ sudo make install

That’s it

$ command -V bspwm
bspwm is /usr/local/bin/bspwm
Configuration Files

Create the ~/.config/bspwm directory and store the bspwmrc configuration file in it

$ mkdir -p ~/.config/bspwm
$ cp ~/Downloads/bspwm/examples/bspwmrc !$
Source/Binary Files

Same as above, but as follows →

$ mkdir -p ~/.config/bspwm/{bin,src}
$ touch ~/.config/bspwm/bin/bspwm_resize.sh
$ chmod +x !$
$ touch ~/.config/bspwm/src/bspwmrc.sh

Just copy the following files’ content and paste into the above created ones →


Configuration Files

Two files are required →

  • ~/.config/bspwm/bspwmrcbspwm’s Configuration File
  • ~/.config/bspwm/src/bspwmrc.shbspwmrc sources it
bspwmrc

See here

src/bspwmrc.sh

See here


Binary Files

One file is required →

  • ~/.config/bspwm/bin/bspwm_resize.shsxhkd relates a specific input event (Hotkey) to this script execution
bin/bspwm_resize.sh

See here