Go to file
Bill Kolokithas 4e1d114f4e check return value of fgets and exit main loop if EOF is received 2014-02-05 00:36:14 +02:00
.gitignore add .gitignore file - ignore tmp, object and executable files 2012-07-17 14:56:52 +03:00
LICENSE Format LICENSE correctly 2012-07-24 12:08:12 +02:00
Makefile utf-8 fixes! Replaced wchar_t with uint16_t. -O2 doesn't increase the binary size that much so let's go for it. 2014-01-26 13:13:49 +00:00
README.md Add Xinerama explanation in the readme 2013-10-02 08:21:43 +00:00
bar.c check return value of fgets and exit main loop if EOF is received 2014-02-05 00:36:14 +02:00
config.def.h Add transparency support. Reworked EWMH stuff, fixes #20. 2013-09-02 13:35:32 +00:00
palette.pl Fix issue #22 2013-09-30 16:03:36 +00:00

README.md

b(ar) a(in't) r(ecursive)

2012-2013 (C) The Lemon Man

A lightweight bar based on XCB (yay). Provides foreground/background color switching along with text alignment (screw you dzen!), full utf8 support and reduced memory footprint. It also supports transparency when using a compositor such as compton. Nothing less and nothing more.

Xinerama support

Thanks to @Stebalien now bar is Xinerama compliant, just compile it with XINERAMA=1 and you're good to go!

Options

bar accepts a couple of command line switches.

-h      Show the help and bail out.
-p      Make the bar permanent.
-f      Force docking (use this if your WM isn't EWMH compliant)
-b      Show the bar at the bottom of the screen.

Configuration

Change the config.h file and you're good to go! The text background and foreground are respectively the first and the second entries in the palette (COLOR0 and COLOR1).

Colors

Attached there's palette.pl, an handy tool that extracts a palette from your X colors and returns it ready to be pasted in the configuration file.

palette.pl <.Xresources / .Xdefaults path>

If you keep your colors in a separate file just feed that file and you're good to go.

Text formatting

All the format commands are preceded by a backslash (\). To draw a backslash just backslash escape it (\\).

f<0-9>  Selects the text foreground color from the palette.
b<0-9>  Selects the text background color from the palette.
u<0-9>  Selects the underline color from the palette.
        To reset the bg/fg/underline color just pass 'r' as the color index.

l       Aligns the text to the left.
c       Aligns the text to the center.
r       Aligns the text to the right.

The options below are valid only if compiled with Xinerama support.

s<0-9>  Switches to screen 0-9
sn      Switches to next screen
sp      Switches to previous screen
sr      Switches to the rightmost screen (the latest)
sl      Switches to the leftmost screen (the first)