yambar(5)

πŸ’– NAME πŸ’–

okay bestie, welcome to yambar(5) from the File Formats Manual β€” this is the manual page for the yambar configuration file, and it's giving iconic setup-doc energy fr fr πŸ’…

✨ DESCRIPTION ✨

A yambar configuration file is a yaml formatted document containing an associative array named bar. You may define other top-level entities and reference them using anchors β€” yes, anchors, the little YAML besties that let you reuse stuff without copy-pasting like a menace 🫢

Besides the normal yaml types, there are a couple of yambar specific types that are frequently used:

  • font β€” this is a comma separated list of fonts in fontconfig format. Example of valid values:
    • Font Awesome 6 Brands
    • Font Awesome 6 Free:style=solid
    • Dina:pixelsize=10:slant=italic
    • Dina:pixelsize=10:weight=bold
  • color β€” an rgba hexstring; RRGGBBAA. Examples:
    • ffffffff: white, no transparency
    • 000000ff: black, no transparency
    • 00ff00ff: green, no transparency
    • ff000099: red, semi-transparent

Like, the color format is literally RRGGBBAA, so the last two characters are the transparency vibe β€” no cap, that detail matters 🌈✨

✨ FORMAT ✨

okay bestie, this is the whole top-level lineup for your bar config β€” like the main character settings that control the entire vibe πŸ’… every single one is right here, no skips, no cap.

  • height (int, required) β€” how tall your bar is, in pixels. and ngl, this does not include the border, the border is extra πŸŽ€
  • location (enum, required) β€” where the bar lives. one of top or bottom, pick your fighter
  • background (color, required) β€” the background color, literally the canvas of your bar ✨
  • monitor (string, optional) β€” which monitor to place the bar on. if you don't specify, the primary monitor gets it πŸ–₯️
  • layer (string, optional) β€” which layer to put the bar on. one of overlay, top, bottom or background. Wayland only. default: bottom.
  • left-spacing (int, optional) β€” space, in pixels, added before each module
  • right-spacing (int, optional) β€” space, in pixels, added after each module
  • spacing (int, optional) β€” the short-hand for setting both left-spacing and right-spacing at once. efficiency queen πŸ‘‘
  • left-margin (int, optional) β€” left-side margin, in pixels
  • right-margin (int, optional) β€” right-side margin, in pixels
  • margin (int, optional) β€” short-hand for setting both left-margin and right-margin together
  • border (associative array, optional) β€” configures the border around the status bar. it's giving frame energy πŸ–ΌοΈ and it's got its own lil' crew of keys:
    • border.left-width (int, optional) β€” width of the border on the left side, in pixels
    • border.right-width (int, optional) β€” width of the border on the right side, in pixels
    • border.top-width (int, optional) β€” width of the border on the top side, in pixels
    • border.bottom-width (int, optional) β€” width of the border on the bottom side, in pixels
    • border.width (int, optional) β€” short-hand that sets border.left/right/top/bottom-width all in one go
    • border.color (color, optional) β€” the color of the border 🌈
    • border.left-margin (int, optional) β€” left-side margin, in pixels, from screen edge to bar
    • border.right-margin (int, optional) β€” right-side margin, in pixels, from screen edge to bar
    • border.top-margin (int, optional) β€” top margin, in pixels, from screen edge to bar
    • border.bottom-margin (int, optional) β€” bottom margin, in pixels, from screen edge to bar
    • border.margin (int, optional) β€” short-hand for setting border.left/right/top/bottom-margin all at once
  • font (font, optional) β€” the default font used in modules and particles. plot twist: it can ALSO be a comma-separated list of several fonts 🫢 in that case the first font is the primary font, and the rest are fallback fonts. these are yambar custom fallback fonts that get searched before the fontconfig-provided fallback list. iykyk.
  • font-shaping (enum, optional) β€” default setting for font-shaping, for use in particles. one of full or none. when set to full (which is the default, btw), strings get "shaped" using HarfBuzz. requires support in fcft πŸ”₯
  • foreground β€” type: color, required: no. The default foreground (text) color to use. Like, the base color your text rocks when nobody told it otherwise πŸŽ€
  • trackpad-sensitivity β€” type: int, required: no. Controls how easy it is to trigger wheel-up and wheel-down on-click handlers. Higher values = you gotta drag your finger a longer distance, bestie. The default is 30.
  • left β€” type: list, required: no. The left-aligned modules (peep yambar-modules(5)) πŸ‘‘
  • center β€” type: list, required: no. The center-aligned modules (again, yambar-modules(5)) ✨
  • right β€” type: list, required: no. The right-aligned modules (yes, yambar-modules(5) again) πŸ’…

🌈 EXAMPLES 🌈

Okay so picture this: a top-oriented bar with exactly one module, right-aligned, and it's the clock. It's rendered as a simple string that shows only the time (not the date, we're keeping it minimal, it's giving clean girl aesthetic).

bar:
  location: top
  height: 26
  background: 00000066

  right:
    - clock:
        content:
          - string: {text: "{time}"}

πŸ¦‹ FILES πŸ¦‹

The config file gets searched for in this exact order, no cap:

  1. $XDG_CONFIG_HOME/yambar/config.yml
  2. $HOME/.config/yambar/config.yml

First one it finds wins, so if your stuff is living in one of these, it's gonna get read πŸ’–


🌸 SEE ALSO 🌸


That's the whole page bestie, you made it to the end, I'm so proud of you fr fr 🫢✨ Go forth and make your bar iconic β€” yambar(5), dated 2024-04-22, and it ate, as always πŸ’…πŸ’–
πŸ“¦ where this page comes from