berry
A healthy, bite-sized window manager written in C over the XLib library.
Description
berry is a floating window manager that responds to X events and manages window decorations.
berryc is a small client that sends X events to manage windows and configuration settings.
Much like bspwm and windowchef, berry does not handle keyboard inputs.
Instead, a program like sxhkd is needed to translate input events to berryc commands.
Installation
First, install the XLib C headers on your distribution. On Ubuntu/Debian, for example, they are available as libx11-dev
Clone the repository and make it
git clone https://github.com/JLErvin/berry
cd berry
make
sudo make installCopy the sample configuration files (assuming your are in the berry directory)
mkdir $HOME/.config/berry
cp example/sxhkdrc $HOME/.config/berry/sxhkdrc
cp example/autostart $HOME/.config/berry/autostartIf you are not using a display manager add the following to your .xinitrc
sxhkd -c $HOME/.config/berry/sxhkdrc &
exec berryIf you are using a display manager (lightdm, etc), create a file berry.desktop in /usr/share/xsessions/
[Desktop Entry]
Encoding=UTF-8
Name=berry
Comment=berry - a small window manager
Exec=berry
Type=XSessionArch Linux users can download via the AUR: berry
yay -S berry-gitUsage
berry relies on a program like sxhkd to handle keypress events.
You can use man berryc to view available commands and bind them to
your favorite keystrokes in sxhkdrc.
berry now supports moving windows using the mouse.
To use this feature, you must be using sxhkd version 0.5.5 or earlier.
Use the following bindings in your sxhkdrc to allow moving windows using the pointer:
# Focus a window by clicking, no modifier needed
~button1
berryc pointer_move 0
# Move windows by holding down alt
alt + ~button1
berryc pointer_move 1
# Needed to update berry's internal state
alt + @button1
berryc pointer_move 2berry also supports multi-monitor setups.
This feature is implemented by associating workspaces to monitors through berryc.
For example, to have workspace 3 always appear on monitor 1, you could add:
berryc save_monitor 3 1To your autostart. To determine which monitors are associated to which screen, you can use xrandr:
xrandr --listmonitors
Features
- Multiple desktops
- Keyboard-drive resizing and movement
- Command line client to control windows and decorations
- Double borders
- Title bars
- Left/right snapping
- Fullscreen/monocle mode
TODO
- Titlebar window text
- Add more EWMH/ICCCM protocols
Credits
Although I wrote berry on my own, it was inspired by people much smarter than I.
A very special thanks to the following people for writing great code and open-sourcing it!
- Tudurom's windowchef
- Vain's katriawm
Contributors
Special thanks to the following people for contributing:
- Kyle G: AUR Package Maintainer
Additional Screenshots
Double borders with titlebars:
Monocle Mode


