0

I can change the theme using lxappearance and everything works. This includes pcmanfm, gnome-disks, firefox, and qalculate-qt themes being changed. Using gsettings set org.gnome.desktop.interface gtk-theme "Adwaita" or using dconf-editor doesn't change the theme on the listed test applications.

Following https://unix.stackexchange.com/a/323065/234626 I can get gnome-disks to change, but not pcmanfm or qalculate-qt.

Likewise, following https://unix.stackexchange.com/a/670600/234626 only works for GTK applications and using an environment variable will not let me create a script to toggle between themes.

$DESKTOP_SESSION is not set and running export | grep gtk procudes:

GTK2_RC_FILES=/home/user/.config/gtk-2.0/gtkrc-2.0
GTK3_MODULES=xapp-gtk3-module
GTK_MODULES=canberra-gtk-module

All I want to be able to do is change between Adwaita and Adwaita-dark using a the command line the way lxappearance works. I am running Manjaro XFCE edition with XCFE uninstalled. I launch xmonad using startx if that is relevant.

1 Answer 1

2

One way is to modify two config files using shell script (or choose your favorite language for script) - You could parse and modify gtk-theme-name settings.

That is, modify config files:

  • GTK2: $GTK2_RC_FILES
  • GTK3: $HOME/.config/gtk-3.0/settings.ini

which contains the following line:

  • GTK2: gtk-theme-name="Adwaita-dark"
  • GTK3: gtk-theme-name=Adwaita-dark

and exchange the Adwaita-dark part (Or the theme you currently have) with Adwaita (Or the theme you want).

Or perhaps you could have predefined theme files, and copy the files onto the above config files through shell script.

Do you want to change theme when a key is pressed? Then it should be doable from xmonad config side - launch the script to change theme, or modify the file directly.

1
  • 1
    This worked for all the test programs except pcmanfm
    – Brandon
    Mar 8, 2022 at 22:13

You must log in to answer this question.

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