← 返回命令列表

Linux command

polybar 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start polybar with default bar

polybar

Start specific bar

polybar [bar_name]

Start with config file

polybar -c [~/.config/polybar/config.ini] [bar_name]

List available bars

polybar -m

Reload configuration

polybar-msg cmd restart

Send action to module

polybar-msg action [module_name] [action]

Check configuration

polybar -c [config.ini] --check

说明

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.

参数

-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.

FAQ

What is the polybar command used for?

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.

How do I run a basic polybar example?

Run `polybar` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c, --config _FILE_ do in polybar?

Path to configuration file.