6

I was able to change my GTK theme with lxappearance but would prefer to know the command (or multiple commands, if GTK2 and GTK3 themes need to be set separately).

At the moment, I'm on an Ubuntu derivative with i3wm but I was curious whether there is a general command/answer--other answers on the Internet appear outdated. I had tried setting org.gnome.desktop.interface gtk-theme but I imagine that only works in GNOME environments (not i3wm).

2 Answers 2

12

Open ~/.config/gtk-3.0/settings.ini and change the line that begins with gtk-theme-name

1

To run any gnome/gtk3,4 application from the command line while setting the gtk theme to any theme installed in /usr/share/themes (or the user directory, e.g. generally $HOME/.local/share/themes) you can simply use the GTK_THEME="...your theme name..." environment variable,

e.g. to run gnome-sudoku with the Material-Black-Blueberry theme, you would do:

$ GTK_THEME="Material-Black-Blueberry" gnome-sudoku

Using the GTK_THEME environment variable allows you to test a number of different themes much more quickly than editing /etc/gtk-3.0/setting.ini (and/or /etc/gtk-4.0/setting.ini) every time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .