Rofi: 'configuration' block in theme.rofi causes syntax error

Created on 3 Jan 2019  路  3Comments  路  Source: davatorium/rofi

After updating my Arch Linux system, rofi started displaying a syntax error in my theme.rasi file complaining about the configuration block. Judging by the timing of the release (4 days ago for version 1.5.2), I'm guessing this is a bug introduced in said version.

I use the configuration block in my theme file to specify that I want program icons for drun items. As far as I can tell from the wiki, this is still a valid syntax:

configuration {
    show-icons: true;
    //drun-icon-theme: "MY_ICON_THEME";
}

My workaround for the mean time is to add -show-icons to rofi's command line arguments and to remove the configuration block from my theme.rasi.

Hope this helps! Rofi is great! Rofi is awesome! Thanks to all who have worked on it!

Version

Version: 1.5.2

Configuration

rofi -help:
https://gist.github.com/DragonAxe/f07de0d01cb71155a6d295765dfc71fb

theme.rasi:
https://gist.github.com/DragonAxe/3347b7d803a0acfc30e6f64b3c05293a

config:
https://gist.github.com/DragonAxe/dfff23912ce15dd5b95560f773610df4

Launch Command

rofi -show combi

Steps to reproduce

  • Create a new theme.rasi file by following the instructions on the wiki.
  • Enable drun icons by adding a "Configuration" block to the theme.rasi file as instructed to do in the Wiki->Themes->Icons section.
  • Run rofi using the newly created theme.
    Result:
  • Syntax error complains about "Configuration" section in theme.rasi.

What behaviour you see

The following error is displayed complaining about the "configuration" section in my theme.rasi file:

The following errors were detected when starting rofi:

Error while parsing theme: ~/.config/rofi/theme.rasi
    Parser error: sytax error, unexpected Configuration block, expecting end of file
    Location: line 144 column 2 to line 145 column 14.
    File 'home/username/.config/rofi/theme.rasi'

image

What behaviour you expect to see

A normal working rofi with icons.

image

Most helpful comment

Would it be a good idea to add a note to the wiki about the configuration block needing to be put at the top? Or the error message made more verbose?

All 3 comments

Yes, configuration blocks should (now) be before theme info. This was changed after several people got confused when themes overrode configuration settings by having intermixed configuration blocks.

Note that configuration blocks in the theme format is still 'under development' and not considered stable.

Would it be a good idea to add a note to the wiki about the configuration block needing to be put at the top? Or the error message made more verbose?

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

khughitt picture khughitt  路  3Comments

sangowen picture sangowen  路  5Comments

carnager picture carnager  路  5Comments

jparsert picture jparsert  路  6Comments

ghost picture ghost  路  3Comments