You are not logged in.
bspwm is a hybrid tiling window manager that represents windows as the leaves of a full binary tree.
https://github.com/baskerville/bspwm
It uses XCB rather than Xlib and this makes it blazingly fast, even for a tiler.
It is designed to automate window handling and maximise the use of screen real estate and is controlled through keybindings and the `bspc` command.
Much like Openbox, bspwm does not include a panel and I have found that it plays very nicely with tint2 thanks to full EWMH compliance.
Unfortunately, bspwm is not available in the Debian repositories and so must be installed from source.
I have created a custom repository containing pre-built binaries of these programs that are suitable for use in BunsenLabs Hydrogen or Debian jessie if you prefer not to install manually.
First, install all of the dependencies:
sudo apt install git gcc make xcb libxcb-util0-dev libxcb-ewmh-dev libxcb-randr0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-xinerama0-dev libasound2-dev libxcb-xtest0-dev
Then clone the repositories:
git clone https://github.com/baskerville/bspwm.git
git clone https://github.com/baskerville/sxhkd.git
git clone https://github.com/baskerville/xdo
Then build the packages:
cd sxhkd && make && sudo make install
cd ../xdo && make && sudo make install
cd ../bspwm && make && sudo make install
There are only four executables (bspwm, bspc, sxhkd & xdo) and they are all placed in /usr/local/bin
bspwm 0.9.2
sxhkd 0.5.6
xdo 0.5.2
To add the repository to your sources, use:
sudo tee /etc/apt/sourceslist.d/HoaS.list <<< 'deb http://download.opensuse.org/repositories/home:/Head_on_a_Stick:/bspwm/Debian_8.0/ /'
This creates a file at /etc/apt/sources.list.d/HoaS.list with the repository line, simply delete this file if you ever want to remove the repository.
Then update the APT package database:
sudo apt update
Then install the packages:
sudo apt install bspwm sxhkd xdo
I will update the packages as upstream make the releases and these should be delivered as part of the regular `apt update && apt upgrade` routine.
Copy over the configuration files:
mkdir -p ~/.config/{bspwm,sxhkd}
cp /usr/share/doc/bspwm/examples/bspwmrc ~/.config/bspwm
cp /usr/share/doc/bspwm/examples/sxhkdrc ~/.config/sxhkd
~/.config/sxhkd/sxhkdrc controls the keybindings and ~/.config/bspwm/bspwmrc contains the general configuration.
Modify these to your tastes according to bspwm(1) and sxhkd(1)
A list of all the variables that can be used in bspwmrc can be found in the "Settings" section of https://github.com/baskerville/bspwm
The keybinds are all listed clearly in sxhkdrc and the syntax is very simple.
The default configuration starts urxvt with <Win>+<Return> and starts dmenu with <Win>+<Spacebar>
Tint2 and any other desired autostart programs such as volti & xfce4-power-manager can be added to ~/.config/bspwm/bspwmrc
Here is an example file:
# ~/.config/bspwm/bspwmrc
#! /bin/sh
bspc config border_width 1
bspc config window_gap 0
bspc config split_ratio 0.5
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focus_by_distance true
bspc monitor -d I II III
bspc rule -a Gimp state=floating follow=on
bspc rule -a Mplayer2 state=floating
bspc rule -a Lxappearance state=floating
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off
bspc config focused_border_color "#00aacc"
bspc config normal_border_color "#222222"
bspc config urgent_border_color "#ff0000"
bspc config focus_follows_pointer true
bspc config bottom_padding 30
xset s 300
xrdb ~/.Xdefaults
urxvtd -q -f -o
synclient tapbutton1=0 tapbutton2=0 tapbutton3=0 verttwofingerscroll=0 vertedgescroll=1 horizedgescroll=1 horizscrolldelta=10
sh ~/.fehbg
xfce4-power-manager
compton --backend glx --vsync opengl-mswc &
volti &
tint2 &
sxhkd &
The "bspc config bottom_padding" line clears a space for tint2 (30 pixels high and at the bottom in my set up).
Make sure that this line is present to start the keybind daemon:
sxhkd &
If you have problems with slow window resizing when using the mouse (<Win>+<right-click> & drag), use:
sxhkd -f 100 &
To select bspwm as your window manager, add it to /etc/alternatives as x-session-manager with a high priority:
sudo update-alternatives --install /usr/bin/x-session-manager x-session-manager $(which bspwm) 90
This will start bspwm if "Default Xsession" is selected from LightDM or if `startx` is run from the console.
To reset the default window manager, use:
sudo update-alternatives --config x-session-manager
To add tab-completion for the `bspc` command and it's options (very useful indeed), add the content of {bash,zsh}_completion to your shell configuration file:
cat contrib/bash_completion >> ~/.bashrc # for BASH users
cat contrib/zsh_completion >> ~/.zshrc # for zsh users
There is no menu -- I use dmenu (via a keybind in sxhkdrc), which works very well.
Alternatively, a tint2 launcher could be used to start 9menu or similar.
There is also the possibility or using xfce4-panel instead of tint2 to take advantage of the menu plugin(s).
https://forums.bunsenlabs.org/viewtopic … 7005#p7005
This is the fastest and lightest window manager I have used so far:
empty@BunsenLab ~ % sudo ps-mem|grep bspwm
432.0 KiB + 78.0 KiB = 510.0 KiB bspwm
empty@BunsenLab ~ % sudo ps-mem|grep openbox
3.0 MiB + 1.5 MiB = 4.5 MiB openbox
Enjoy!
man bspwm bspc sxhkd xdo lemonbar
https://github.com/smlb/dotfiles/wiki/Bspwm
https://github.com/windelicato/dotfiles … or-dummies
https://wiki.archlinux.org/index.php/Bspwm
Last edited by Head_on_a_Stick (2016-04-17 11:45:28)
Offline
This looks pretty promising. I might have to try this soon.
Feel free to contact me through XMPP and Email. | Github.
Offline
I might have to try this soon.
Offline
Hauffi wrote:I might have to try this soon.
But it'll ruin the "Bunsen theme"
Edit: Also, do you think this would integrate well into Bl, and what your screen resolution?
Last edited by Hauffi (2015-11-08 02:56:00)
Feel free to contact me through XMPP and Email. | Github.
Offline
do you think this would integrate well into Bl, and what your screen resolution?
I'm using it right now and it works fantastically well as a straight drop-in replacement for Openbox.
There is no built in menu (I use dmenu) and windows are controlled from keybindings -- as long as you don't mind that, it works superbly.
The only window decoration is a single-pixel border (in my set up) so everything matches just fine.
The resolution on my BL system is 1280x800
Offline
I am also using this at present, however when you are comparing memory usage with other wm's I think we should also remember the memory that tint2 or some other bar will use compared to some other light wm's with a bar included like Snapwm or Spectrwm or DWM.
If you don't want any bar then of course that argument doesn't hold!
Offline
when you are comparing memory usage with other wm's I think we should also remember the memory that tint2 or some other bar will use compared to some other light wm's with a bar included like Snapwm or Spectrwm or DWM
Very true; anyway I was cheating 'cos sxhkd needs to run as well:
empty@BunsenLab ~ % sudo ps-mem|grep 'bspwm\|sxhkd'
328.0 KiB + 72.5 KiB = 400.5 KiB sxhkd
424.0 KiB + 86.0 KiB = 510.0 KiB bspwm
]:D
Offline
@HoaS, have you thought about Debianizing those packages, meaning are there any Debian patches that get left out by just running make/make install?
-edit- I found a Reddit thread that claims it was easy to do for the bspwm package...
https://www.reddit.com/r/debian/comment … debian_80/
And the sxhkd package is doable too...
https://launchpad.net/~peppermintos/+ar … hive-extra
And there are the Don'tBreakDebian warnings to consider (see your sig!)
- second edit - I understand that `sudo make install` only installs 3 executables in this case, I'm just trying to learn more about the risks of `sudo make install` and the advantages of dh_make, checkinstall, quilt, etc... Maybe this should be it's own thread if we start going into detail about it.
I don't care what you do at home. Would you care to explain?
Offline
@HoaS, have you thought about Debianizing those packages, meaning are there any Debian patches that get left out by just running make/make install?
Yes, you must be a mind-reader -- I'm looking into it now.
Watch this space...
EDIT: Done!
Here are the AMD64 .deb files:
EDIT3: See OP
I will add this to the OP when I have time to set up a 32-bit container and build those .debs as well.
EDIT2: lintian(1) likes them!
Exit status of zero
8)
empty@BunsenLab ~ % apt-cache show bspwm sxhkd
Package: bspwm
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 127
Maintainer: $ME <REDACTED>
Architecture: amd64
Version: 0.9-1
Depends: libc6 (>= 2.10), libxcb-ewmh2 (>= 0.4.1), libxcb-icccm4 (>= 0.4.1), libxcb-randr0 (>= 1.3), libxcb-util0 (>= 0.3.8), libxcb-xinerama0, libxcb1
Description: Tiling window manager
bspwm is a tiling window manager that represents the windows as the leaves of a full binary tree.
It is controlled and configured via bspc
Description-md5: 1f075ef0b8b38c483284a521f240404f
Homepage: https://github.com/baskerville/bspwm
Package: sxhkd
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 89
Maintainer: $ME <REDACTED>
Architecture: amd64
Version: 0.9
Depends: libc6 (>= 2.10), libxcb-keysyms1 (>= 0.4.0), libxcb1
Description: Simple X hotkey daemon
A simple X hotkey daemon with a powerful and compact configuration syntax
Description-md5: 5168ebc16a092a2b80bc4546566d3664
Homepage: https://github.com/baskerville/sxhkd
The versioning is wrong but I'll fix that.
Last edited by Head_on_a_Stick (2015-11-08 21:11:26)
Offline
bspwm is a tiling window manager that represents windows as the leaves of a full binary tree.
it is also capable of manual tiling so a user is not limited to the default binary tree layout
@hhh - the benefit of using the git repository is that development of bspwm is still pretty fast ( bspwm thread on arch so a deb package will get old pretty fast.
You must unlearn what you have learned.
-- yoda
Offline
@hhh - the benefit of using the git repository is that development of bspwm is still pretty fast ( bspwm thread on arch so a deb package will get old pretty fast.
Fair enough, but BunsenLabs is based on Debian stable and we're trying to promote best practices for maintaining a stable system.
People wanting to always having bleeding edge software would probably be happier running... well, Arch! 8o
I don't care what you do at home. Would you care to explain?
Offline
PackRat wrote:@hhh - the benefit of using the git repository is that development of bspwm is still pretty fast ( bspwm thread on arch so a deb package will get old pretty fast.
Fair enough, but BunsenLabs is based on Debian stable and we're trying to promote best practices for maintaining a stable system.
People wanting to always having bleeding edge software would probably be happier running... well, Arch! 8o
+1
You must unlearn what you have learned.
-- yoda
Offline
Well, I have the .debs above and bspwm is in Arch [community] so I'll know when to update them.
The code base is so simple that I think the OpenBSD approach should be applied here -- the newest version is the best.
8)
Also, it's my "daily driver" now so any problems should be apparent pretty quickly.
Offline
shot-in-the-head wrote:when you are comparing memory usage with other wm's I think we should also remember the memory that tint2 or some other bar will use compared to some other light wm's with a bar included like Snapwm or Spectrwm or DWM
Very true; anyway I was cheating 'cos sxhkd needs to run as well:
empty@BunsenLab ~ % sudo ps-mem|grep 'bspwm\|sxhkd' 328.0 KiB + 72.5 KiB = 400.5 KiB sxhkd 424.0 KiB + 86.0 KiB = 510.0 KiB bspwm
]:D
Actually I use sxhkd with all my window managers so I don't count that
Offline
Bump!
The bspwm creator is a very busy person so I am updating this package every few days.
The latest is for today (2015-11-14) -- check the "edited by" note in the OP (and the name of the .deb) for the most recent version.
For the record, the version in the Arch repositories is ancient...
Offline
Last time I looked at it, it was not fully EWMH compliant, as discussed in 2 issues reported here describing poor interaction with tint2:
https://gitlab.com/o9000/tint2/issues?label_name=bspwm
Maybe it happens to work on your config? Or have things changed in the meantime?
Last edited by o9000 (2015-11-14 23:27:04)
Offline
@o9000 -- thank you for the information, that is very interesting.
I was simply quoting from the man page in respect of EWMH compliance, I don't have the ability to critically analyse the code base.
EDIT: Looking at it again, I see it lists "EWMH support" under "Key Features" but does not claim full compliance.
I am running the latest MASTER from git (updated today, latest commit 2 days ago) and the author is actively developing the software at a rapid pace.
In my system, I have no problems with the mouse when switching workspaces using tint2 but I do not have access to any monitors (I only have laptops) so I cannot comment on the multi_desktop mode problems.
Last edited by Head_on_a_Stick (2015-11-15 00:35:58)
Offline
When I first tried this wm I found the bar setup complicated,why 3 or 4 files to get a working bar with clickable tags?
I ended up putting all my configs into one script and it works fine for me.
got my inspiration from
http://blog.codezen.org/2015/03/13/on-bspwm-tweaking/
#!/bin/bash
PANEL_FIFO="$HOME/.config/bspwm/panfifo"
PANEL_HEIGHT="18"
PANEL_FONT_FAMILY="-*-terminus-medium-r-normal-*-12-*-*-*-c-*-*-1"
# Kill the panel if it is currently running
if [ $(pgrep -cx lemonbar) -gt 1 ] ; then
printf "%s\n" "The panel is already running."
while [[ $(pgrep -c "lemonbar") != 0 ]]
do
pkill -n -9 "lemonbar"
done
fi
trap 'trap - TERM; kill 0' INT TERM QUIT EXIT
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO"
mkfifo "$PANEL_FIFO"
bspc config top_padding $PANEL_HEIGHT
bspc control --subscribe > "$PANEL_FIFO" &
## colors, in the format "#<alpha><rr><gg><bb>" ##
#color must be specified in the hex format (#aarrggbb, #rrggbb, #rgb). If no compositor such as compton or xcompmgr is running the alpha channel (first 2 digits) is silently ignored.
color_fg="#8D0BB7" # bar foreground
color_bg="#2B2B2B" # bar background
# colors for workspaces
ORANGE="#F49926" # focused & occupied
MDGREY="#BEBEBE" # focused & empty
LGTGREY="#C4C4C4" # unfocused & empty
MDBLUE="#94BFF3" # unfocused & occupied
RED="#F70617" # focused & urgent
ULINE="#D0C509"
DGREY="#585858"
GRN="#6ECF8E"
TAN="#DBC152"
VLT="#BE72DB"
#color_01="#F49926" # focused & occupied
#color_02="#C4C4C4" # focused & empty
#color_03="#F70617" # focused & urgent
#color_04="#ff94bff3" # unfocused & occupied
#color_05="#C4C4C4" # unfocused & empty
#color_06="#ffff0000" # unfocused & urgent
## bar options ##
fonts="-*-terminus-medium-r-normal-*-12-*-*-*-c-*-*-1,\
lucida-bold-i-normal-sans-12-120-75-75-p-79-iso8859-1"
geometry="1100x18" # in the format "<width>x<height>+<xoffset>+<yoffset>"
# --------------------
modules() {
# bspwm stats
bspc control --subscribe > "$PANEL_FIFO" &
# date & time
while true; do
date +"c${i_date} %{F$TAN}% %a·%d·%b ${i_time} %I:%M"
sleep 4
done > "$PANEL_FIFO" &
}
parse-module-output() {
while read -r line ; do
case $line in
c*)
# set up clock
clock="${line#?}" ;;
W*)
# set up tags
wm_infos=""
IFS=':'
set -- ${line#?}
while [ $# -gt 0 ] ; do
item=$1
name=${item#?}
desk=" $name "
case $item in
O*)
# focused occupied desktop
# wm_infos="$wm_infos %{U$COLOR_ACTIVE}%{+u} %{-u}"
wm_infos="$wm_infos%{F$ORANGE}%{B$DGREY}%{U$ULINE}%{+u}%{A:bspc desktop -f $name:}$desk%{-u}%{B-}%{F-}%{A}" ;;
F*)
# focused empty desktop
wm_infos="$wm_infos%{F$MDGREY}%{+u}%{A:bspc desktop -f $name:}$desk%{-u}%{A}" ;;
U*)
# focused urgent desktop
wm_infos="$wm_infos%{F$RED}%{A:bspc desktop -f $name:}$desk%{A}" ;;
o*)
# occupied desktop
wm_infos="$wm_infos%{F$MDBLUE}%{A:bspc desktop -f $name:}$desk%{A}" ;;
f*)
# unfocused & empty
wm_infos="$wm_infos%{F$LGTGREY}%{A:bspc desktop -f $name:}$desk%{A}" ;;
u*)
# urgent desktop
wm_infos="$wm_infos%{F$RED}%{A:bspc desktop -f $name:}$desk%{A}" ;;
m*|M*)
# monitor seperator
wm_infos="$wm_infos%{F-} " ;;
L*)
# layout
wm_infos="$wm_infos %{F$VLT}%{B$DGREY} ${name} %{B-}" ;;
esac
shift
done ;;
esac
printf "%s\n" "%{c} $wm_infos $clock"
done
}
# run module commands
modules &
parse-module-output < "$PANEL_FIFO" | lemonbar -p -f "$fonts" -B "$color_bg" -F "$color_fg" -g "$geometry" | while read line; do eval "$line"; done &
wait
Last edited by shot-in-the-head (2015-11-22 11:40:33)
Offline
^ That is lovely, thanks for sharing.
I tried an early version of lemonbar (back when it was called BAR) but the XCB version wasn't stable enough for me.
I'll have to look at it again.
Offline
Thanks for this, HoaS. I'm not into tilers that much, but all this deserves a good reading (and copy paste into my docs)
@shot-in-the-head: awesome! thanks!
Last edited by Snap (2015-11-23 09:36:23)
Offline