davatorium / rofi

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

[REQUEST] Symbolic icon colorization #1110

Open nick87720z opened 4 years ago

nick87720z commented 4 years ago

I tried to create entry with theming like in fancy theme. But besides size/layout corrections, I also tried to change simple "input-keyboard" to "input-keyboard-symbolic". It was interesting, wether sym icon colorization, like in gtk3, is supported. When I use such icon names in zenity dialogs, colorization is done automatically, probably by text colors. Would be great if same could be done in rofi. It could either use text color or have dedicated property "icon-color" (though in gtk it's supposed to have text color).

Could be that it needs either own compatible implementation from scratch or link with some gtk+ stuff (as far as I remember, it is svg icon with colors set to special values).

Upd: some examples with zenity: zenity --error --text="Testing" --icon-name=dialog-error-symbolic Two themes with my custom theme, 3rd with my desktop one (elementary dark). Last is for rofi example usinc "input-keyboard-symbolic" icon. In first two examples it would be colorized. symicon-green symicon-red symicon-default symicon-rofi

This snippet sets dialog-level look. From colors there are only text, background and borrder colors:

dialog, headerbar {
        color: #70ff70;
        background-color: rgba(0,60,0,0.85);

        box-shadow: none;
        border-color: rgba(100,255,100, 0.5);
        border-style: solid; }

Upd2: About symbolic icons. I initially assumed it possible just from fact that rofi uses cairo). https://wiki.gnome.org/Design/OS/SymbolicIcons

$ rofi -v Version: 1.5.4

DaveDavenport commented 4 years ago

Upd2: About symbolic icons. I initially assumed it possible just from fact that rofi uses cairo).

Can you elaborate on this one?

nick87720z commented 4 years ago

Can you elaborate on this one? I'm not sure why did I think so. After longer googling I noticed, there is no info at all about conventions to make sym icons. Two links, ending exactly with "SymbolicIcons", one at freedesktop and second at gnome site, are missing both.

Only two librsvg bugs. mentioned at last link, remembered me, that in fact it is done just certain color values, which are to be replaced with actual bg/fg and other colors to be used. I can't understand, what happened to sym icons standard. Is it now same as gtk csd/headerbar stuff (even with gnome removing own page from its wiki).

According to last known info, it should be enough to treat icons, ending with '-symbolic.svg' as such (moreover if non-symbolic variant available) and perform text search/replace. But that could be wrong.

nick87720z commented 4 years ago

I'm not sure now, that such feature is necessary. After some configuration of new desktop with rofi and tint2 - it uses unicode chars for all buttons. Including keyboard in rofi theme, initially based on fancy (but needed to change valign to 0.5).