Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMay 5, 2026·3 min de lecture

Polybar — Fast and Customizable Status Bar for Linux

Polybar is a lightweight status bar for Linux window managers that uses simple INI-style configuration to display workspaces, system metrics, notifications, and custom scripts.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Polybar
Commande d'installation directe
npx -y tokrepo@latest install cf0fc5a6-485a-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Polybar is a status bar designed for use with tiling window managers like i3, bspwm, and Openbox. It emphasizes ease of configuration through a declarative INI format while remaining fast and resource-efficient, rendering information via a modular system of built-in and custom modules.

What Polybar Does

  • Displays workspace indicators, window titles, and system tray
  • Shows real-time system info: CPU, RAM, disk, temperature, network, battery
  • Renders custom shell script output as first-class modules
  • Supports fonts, colors, underlines, and per-module formatting via format strings
  • Handles multi-monitor setups with per-output bar instances

Architecture Overview

Polybar is written in C++ and renders directly to an X11 window (or via XCB). Each bar is a single process that ticks modules at configurable intervals. Built-in modules query /proc, sysfs, or D-Bus for system data. Custom/script modules fork shell commands and parse their stdout. IPC commands allow external control via polybar-msg.

Self-Hosting & Configuration

  • Install from package manager or compile from source (requires cmake, xcb libs)
  • Config file lives at ~/.config/polybar/config.ini (INI format with sections per bar/module)
  • Define bars with position, size, fonts, and a list of modules for left/center/right
  • Create custom modules using type = custom/script with exec and interval keys
  • Launch via a shell script called from your WM's startup (e.g., i3 exec_always)

Key Features

  • Declarative INI configuration: no programming needed for common setups
  • Rich built-in modules: i3/bspwm workspaces, ALSA/PulseAudio volume, MPRIS media
  • Custom/script modules for displaying any shell command output
  • IPC interface: send commands (hide, show, toggle module) from scripts
  • Highly themeable with hex colors, gradients, ramp icons, and format overrides

Comparison with Similar Tools

  • i3bar/swaybar — simpler, protocol-driven; less visual customization
  • Waybar — Wayland-native alternative with similar module system; required for Sway/Hyprland
  • lemonbar — minimal pipe-based bar; more flexible but harder to configure
  • tint2 — panel for Openbox; supports taskbar but less module variety
  • Eww (ElKowars Widgets) — Lisp-like config for arbitrary desktop widgets; steeper learning curve

FAQ

Q: Does Polybar work on Wayland? A: No. Polybar is X11-only. For Wayland compositors, use Waybar instead.

Q: How do I add a custom script module? A: Define a module section with type = custom/script, set exec = /path/to/script.sh and interval = 5.

Q: Can I use Nerd Font icons in Polybar? A: Yes. Add a Nerd Font as a secondary font in your bar config and reference glyphs in module labels.

Q: How do I reload the config without restarting? A: Polybar does not hot-reload. Use a launch script that kills existing instances and restarts the process.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires