Theme your Rofi CSS using GTK.
GTK 4.0/adw-gtk3 style context colors is supported!
Execute this into your terminal. This will create a backup of your Rofi installation so take precautions.
mv $HOME/.config/rofi $HOME/.config/rofi.bak
git clone https://github.com/Rikiub/gtk-rofi $HOME/.config/rofi
cd $HOME/.config/rofi
chmod +x ./scripts/gtk-launcher.sh
Go to "scripts" folder and execute "gtk-launcher.sh".
If you are using the adw-gtk3 execute "drun.sh" for a fast launch. "emoji.sh" is optional and you need rofi-emoji installed for use.
./gtk-launcher.sh (Rofi arguments) (Your theme without .rasi extension)
Example:
./gtk-launcher.sh -show drun gtk-runner
Reset command (fork):
Use this for recreate templates manually
./gtk-launcher.sh reset
The script uses the templates
folder to use the theme as a template, then it replaces {@CONTEXT}
valid tags and turn it onto a proper GTK style context color, then it outputs it into the themes
folder.
Per default runner.rasi uses GTK 4.0 style context colors.
If you aren't using adw-gtk3 don't use it and adapt it to your liking (Adapt it to GTK 3.0)
If you are using a normal GTK 3.0 theme it's done, use a theme/template that uses GTK 3.0 style and it will work normally.
But if you are using adw-gtk3 you can customize theme colors with Gradience.