lesbar(1)
πΈ NAME πΈ
okay so bestie, this is the lesbar(1) page from the General Commands Manual, and lesbar is a programming language agnostic view layer for creating desktop widgets and status bars. fr fr it reads lines written in the markup language described below from standard input and displays a rendered view of the most recent line read in a borderless window. the whole idea is that a program can generate a stream of markup strings, pass them to lesbar, and lesbar takes care of the rendering. iconic behavior π
β¨
β¨ SYNOPSIS β¨
lesbar [-geometry WIDTHxHEIGHT+XOFF+YOFF] [-help] [-version]
π DESCRIPTION π
okay so picture this: lesbar is a programming language agnostic view layer for making desktop widgets and status bars. it reads lines written in the markup language below from standard input and shows a rendered view of the most recent line read in a borderless window. that's the vibe. the idea is literally that a program can generate a stream of markup strings and pass them to lesbar, and lesbar will handle all the rendering for you. no cap, it's giving "your program makes the words, lesbar makes them cute" π¦
π OPTIONS π
-geometry WIDTHxHEIGHT+XOFF+YOFFβ define the window geometry. similar to the format described inX(7).+XOFFand+YOFFoffset the window from the left or the top of the screen respectively.-XOFFand-YOFFinstead place the window offset from the right or the bottom.WIDTHandHEIGHTcan be either a number or"fit". when you use"fit", the window resizes itself dynamically to fit the content. slay π«Ά-reserve-space left|right|top|bottomβ reserve space on the edge of the screen.-helpβ print help message and exit.-versionβ print version information and exit.
π¦ MARKUP LANGUAGE π¦
lesbar uses a markup language somewhat similar to XML. views are defined using blocks, which are parts of the text enclosed in an opening tag (<>) and a closing tag (</>). blocks may contain any lesbar markup. the opening tag may contain a comma-separated list of attributes in the form "attribute:value". if an attribute is not specified, its value will be set to the default value of that attribute. iykyk π«
for example, the following input line will result in the text "Hello World!" printed on a black background with the "World" printed in green:
<b:#ff000000>Hello <f:#ff00ff00>World</>!</>
if a literal < should be included in the content of the block, it can be escaped with a backslash. important little detail, bestie π
π FORMATTING ATTRIBUTES π
b: COLORβ sets the background color in#aarrggbbformat. default value:#ffffffffc[1-5]: 'STRING'β makes the block clickable.STRINGwill be printed tostdoutwhen the block is clicked. the attribute name determines the mouse button. (usec1for left mouse button,c3for right mouse, etc). single quotes in the string can be escaped with a backslash. unset by default.f: COLORβ sets the text color in#aarrggbbformat. default value:#fffffffft: 'TYPEFACE'β sets the font.TYPEFACEis interpreted as a pango font description string. single quotes in the string can be escaped with a backslash. default value:'Sans 11'w: SIZEβ sets the width of the block.SIZEis either a number or one of the special valuesfitandfill. for details see BUILDING LAYOUTS. default value:fith: SIZEβ sets the height of the block.SIZEis either a number or one of the special valuesfitandfill. for details see BUILDING LAYOUTS. default value:fitd: x | y | zβ sets the direction in which the children of this block are laid out. for details see HIGHER-DIMENSIONAL LAYOUTS. default value:x
π BUILDING LAYOUTS π
the text and blocks inside a block are laid out from left to right by default. the position and alignment of text is controlled using other, often empty, blocks around it and changing their width and height attributes. it's giving layout tetris π
by default, or when width (or height) is set explicitly to "fit", a block is just wide (or high) enough to fit all of its children.
if the width or height is set to "fill", the block will expand as much as possible in that direction, filling the remaining space left in its parent block. if there are multiple "filling" blocks, the remaining space is distributed between them evenly. this is useful for aligning text. for example, to align text to the right, you can place a "fill" block in front of it:
<w:fill></>This text is right-aligned.
each of the following examples will be accompanied with an illustration of the output with the blocks and text bounding boxes visualized and the outermost border representing the window:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ ββThis text is right-alignedββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
for centering text, place "fill" blocks around it:
<w:fill></>This text is centered<w:fill></>
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ ββThis text is centeredββ ββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
this example creates a common layout with one section aligned to the left, one in the middle and one to the right:
<w:fill>left</>center<w:fill><w:fill></>right</>
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββ βββββββββββββββββββββββββ
ββββββββ βββββββββββββββββββββββββββββββββββ
βββleftβ ββcenter βββ ββrightβββ
ββββββββ βββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββ βββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
the width and height can also be a fixed size in pixels. this can for example be used to introduce padding around a block of text:
<b:#ff000000><w:8></>Content with padding.<w:8></></>
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββ β
βββ ββContent with padding.ββ ββ β
ββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π§ HIGHER-DIMENSIONAL LAYOUTS π§
the direction in which child blocks are laid out can be controlled by setting the d attribute on the parent. a block with d:x will have the children laid out from left to right, a block with d:y from top to bottom. a block with d:z will cause the children to be layered on top of each other. children are always centered in the directions orthogonal to the parent's d value. not me getting emotional over axes π
using these primitives, all sorts of more advanced layouts and effects can be constructed. for example, this markup creates an A with a red underline:
<d:z><h:fill,w:fill,d:y><h:fill></><w:fill,h:1,b:#ffff0000></></>A</>
ate. periodt. π₯
π AUTHOR π
meipp (meipp@protonmail.com), Thilo Wischmeyer (thwischm@gmail.com)
the source code can be found at https://git.sr.ht/~salmiak/lesbar. please send bug reports or patches by email to ~salmiak/lesbar@lists.sr.ht. support the icons, bestie π
okay that's the whole lesbar(1) manual, bestie! this page is dated 1980-01-01 and it's the lesbar(1) manual from the General Commands Manual. now go render something iconic ππ
π
π¦ where this page comes from
- nixos 26.05: lesbar 1.1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms