Qball's Weblog

Rofi 1.4.0: Sneak Preview (5): Fonts

Tags Rofi  Theme3.0 

Today only a very short blog post on fonts and a sneak sneak peak at settings configuration in this new format.


With the introduction of the new theme format, rofi now supports different fonts for different widgets. This is demonstrated in the screenshot below:


You can specify a different font for every widget. The above screenshot features 5 different fonts and sizes.

For example if you want to set the font on the entry box you can set:

#window mainbox inputbar {
    font: "Sauce Code Pro 18";
#window mainbox inputbar entry {
    font: "Grundschrift 18" ;

This sets Sauce Code Pro 18 for the prompt and the sorting indicator, and Grundschrift 18 for the entry box.

The buttons at the bottom are sidebar-mode with the following theme setting:

#window mainbox sidebar box {
    spacing: 0px;
    padding: 0px 80px;
#window mainbox sidebar {
    border: 0px 0px 0px 0px;
    font: "FontAwesome 22";
#window mainbox sidebar button {
    padding:    6px;
    border:     0px 2px 2px 2px;
    border-radius: 0px 0px 4px 4px;
    background: @tlightblack;
    foreground: @foreground;
#window mainbox sidebar button selected normal {
    text: @dark;
    background: @backlight;
    foreground: @tlightblack;

configuration {
    // The display name of this browser
    display-ssh:                    "";
    // The display name of this browser
    display-run:                    "";
    // The display name of this browser
    display-drun:                   "";
    // The display name of this browser
    display-window:                 "";
    display-combi:                  "";
    display-top:                    "";

The configuration section here allows you to override settings from the ‘normal’ configuration file.

Because the strings are UTF-8 and set to show an icon from FontAwasome it might not render correctly. This is how it should have looked:


Note: having a lot of different fonts in your theme can, slightly, slow down startup time of rofi. If you use it on low-powered hardware, I suggest sticking to a single font.

comments powered by Disqus