Notes for bspwm and sxhkd
Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.
bspwm is the binary space tiling window manager.
sxhkd is the simple X hotkey daemon.
I’m running Alpine, bspwm, and sxhkd on my main laptop with great success and satisfaction.
These are sort of “notes to self”, not a step by step guide.
- boot extended iso
- run setup-alpine (disk = sys at the end)
- when running visudo below, you want to uncomment the wheel group
adduser sodface addgroup sodface wheel addgroup sodface audio addgroup sodface video addgroup sodface input apk add sudo && visudo apk add rng-tools && rc-update add rngd boot
- test ssh and continue
- uncomment community and testing repos in /etc/apk/repositories
sudo setup-xorg-base sxhkd bspwm bspwm-doc xf86-input-synaptics brightnessctl ttf-dejavu firefox feh xclock install -Dm755 /usr/share/doc/bspwm/examples/bspwmrc ~/.config/bspwm/bspwmrc install -Dm644 /usr/share/doc/bspwm/examples/sxhkdrc ~/.config/sxhkd/sxhkdrc
You’ll want to add a terminal. Currently I’m using xfce4-terminal but it does bring in a lot of dependencies.
sudo apk add xfce4-terminal startx /usr/bin/bspwm
The default config files were installed to ~/.config/bspwm/bspwmrc and ~/.config/sxhkd/sxhkdrc.
Config statements I’ve added to ~/.config/bspwm/bspwmrc are:
bspc rule -a XClock:*:* state=floating feh --bg-center ~/gt-wp.jpg
Where gt-wp.jpg is my desktop wallpaper. The xclock rule floats xclock in the middle of the screen and is used in conjunction with a hotkey (see below).
Config statements I’ve added to ~/.config/sxhkd/sxhkdrc are:
## my adds # laptop screen brightness up XF86MonBrightnessUp brightnessctl -q s +10% # laptop screen brightness down XF86MonBrightnessDown brightnessctl -q s 10%- # small digital clock - see bspwmrc config for rule to center float alt + c xclock -digital -brief -twelve -face 'arial black-36:bold' -fg green -bg black # kill the clock window on key up alt + @c killall xclock
The alt+c command pops up a small xclock in the middle of the screen on keydown and then kills it on key up.