LinuxCommandLibrary

polybar-msg

Control `polybar` using inter-process-messaging (IPC).

TLDR

Quit the bar

$ polybar-msg cmd quit
copy


Restart the bar in-place
$ polybar-msg cmd restart
copy


Hide the bar (does nothing if the bar is already hidden)
$ polybar-msg cmd hide
copy


Show the bar again (does nothing if the bar is not hidden)
$ polybar-msg cmd show
copy


Toggle between hidden/visible
$ polybar-msg cmd toggle
copy


Execute a module action (the data string is optional)
$ polybar-msg action "#[module_name].[action_name].[data_string]"
copy


Only send messages to a specific Polybar instance (all instances by default)
$ polybar-msg -p [pid] [cmd|action] [payload]
copy

Copied to clipboard