LinuxCommandLibrary

polybar

Customizable status bar for X11 window managers

TLDR

Start polybar with default bar

$ polybar
copy
Start specific bar
$ polybar [bar_name]
copy
Start with config file
$ polybar -c [~/.config/polybar/config.ini] [bar_name]
copy
List available bars
$ polybar -m
copy
Reload configuration
$ polybar-msg cmd restart
copy
Send action to module
$ polybar-msg action [module_name] [action]
copy
Check configuration
$ polybar -c [config.ini] --check
copy

SYNOPSIS

polybar [-c config] [-m] [--check] [barname_]

DESCRIPTION

Polybar is a fast, customizable status bar for X11 window managers. It displays system information, workspace indicators, and custom content through a modular configuration.
Configuration uses INI format with sections for bars and modules. Bars define appearance (colors, fonts, position) and which modules to include. Modules provide content - built-in for system info, custom for scripts.
The bar is divided into left, center, and right sections. Modules can display text, icons (via icon fonts), progress bars, and clickable areas. Formatting uses tags for colors, fonts, and spacing.
Custom script modules execute external commands and display output. IPC modules enable real-time updates from external programs via polybar-msg.
Multiple bars can run simultaneously on different monitors. The -m flag lists available outputs for multi-monitor configuration.

PARAMETERS

-c, --config FILE

Path to configuration file.
-m, --list-monitors
List available monitors/outputs.
-r, --reload
Reload when config changes.
-q, --quiet
Suppress output.
-l, --log LEVEL
Log level: error, warning, info, trace.
--check
Verify configuration syntax.
-w, --print-wmname
Print WM name and exit.

CONFIGURATION

~/.config/polybar/config.ini

Main configuration file in INI format defining bars, modules, colors, and fonts.
~/.config/polybar/launch.sh
Common launch script for starting polybar with window manager.

MODULES

internal/battery

Battery status and capacity.
internal/network
Network connection info.
internal/cpu
CPU usage.
internal/memory
Memory usage.
internal/date
Date and time.
internal/volume / internal/pulseaudio
Audio volume control.
internal/xworkspaces
Workspace indicator.
internal/temperature
System temperature.
custom/script
Custom script output.
custom/ipc
Inter-process communication.

CAVEATS

X11 only - no native Wayland support (use Waybar). Requires icon fonts for symbols. Complex configurations can be verbose. Some window managers need specific settings. Reloading loses some state. CPU usage increases with many script modules.

HISTORY

Polybar was created by Michael Carlberg around 2016 as a rewrite of lemonbar with easier configuration. It aimed to provide a powerful status bar without requiring shell scripting knowledge. Written in C++, it became popular in the r/unixporn community for desktop customization.

SEE ALSO

waybar(1), i3status(1), lemonbar(1), dunst(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community