I daily drive XMonad on my Arch linux distro. For like 7 months, I had no idea how to change the GTK themes & cursor themes without using programs like lxappearance
Even when I used lxappearance
, it was very buggy and a bad experience in general. I will be explaining how to do all that with minimal dependencies.
I am assumiming that you use .xinitrc
to login, even if you don't you can still follow along.
All GTK applications get their theme from an environment variable GTK_THEME
. You can just add a line in your .xinitrc
export GTK_THEME=catppuccin-frappe-lavender-standard+default # This is the line
exec xmonad
Now to get the theme name. Almost all thems you install with you package manager are in /usr/share/themes
Each theme has it's own subfolder and an index.theme
file in that folder
/usr/share/themes/
|- Theme 1
|- index.theme
|- Theme 2
|- index.theme
the index.theme
looks like this:
[Desktop Entry]
Type=X-GNOME-Metatheme
Name=catppuccin-frappe-lavender-standard+default
Comment=An Flat Gtk+ theme based on Elegant Design
Encoding=UTF-8
[X-GNOME-Metatheme]
GtkTheme=catppuccin-frappe-lavender-standard+default
MetacityTheme=catppuccin-frappe-lavender-standard+default
IconTheme=Tela-circle-Dark
CursorTheme=Frappé-cursors
ButtonLayout=close,minimize,maximize:menu
We are interested in Desktop Entry.Name
which is catppuccin-frappe-lavender-standard+default
Just put that as the value for the env. variable GTK_THEME
To change the cursor theme, create a file ~/.Xresources
with contents:
Xcursor.theme: Bibata-Modern-Ice
Xcursor.size: 22
All the cursor themes are stored in /usr/share/icons/
Each cursor has it's own subfolder
/usr/share/icons/
|- CursorTheme 1
|- index.theme
|- CursorTheme 2
|- index.theme
the index.theme
file looks something like this:
[Icon Theme]
Name=Bibata-Modern-Ice
Comment=White and rounded edge Bibata (v2.0.6). XCursors
Inherits="hicolor"
We are interested in Icon Theme.Name
which is Bibata-Modern-Ice
in this case.
Just put that as the Xcursor.theme