Skip to content

Polybar

Polybar runs as a daemon. It usually has a config file (config.ini) which can include other files. It supports an IPC mechanism (polybar-msg) to restart or reload the bar.

We use Template + Include + Command.

  1. Generate ~/.config/polybar/colors.ini.
  2. Include it in config.ini: include-file = ~/.config/polybar/colors.ini.
  3. Send a restart command.

One-time: Add include to ~/.config/polybar/config.ini:

[global/wm]
include-file = ~/.config/polybar/colors.ini
enroll:
polybar:
type: template
input: "~/.config/themis/templates/polybar_colors.ini.j2"
output: "~/.config/polybar/colors.ini"
# Command to reload/restart
reload_cmd: "polybar-msg cmd restart"