POLYBAR-MSG(1)

πŸ’… NAME πŸ’…

polybar-msg β€” the little messenger bestie that sends IPC messages to polybar, no cap 🫢

okay so real quick: this is from the Polybar User Manual, and it's literally the glow-up you needed if you've ever wanted to talk to your bar like it's your group chat ✨


🌸 SYNOPSIS 🌸

polybar-msg [OPTIONS] action action-string
polybar-msg [OPTIONS] action module action [data]
polybar-msg [OPTIONS] cmd command

three whole ways to slide into polybar's DMs, pick your fighter πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

So polybar lets the outside world control it β€” iconic behaviour honestly β€” through actions and commands. Here's the tea: actions are the ones that control individual modules, and commands control the bar itself. different tax brackets, y'know? πŸ’€

The full IPC documentation is linked at the end of this document, go read it if you're nosy (affectionate). πŸ”—

Which actions you actually get depends on the target module β€” so like, it's giving "results may vary" but in a cute way. For actions, the payload is either a single action string, or the module name, the action name, and the optional data string, all specified separately. two formats, both slay πŸ’–

And for polybar-msg to be able to send a message to a running polybar process, two things gotta be true:

  • the bar must have IPC enabled, and
  • both polybar-msg and polybar must run under the same user.

that's the vibe check. no shortcuts, sorry bestie 😭


✨ OPTIONS ✨

  • -h, --help β€” display help text and exit πŸŽ€ the classic "wait what does this do again" button
  • -p PID β€” send the message only to the polybar process running under the given process ID. If you don't specify it, the message gets sent to all running polybar processes. so like, -p is the "no, this one" of flags 🫢

πŸ“ EXAMPLES πŸ“

polybar-msg cmd quit

Terminate all running polybar instances. bye bestie πŸ‘‹ literally all of them, no survivors, it's giving closing time πŸ’€

polybar-msg action mymodule module_hide

polybar-msg action "#mymodule.module_hide"

Both of these hide the module named mymodule. The first variant specifies the module and action names separately, the second uses an action string. same energy, different outfit πŸ’… the way that both work is honestly so convenient


πŸ‘‘ AUTHORS πŸ‘‘

Polybar was created by Michael Carlberg and is currently maintained by Patrick Ziegler. Contributors can be listed on GitHub β€” the whole squad, fr fr 🌈


πŸ™ˆ REPORTING BUGS πŸ™ˆ

Found a bug? Report issues on GitHub <https://github.com/polybar/polybar> β€” don't suffer in silence, bestie, that's what the issue tracker is for πŸ›πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

go click the IPC docs, iykyk πŸ“š


2016-2024, Michael Carlberg & contributors


okay that's the whole page, you ate that ngl πŸŽ€ this was polybar-msg, version 3.7.2, dated Sep 10, 2024 β€” mwah, go send some messages to your bar, she's waiting πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from