Lemonbar Formatting

Created on 2020-11-19T19:33:52-06:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

This card was copied from the original URL.

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 (%).

Attribute modifiers

Where attribute is one of the following

Clickable buttons

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 5 which maps to the left, middle, right, scroll up and scroll down 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}