Polybar 3.6.0 Release

01 Mar 2022 -- Polybar Team

Another Year, Another Release

It has been slightly longer than a year though. Version 3.5.0 came out almost 15 months ago, but we did get quite a few things done in that time.

But first, as usual, a few statistics:

  • 40 contributors (30 first-time)
  • 136 pull-requests
  • 278 commits
  • 283 files changed
  • 11556 lines added
  • 10360 lines deleted
  • 54 issues closed
  • 18 bugs fixed

What’s New?

Again, I spent a lot of time improving the internals. Here, I want to highlight some of the user-facing changes though.

Polybar finally has a default configuration file:

default config screenshot

For the longest time, polybar shipped an example config file. The intention was that it would serve as an example of what kind of configuration is possible in polybar, it was not supposed to work out-of-the-box for everyone. The new default config aims to work for everyone. That’s why it only includes modules that work on (almost) every machine without hardware or software specific configuration.

Polybar installations should also now install this default config to /etc/polybar/config.ini from where polybar will also try to load it if it can’t find one in your home directory. So new users, after a successful installation, should be able to simply run polybar (without any additional arguments) and get a working bar.

Individual modules can now be dynamically hidden using actions. For example, to toggle a module called wireless, you could use the following command:

polybar-msg action wireless module_toggle

Modules can also be started in the hidden state by setting the hidden setting to true. If a module is hidden, it is still running in the background.

Polybar now supports the “point” unit (pt) for specifying sizes, margin, padding, and spacing. A point 1/72 inches and its size in pixels is determined using the DPI setting configured in polybar. This should finally make it easier to create configs that work on multiple screen sizes and still look good. In addition, margin, padding, and spacing can be specified in pixels (px) as well. Read the formatting wiki for the full documentation of this feature.

Some other smaller notable changes include proper support for relative paths in include-directory and include-file, different weights for ramp levels, network interface detection, warn formats for some modules, and many more. You can see the full changelog on the release page.

Migration Guide

Not too many features have been deprecated in this release. But it’s best to update your config to no longer use any deprecated features.

In the [settings] section, the options throttle-output and throttle-output-for are no longer used and can be removed from your config.

Rename your config file from config to config.ini. Polybar now also looks for config.ini by default and with the .ini extension, many editors can also provide the correct syntax highlighting.

If you are using polybar’s inter-process-messaging (IPC) feature and are directly writing to /tmp/polybar_mqueue.<PID>, migrate those scripts over to using the polybar-msg program.

In addition if you are using the IPC hook message type to control the IPC module, use the new module actions instead. The polybar-msg utility will tell you the correct command to use instead.

As always, deprecated features will continue to work but will be removed in the future and produce warning messages whenever you use them, so check your polybar logs.

Next Steps

For the next, we will focus on three main topics:

  • Fixing most of the tray issues involving it appearing below the bar or above fullscreen windows.
  • A new font rendering engine based on Pango for better support of font features.
  • The ability to use config references together with other text inside config values.

The milestone for 3.7.0 includes a bunch more things we want to work on but these three are the ones I definitely want to see in the next release.

You can get the release tarball for this release on the release page if you want to build from source and hopefully this new release makes its way into your distro’s package repos soon.

Stay safe — Patrick

Comments