Skip to content
🍓 A healthy, bite-sized window manager written over the XLib Library
Branch: master
Clone or download
JLErvin Merge pull request #14 from aesophor/patch-1
ipc: fixed a typo in include guard
Latest commit 90603b7 Mar 5, 2019

README.md

berry


A healthy, bite-sized window manager written in C over the XLib library.

Screenshot

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 install

Copy 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/autostart

If you are not using a display manager add the following to your .xinitrc

sxhkd -c $HOME/.config/berry/sxhkdrc &
exec berry

If 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=XSession

Arch Linux users can download via the AUR: berry

yay -S berry-git

Usage

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 2

berry 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 1

To 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!

Contributors

Special thanks to the following people for contributing:

  • Kyle G: AUR Package Maintainer

Additional Screenshots

Double borders with titlebars:

Imgur

Monocle Mode

Imgur

You can’t perform that action at this time.