onagre-launcher / onagre

A general purpose application launcher for X and wayland inspired by rofi/wofi and alfred
MIT License
511 stars 27 forks source link

Onagre failing to detect theme #69

Closed Jozhin-s-Bazhin closed 4 months ago

Jozhin-s-Bazhin commented 7 months ago

Describe the bug When I try to start Onagre it fails to detect the theme and gives this error: "Failed to parse theme: Failed to open config file Failing back to default theme". After that it launches without any theme or icons.

Config I use the not-adwaita config from the example directory but I replaced the Papyrus icon theme with Adwaita.

To Reproduce Install onagre-git from aur. Launch with a theme specified with -t or one in /etc/xdg/onagre/theme.cscs or ~/.config/onagre/theme.cscs.

Expected behavior Onagre should launch with a theme applied.

Window manager (please complete the following information): Hyprland (Arch)

Additional context I already tried manually specifying the path to the theme and used other themes from the examples. I also tried to manually set the $XDG_DATA_DIRS to /usr/share/icons.

oknozor commented 7 months ago

Hey @Jozhin-s-Bazhin. You have a typo in your theme filename, it should be theme.scss not theme.cscs

If that does not solve your issue you can try to install the latest onagre version with cargo:

cargo install onagre --git https://github.com/oknozor/onagre --locked

Then make sure to move onagre to the bin dir:

sudo mv ~/.cargo/bin/onagre /usr/bin/onagre

Let me know if that works for you.

PS: I am sorry, currently the installation process is a bit manual, we are waiting for pop-os devs to release some library to make an official onagre v1 release.

Jozhin-s-Bazhin commented 7 months ago

I followed your instructions and it worked, but only after I put the config file in ~/.config/onagre/theme.scss. With strace I got these logs when trying to manually specify the config file: "log.103431:readlink("/etc/xdg/onagre/theme.scss", 0x7ffcd1115cf0, 1023) = -1 EINVAL (Invalid argument) log.103431:openat(AT_FDCWD, "/home/roman/.config/onagre/theme.scss", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) log.103431:statx(AT_FDCWD, "/usr/share/icons/locolor/index.theme", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7ffcd110c5f0) = -1 ENOENT (No such file or directory) log.103431:statx(AT_FDCWD, "/usr/share/icons/spotube/index.theme", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7ffcd110c5f0) = -1 ENOENT (No such file or directory)"

Jozhin-s-Bazhin commented 7 months ago

I reinstalled onagre from the aur and when the file is in ~/.config/onagre it works fine. I guess the issue has to do with me naming the file wrong and the -t flag not working.