Skip to content
/ bar Public
forked from krypt-n/bar

A lightweight xcb based bar. This is a fork that supports fontconfig, unlimited clickable areas, hovering, and longer input

License

Notifications You must be signed in to change notification settings

PH111P/bar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

lemonbar - Featherweight lemon-scented bar

SYNOPSIS

lemonbar [-h | -O | -g widthxheight+x+y | -b | -d | -f font | -p | -n name | -B color | -F color | -o offset ]

DESCRIPTION

lemonbar (formerly known as bar) is a lightweight bar entirely based on XCB. Provides full UTF-8 support, basic formatting, RandR support and EWMH compliance without wasting your precious memory.

OPTIONS

-h

Display the help and exit.

-g widthxheight+x+y

Set the window geometry. If a parameter is omitted it's filled with the default value. If the y parameter is specified along with the -b switch then the position is relative to the bottom of the screen.

-O name

Set next output to name. May be used multiple times; order is significant. If any -O options are given, only -O specified monitors will be used. Invalid output names are silently ignored. (only supported on randr configurations at this time)

-b

Dock the bar at the bottom of the screen.

-d

Force docking without asking the window manager. This is needed if the window manager isn't EWMH compliant.

-f font

Define the font to load into one of the ten slots (the number of slots is hardcoded and can be tweaked by changing the MAX_FONT_COUNT parameter in the source code). This version supports fontconfig font specifiers and anti-aliased fonts.

-a number

Set initial number of clickable areas (default is 10). Whenever the number of clickable areas is used up, the amount of clickable areas doubles.

-p

Make the bar permanent, don't exit after the standard input is closed.

-n name

Set the WM_NAME atom value for the bar.

-B color

Set the background color of the bar. color must be specified in the hex format (#aarrggbb, #rrggbb, #rgb). If no compositor such as compton or xcompmgr is running the alpha channel is silently ignored.

-F color

Set the foreground color of the bar. Accepts the same color formats as -B.

-o offset

Add a vertical offset to the text. offset must be a number and can be negative. -o -3 will push the text 3 pixels up.

FORMATTING

lemonbar provides a screenrc-inspired formatting syntax to allow full customization at runtime. Every formatting block is opened with %{ and closed by } and accepts the following commands, the parser tries its best to handle malformed input. Use %% to get a literal percent sign (%).

R

Swap the current background and foreground colors.

l

Aligns the following text to the left side of the screen.

c

Aligns the following text to the center of the screen.

r

Aligns the following text to the right side of the screen.

Owidth

Offset the current position by width pixels in the alignment direction.

Bcolor

Set the text background color. The parameter color can be - or a color in one of the formats mentioned before. The special value - resets the color to the default one.

Fcolor

Set the text foreground color. The parameter color can be - or a color in one of the formats mentioned before. The special value - resets the color to the default one.

Abutton:command:

Create a clickable area starting from the current position, when the area is clicked command is printed on stdout. The area is closed when a A token, not followed by : is encountered.

Eg. %{A:reboot:} Click here to reboot %{A}

The button field is optional, it defaults to the left button, and it's a number ranging from 1 to 7 which maps to the left, middle, right, scroll up, scroll down, hover enter, and hover leave movements. Your mileage may vary.

Nested clickable areas can trigger different commands.

Eg. %{A:reboot:}%{A3:halt:} Left click to reboot, right click to shutdown %{A}%{A}

OUTPUT

Clicking on an area makes lemonbar output the command to stdout, followed by a newline, allowing the user to pipe it into a script, execute it or simply ignore it. Simple and powerful, that's it.

WWW

git repository

AUTHOR

Original lemonbar (C) 2012-2017 by The Lemon Man.

RandR support was kindly contributed by jvvv.

Clickable areas support was heavily based off u-ra contribution.

Enhanced by PH111P.

About

A lightweight xcb based bar. This is a fork that supports fontconfig, unlimited clickable areas, hovering, and longer input

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 97.4%
  • Makefile 2.6%