LUASTATUS-BARLIB-LEMONBAR(7)
π NAME π
okay so welcome to luastatus-barlib-lemonbar β the lemonbar barlib for luastatus, bestie. This page is chilling in the Miscellaneous Information Manual, and it's here to explain exactly how this barlib talks to lemonbar. πβ¨
π¨ WARNING π¨
bestie, this is the serious part: lemonbar has a critical bug that will likely spoil your impression of using luastatus with it. π For details, please see:
<https://github.com/LemonBoy/bar/pull/198><https://github.com/LemonBoy/bar/issues/107><https://github.com/shdown/luastatus/issues/12#issuecomment-277616761>and down the thread.
Please use lemonbar from <https://github.com/shdown/bar/tree/buffer-bug-fix>, or simply apply the following patch:
<https://github.com/shdown/bar/commit/eb0e9e79b9a35c3093f6e2e90d9fbd175a2305ef.patch>
π OVERVIEW π
This barlib talks with lemonbar. It joins all non-empty strings returned by widgets by a separator, which defaults to " | ". π
π REDIRECTIONS AND luastatus-lemonbar-launcher π
lemonbar is not capable of creating a bidirectional pipe itself; instead, it requires all the data to be written to its stdin and read from its stdout. π«Ά
That's why the input/output file descriptors of this barlib must be manually redirected. no cap.
A launcher, luastatus-lemonbar-launcher, is shipped with it; it spawns lemonbar connected to a bidirectional pipe and executes luastatus with -b lemonbar, all the required -B options, and additional arguments passed by you. β¨
Pass each lemonbar argument with -p, then pass --, then pass luastatus arguments, e.g.:
luastatus-lemonbar-launcher -p -B#111111 -p -f'Droid Sans Mono for Powerline:pixelsize=12:weight=Bold' -- -Bseparator=' ' widget1.lua widget2.lua
π¦ CB RETURN VALUE π¦
Either of:
- a string with lemonbar markup An empty string hides the widget.
- an array of such strings Equivalent to returning a string with all non-empty elements of the array joined by the separator.
nilHides the widget.
β FUNCTIONS β
The following functions are provided:
escaped_str = luastatus.barlib.escape(str)β Escapes text for lemonbar markup.
πΈ EVENT ARGUMENT πΈ
A string with the name of the command. yep, that's it. π
π OPTIONS π
The following options are supported:
in_fd=<fd>β File descriptor to read lemonbar input from. Usually set by the launcher.out_fd=<fd>β File descriptor to write to. Usually set by the launcher.separator=<string>β Set the separator.
π COPYRIGHT π
LGPLv3. periodt.
okay that's the tea, bestie! π«Ά source/version: luastatu...-lemonbar(7) from the Miscellaneous Information Manual. date: not listed on this page, so I'm not making one up β slay responsibly. πβ¨
π¦ where this page comes from
- nixos 26.05: luastatus 0.6.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms