davatorium / rofi

Rofi: A window switcher, application launcher and dmenu replacement
https://davatorium.github.io/rofi/
Other
12.84k stars 612 forks source link

[REQUEST] Compatible with xrdb values (Xresources colors) #1992

Open Angel-Karasu opened 4 weeks ago

Angel-Karasu commented 4 weeks ago

Before opening a feature request

What is the user problem or growth opportunity you want to see solved?

The user can't use xrdb setted values (in the Xresources file)

How do you know that this problem exists today? Why is this important?

Because I can't use my xrdb setted values

Who will benefit from it?

For all users that have configure colors or any others value in Xresources file

Rofi version (rofi -v)

1.7.5

Configuration

https://github.com/Angel-Karasu/dotfiles/blob/main/config/rofi/config.rasi

Additional information

The format can be:

mycolor: ${xrdb:name};

With ${xrdb:name} that use the value return by xrdb -get name.

For example, for me xrdb -get background return #121212 that I want to set this color in mycolor.

I'm willing to help implement it but I haven't managed to understand how the parser works.

DaveDavenport commented 4 weeks ago

something like this would be kinda ok to me, but it might not be handy for @lbonn wayland port.

Angel-Karasu commented 4 weeks ago

Normally xrdb -get name it's also available on Wayland (it works for me in VM on qtile wayland with EndeavourOS)

DaveDavenport commented 4 weeks ago

Yeah, but that uses xwayland I assume. If this would be implemented, it should be done via libxcb library (as done in very old versions of rofi), this would be difficult in wayland port as I don't think that has it, or access to the required underlying interface.

I don't think it is good to have it depend on both.

You could always wrap rofi and set environment variables for colors, this you can use in themes.