vinceliuice / WhiteSur-gtk-theme

MacOS like theme for all gtk based desktops
MIT License
6.01k stars 616 forks source link

[Workaround] Dynamically change libadwaita Theme #913

Open in-famous-raccoon opened 1 year ago

in-famous-raccoon commented 1 year ago

Hi,

I just figured out how to dynamically change libadawaita themes and thought I'd share my solution here. I have created the Light variant with: ./install.sh -l -c Light And then rename the gtk.css file in $HOME/.config/gtk-4.0 to gtk-Light.css. After that created the Dark Variant ./install.sh -l -c Dark and renamed to gtk-Dark.css

Now we need the Night-Theme-Switcher Extension. Here we can execute a command at "sunrise" and "sunset".

Now we can link the Files based on sunrise and sunset: Sunrise: ln -fs $HOME/.config/gtk-4.0/gtk-Light.css $HOME/.config/gtk-4.0/gtk.css Sunset: ln -fs $HOME/.config/gtk-4.0/gtk-Dark.css $HOME/.config/gtk-4.0/gtk.css

The only issue is that you need to close the Gnome Apps to apply. Also nautilus/Files needs to be closed for some seconds to apply.

Maybe you want to include this, or somebody else find this useful.

Thanks again for all the work on this great Theme!

vinceliuice commented 1 year ago

If there is a extension can run this command follow the dark mod setting that would be perfect

major-mayer commented 1 year ago

What do you mean by that? Is there a command that we should rather execute than the one that @in-famous-raccoon posted?