A healthy, bite-sized window manager written in C over the XLib library.
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.
First, install the XLib and Xft C headers on your distribution. On Ubuntu/Debian, install the following packages:
libx11-dev
libxft-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-gitberry is controlled by its client program berryc.
Upon startup, berry will run the file autostart, located by default
in XDG_CONFIG_HOME/berry/autostart.
A sample autostart has been included to help you, please see the installation section.
berry does not handle keyboard input on its own.
Instead, a program like sxhkd is needed to translate keypress events into commands.
berry is controlled through its client, berryc.
The window manager can be controlled using the following commands:
window_movex y- move the current window by x and y, relatively
window_move_absolutex y- move the current window to x and y
window_resizew h- resize the current window by w and h, relatively
window_resize_absolutew h- resize the current window to w and h
window_raise- raise the given window
window_monocle- set the current window to fill the screen, maintains decorations
window_close- close the current window
window_center- center the current window, maintains current size
switch_workspacei- switch view to the given workspace
send_to_workspacei- send the current window the given workspace
fullscreen- set the current window to fill the screen, removes decorations
snap_left- snap the given window to the left side of the screen and fill vertically
snap_right- snap the given window to the left side of the screen and fill vertically
cardinal_focus1/2/3/4- change focus to the client in the specified direction
toggle_decorations- toggle decorations for the current client
cycle_focus- change focus to the next client in the stack
pointer_focus- focus the window under the current pointer (used by
sxhkd)
- focus the window under the current pointer (used by
smart_place0/1- place newly created windows in unoccupied regions of the screen. Otherwise center the client.
All of these commands can also be viewed on your system via man berryc
berry supports the use of multiple monitors.
Monitors are associated with workspaces.
To associate a monitor with a specific workspace, using the following berryc command:
save_monitori j- Associate the ith workspace to the jth monitor
The number associated with each monitor can be determined through an application like xrandr.
The following command will list all monitors and their associated numbers:
xrandr --listmonitorsberryc also controls the appearance of berry.
The following commands are available:
focus_colorXXXXXX- Set the color of the outer border for the focused window
unfocus_colorXXXXXX- Set the color of the outer border for all unfocused windows
inner_focus_colorXXXXXX- Set the color of the inner border and title bar for the focused window
inner_unfocus_colorXXXXXX- Set the color of the inner border and title bar for all unfocused windows
text_focus_colorXXXXXX- Set the color of the title bar text for the focused window
text_unfocus_colorXXXXXX- Set the color of the title bar text for the unfocused window
border_widthXXXXXX- Set the border width, in pixels, of the outer border
inner_border_widthXXXXXX- Set the border width, in pixels, of the inner border
title_heightXXXXXX- Set the height of the title bar, does not include border widths
top_gapXXXXXX- Set the offset at the top of the monitor (usually for system bars)
Please note that for the previous commands, XXXXXX represents a hex color
without the leading #.
All of these commands can also be viewed on your system via man berryc
berry now supports title bar text that describes the contents of its respective window.
By default, this font is defined by font-config's default monospace font.
To check what font this is, you can simply run:
fc-match monospaceDue to limitations on the X server, the font cannot be changed from berryc.
If you wish to use a font other than the default monospace one, simply change
the DEFAULT_FONT value located inside of src/config.h and recompile berry.
Upon logging out/back into an X session, you should see the changes.
- Multiple desktops
- Keyboard-drive resizing and movement
- Command line client to control windows and decorations
- Double borders
- Title bars with text
- Left/right snapping
- Fullscreen/monocle mode
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
Special thanks to the following people for contributing:
- Kyle G: AUR Package Maintainer
Double borders with titlebars:
Monocle Mode


