rofi icon indicating copy to clipboard operation
rofi copied to clipboard

[BUG] Rofi repeatedly loads the same config, slowing launch

Open vetens opened this issue 6 months ago • 2 comments

Rofi version (rofi -v or git commit in case of build issue)

2.0.0-dirty

Configuration

https://gist.github.com/vetens/cecb4681c258d634e7ee542470d1e28f

Theme

https://gist.github.com/vetens/d5fbf48fbc61ddf243bdab231b2530df

Timing report

https://gist.github.com/vetens/00d1c144a691491557ca5f42f05c643f

Launch command

rofi -modi run -show run -config dmenu.rasi

Step to reproduce

Run the above command. The config file referenced is: https://gist.github.com/vetens/6c0986549b5e889935350bd25c4e8fc7

Expected behavior

Included in the timing report is another printout of the output when run with -no-config (comparable timing to just running rofi -modi run -show run without the extra config). No error code is present and it takes about 0.4 seconds to start.

Actual behavior

It takes nearly 2 seconds to start, and there is an error after .7 seconds:

Failed to open theme: <i>/home/wren/.config/rofi/dmenu.rasi</i>

Error: <b>Too many open files</b>

in the -info output, you can see that the same config has been cloned many times.

Additional information

No response

I've checked if the issue exists in the latest stable release

  • [x] Yes, I have checked the problem exists in the latest stable version

vetens avatar May 19 '26 22:05 vetens

So from dmenu.rasi you load dmenu.rasi? So you ask rofi to load a file recursively.

It is doing exactly what you are asking it todo:

dmenu.rasi has:

/**
 * ROFI Color theme
 * User: Qball
 * Copyright: Dave Davenport
 */
@theme "dmenu"
* {

So it keep importing itself.

DaveDavenport avatar May 20 '26 20:05 DaveDavenport

Ah, thank you! Yes, that was it. Commenting out that line fixed the issue.

vetens avatar May 20 '26 22:05 vetens