polybar-msg

Send IPC messages to running Polybar

TLDR

Send action to module
$ polybar-msg action [module] [action]
Toggle module visibility
$ polybar-msg action [module] toggle
Send hook to IPC module
$ polybar-msg hook [module] [hook_index]
Quit polybar
$ polybar-msg cmd quit

SYNOPSIS

polybar-msg [options] command [args...]

DESCRIPTION

polybar-msg sends IPC messages to running polybar instances. Controls modules, triggers hooks, and manages polybar lifecycle. Used for dynamic bar updates and scripted interactions.

PARAMETERS

action module action

Send action to module.
hook module index
Trigger IPC hook.
cmd command
Send command (quit, restart, hide, show, toggle).
-p pid
Target specific polybar PID.

INSTALL

sudo apt install polybar
sudo dnf install polybar
sudo pacman -S polybar
sudo apk add polybar
sudo zypper install polybar
nix profile install nixpkgs#polybar

SEE ALSO

polybar(1)