-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Including themes (.rasi vs .rasinc extension) #2069
Comments
See for changelog here: I think this is the issue, in your custom theme: @import "gruvbox-common.rasi" I think that should have been: @import "gruvbox-common" I will test this. |
Ok, it does not resolve it right.. Will fix, thanks for reporting. |
Above commit, should now correctly resolve |
This was requested so its easier to distinguish between a theme and shared files. No 'pre-compilation' happening. |
Resolve both .rasi and .rasinc and what order Issue: #2069
Thank you for being so responsive and fixing this! 👍 Also thank you for pointing me to the new changelog. I was going to suggest to add a note to the old one, but I see you already did this. 👏 Does this mean (even though importing themes without extension seems to be the recommended way), imports with the
|
No. If explicitly specified, the tool should not change extension. That would cause more confusion then anything else. To me there is no UX break. I think the only place where it affected people was your usecase, where you import part of a theme file that was shipped with previous rofi that is no longer part of current rofi. (If you would have copied the old common file into your local theme dir, everything still would have worked fine). The ""fix"" here is to work with it more transparently and avoid possible issues in the future, but I don't really see this as a bug as everything was working as intended and documented. |
Does it? or is this an assumption? |
Generally agreed!
Yes. Unfortunately I don't remember how I created my config years ago, but I would assume I copied the import statement from the docs somewhere. If that's the case, it's likely that more users will run into my issue - and if the import including the extension was part of the official docs at some point, one could consider (re-)moving the gruvbox theme file a breaking change. But you are right, I see that the import behavior is in fact documented well. |
Agree. I think this slipped through the Changelog as an explicit note, given the change was made a long time ago (2 years), and nobody had any issues with it, until now and have been very busy and little time/energy/motivation for rofi. |
I just assumed this based on your post above. The docs say
which kind of implies with extension to me, despite the good explanation right after:
Maybe this could be nudged for better by using |
I didn't know it has been so long already. That's a good indicator it will not affect as many users as I feared 👍 Let's hope for the best! Thank you for all your efforts! |
Rofi version (rofi -v)
1.7.6-dirty
Configuration
https://gist.github.com/flipsi/ecf442bdb71121830c5e7b22b99d55a0
Theme
https://gist.github.com/flipsi/d128959fa8ee6a5cb6a769657cf77e3c
Timing report
https://gist.github.com/flipsi/0d781e139b45cdcdfc56e8107242a42e
Launch command
rofi -show window
Step to reproduce
~/.config/rofi/themes/gruvbox-dark-purple.rasi
@import "gruvbox-common.rasi"
Expected behavior
The global theme is imported correctly in rofi version 1.7.5 (I upgrade the Arch Linux package from 1.7.5-3 to 1.7.6-4 and ran into this bug).
I expect the theme import to not fail when upgrading from 1.7.5 to 1.7.6.
Actual behavior
The import fails, leading to an almost unreadable UI (due to low contrast text) with the following error:
Additional information
Further investigation revealed that the global theme in
/usr/share/rofi/themes
changed its extension, presumably it's now some compiled version for performance reasons.So I was able to workaround the issue by changing my config from
to
I don't know what caused this, but the changelog hasn't been updated since a few versions, so as a user one is a little lost.
What makes the failure more confusing is the fact that the error message only prints the failed file loading attempt for the user's home directory (
/home/flipsi
and not/usr/share/rofi/themes
). So this looks like something is wrong with the searched directories or relative/absolute paths.Using wayland display server protocol
I've checked if the issue exists in the latest stable release
The text was updated successfully, but these errors were encountered: