Convert legacy Rofi themes

Posted on October 24, 2017

Rofi is a window switcher, application launcher and dmenu replacement, which integrates nicely with tiling window managers. In versions 1.3.x and before themes were read from X resources. The recent upgrade to version 1.4.2 broke my custom Arc-Dark inspired theme. Here is how to migrate legacy themes to the new format:

rofi -config /path/to/old/themefile -dump-theme > theme.rasi

In case you are interested in the Arc-Dark theme I am using, check my dotfiles. Alternatively you might be able to get it from the Rofi Themes Repo, if they accept my pull request. The theme was first contributed to the theme repo by Faruk Ünver, but got lost when the themes were restructured.

It took me quite some time to figure out the command above, because at a first glance it seems like there is a different method to convert legacy themes. There is a script that is supposed to convert legacy themes to the new format. However, this script generated a theme file, which could not be parsed by Rofi. After digging around some more in Rofi’s project files, I found the test script, which contains the command from above.