Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Bar specific options

NBonaparte edited this page Feb 3, 2017 · 1 revision

Each bar can have its own font, position (currently only top and bottom), background color, height, horizontal and vertical gaps, and other options.

  • Font: accepts a string that contains a font or a list of fonts (similar to i3).
font: "Droid Sans, FontAwesome Bold 9";
  • Position: position of the bar. Yabar currently supports top and bottom.
position: "top";
  • Gaps: define the size of horizontal and vertical gaps in pixels (default is zero).
gap-horizontal: 20;
gap-vertical: 5;
  • Height: height of the bar (default is 20 pixels).
height: 25;
  • Width: default bar width is screen size - 2 * horizontal gap. However, if this option is used, the bar starts at horizontal gap and ends at horizontal gap + width. Example:
width: 800;
  • Monitor: specify the monitor using randr extension for the bar to be drawn on. Find the name of your monitors using xrandr -q command. The default value is the first active monitor.
monitor: "VGA1";
  • Underline and overline sizes: This option defines the thickness of underlines and overlines (default is 0).
underline-size: 2;
overline-size: 2;
  • Slack: define the size of the slack, i.e. the unused space between blocks (default is zero).
slack-size: 2;
  • Borders: optionally define a size and color for a border surrounding the bar (default is zero).
border-size: 2;
border-color-rgb: 0xffffff;
  • No-window color: This optional and beautiful feature is intended to change the color of the bar when there is no active window in the current desktop/workspace. Just add the ARGB color and notice how the background color of the bar switches to this color when all windows in the current desktop are closed or when you switch to an empty desktop.
background-color-nowindow-argb: 0xff430343;
  • Inheritance: As the config file gets larger because you want to add several bars, you may find yourself adding many identical option values for every added bar. This optional entry is added in order to inherit the options from a precedent bar into your next bar. You can also override the inherited options with new values.
# inherit bar-specific options:
inherit: "bar1";
# inherit bar-specific options along with all blocks and their block-specific options:
inherit-all: "bar1";
  • Button commands: Yabar already supports mouse button commands for each block (see [block-specific options]). Moreover, yabar seeks to make the entire bar clickable even if the pressed area does not belong to any block or the corresponding button command for that block is not defined. Example:
command-button4: "xbacklight -inc 1";
command-button5: "xbacklight -dec 1";
Clone this wiki locally