limebar - Featherweight lime-scented bar. Heavily inspired by lemon bar.
limebar [-h | -g widthxheight+x+y | -c command | -b | -d | -f fonts | -p | -D | -n name | -u pixel | -B color | -F color | -U color] | -m modules
limebar is a lightweight bar based on XCB, cairo and pango. Provides full UTF-8 support, basic formatting, RandR support and EWMH compliance without wasting your precious memory. Modules can also be written to add features
- -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.
- -c text
-
Set the formating text to be used as the input as default. Usefull if you use labels.
- -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 fonts
-
Define the fonts to load. The first one in the list will be considered the default font.
- -p
-
Make the bar permanent, don't exit after the standard input is closed.
- -D
-
Duplicate the input to all the output. %s will be replace by the output name, %x by its x position and %w by its width. Those symbols can be escaped.
- -n name
-
Set the WM_NAME atom value for the bar.
- -u pixel
-
Sets the underline width in pixels. The default is 1.
- -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.
- -U color
-
Set the underline color of the bar. Accepts the same color formats as -B.
- -m modules
-
List of modules to load. Modules add features and can be written by inhereting from Module, and compile it into a separate shared library.
limebar 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 it's best to handle malformed input. %{
can be escaped. limebar also ascept command that are not rendered. They are enclosed by %[
and ]
. Those character can be escaped.
Pre render formatting block
- L:label:value:
-
Set label label to hold value.
Render formatting block
- |
-
Draw a vertical line.
- m
-
Replaced by the name of the current monitor.
- 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 enclosed by :. 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 enclosed by :. The special value - resets the color to the default one.
- Ucolor
-
Set the text underline color. The parameter color can be - or a color in one of the formats mentioned before enclosed by :. The special value - resets the color to the default one.
- Tfont
-
Set the font used to draw the following text. The parameter font can either be - or the pango description of the font enclosed by :. If the parameter is - limebar resets to the default font.
- I:image:
-
Display an image on the bar resized so the height fits the bar.
-
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 9 which maps to the left, middle, right, scroll up and scroll down movements. Your mileage may vary.
W field is optional, it will output the position of the clickable area after the command.
Nested clickable areas can trigger different commands.
Eg. %{A:reboot:}%{A3:halt:} Left click to reboot, right click to shutdown %{A}%{A}
- L:label:
-
Use a label (display the text associated to the label).
- S:dir:
-
Change the monitor the bar is rendered to. dir is the name of the monitor
Attribute modifiers
- +attribute
-
Set the attribute attribute for the following text.
- -attribute
-
Unset the attribute attribute for the following text.
- !attribute
-
Toggle the attribute attribute for the following text.
Where attribute is one of the following
- o
-
Draw a line over the text.
- u
-
Draw a line under the text.
limebar can use a config file (located at .config/limebar/limebarrc) that uses Xresources syntax:
limebar.foreground: the default foreground color of the bar (color)
limebar.background: the default background color of the bar (color)
limebar.underline: the default underline color of the bar (color)
limebar.bottom: should the bar be displayed on the bottom (boolean)
limebar.dock: force dock (boolean)
limebar.font: default font (string, pango format)
limebar.permanent: should the bar be permanent (boolean)
limebar.duplicate: should the input be duplicated to all the outputs
limebar.wm-name: WM_NAME atom value for the bar (string)
limebar.underline: size of the underline (unsigned int)
limebar.geometry: geometry of the bar. Format : widthxheight+x+y. Some of the parameter can be left empty.
Clicking on an area makes limebar 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.
Heavily based on the work of:
2012-2015 (C) The Lemon Man
RandR support was kindly contributed by jvvv
Clickable areas support was heavily based off u-ra contribution
Modification by notfound404