1

OS: 18.04

man rofi describes rofi as

A window switcher, application launcher, ssh dialog and dmenu replacement

There are twenty-five themes to choose from in /usr/share/rofi/themes by running rofi-theme-selector. However, the "default" theme isn't listed there.

The image below shows the window generated by running rofi-theme-selector:

rofi-theme-selector

A scrollbar is present with the default theme. However, none of the other themes display this scrollbar. The image below shows a preview of the solarized theme.

Solarized theme lacking a scrollbar

Is it possible to make the solarized theme display a scrollbar?

2

I first wanted to compare the code of default and solarized themes to see why the only the former theme displayed a scrollbar. However, it appears that the default theme is baked into Rofi itself and so such a comparison isn't possible.

I then installed Rofi in Ubuntu 19.10 and ran rofi-theme-selector. Some of the themes in 19.10's /usr/share/rofi/themes, including Arc-Dark did have scrollbars.

A comparison of Arc-Dark and solarized indicated that, in the former, code for the scrollbar section had the line

handle-color: @normal-foreground;

whereas the solarized theme lacks this line.

So changing

#scrollbar {
    width:        4px ;
    border:       0;
    handle-width: 8px ;
    padding:      0;
}

in the solarized theme in 18.04 to

#scrollbar {
    width:        4px ;
    border:       0;
    handle-color: @normal-foreground;
    handle-width: 8px ;
    padding:      0;
}

does the job and the modified solarized theme in 18.04 (and 19.10) now displays a scrollbar:

Solarized theme with scrollbar


  • some rofi themes just don't have a scrollbar section. (I didn't look at these themes further.)
  • another aspect to check is whether the listview section of the theme has scrollbar: false;. That would need changing to scrollbar: true;
  • themes can be instead placed in $HOME/.config/rofi in which case the rofi command would need to include -theme ... where ... is the theme's prefix. So, if there's $HOME/.config/rofi/my_solarized.rasi, the command to run rofi would include -theme my_solarized.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.