LUASTATUS-BARLIB-LEMONBAR(7)

πŸ“¦
version 0.6.0 Β· 2 versions
, in nixos 26.05

πŸ’– 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:

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.
  • nil Hides 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.

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