2

When I search for a way to change the gtk theme in Linux, I find that there is a different way to do it for every desktop environment. The only one I found that worked on all desktop environments was by changing a configuration file manually (https://unix.stackexchange.com/a/323065), but the problem with this solution is that it is only applied after a reboot. Is there any way to change the GTK theme on any desktop environment through the command line that applies without a reboot (even if the theme is only applied untill the user logs out)?

EDIT: A way to do this in C or Python is an accepted answer as well

1 Answers1

1

I found an answer in C by looking up functions referenced in the source code for the LDXE settings manager that changes the gtk theme. Eventually, I ended up here where I found a function that does the same thing in C. The function will reload the theme from the configuration file referenced in the original question, and apply it.

I just need to change the GTK configuration file like the answer linked in my question did, and then run this function to apply it. Problem solved!