DEV Community

Yiannis
Yiannis

Posted on

1 1

Customize GTK+ themes manually

i ended up reading about tweaking on the Fedora magazine which very briefly explained how can you do some customization of your workstation. This makes me want to experiment and try some themes out on my own machine. The question which raised that it is not clear in first glance, how the heck are you doing this if you do not use Gnome Shell, or any other known DE.

i started googling. i found i3-gnome. i3-gnome allows you to use i3wn with Gnome3 Session infrastucture. Although i was thinking that it should be a more straight way.

My approach: install the desired themes and icons from the repos and edit the settings. In Fedora the settings file is under the $HOME/.config/gtk-4.0/settings.ini and looks like this before the editing

[Settings]                                                                                                                                                                                                                                   
gtk-application-prefer-dark-theme=0                                                                                                                                                                                                          
Enter fullscreen mode Exit fullscreen mode

But what settings i can use. Go to https://developer.gnome.org/gtk3/stable/GtkSettings.html and find what you want under the Properties.

So focusing in the console i run:

sudo dnf install flat-remix-gtk2-theme flat-remix-gtk3-theme
sudo dnf install yaru-icon-theme.noarch
Enter fullscreen mode Exit fullscreen mode

Search for more icons with dnf search icon-theme and themes with dnf search gtk2-theme, dnf search gtk3-theme`

What i needed from the Settings was gtk-theme-name and for the icons gtk-icon-theme-name


[Settings]
gtk-application-prefer-dark-theme=0
gtk-theme-name=Flat-Remix-GTK-Green-Solid
gtk-icon-theme-name=Yaru

Alt Text

The value i guess is the folder name that can be found in /usr/share/themes/. for instance, in my case the directory is
/usr/share/themes/Flat-Remix-GTK-Green-Solid
In the same way Yaru icons are located in /usr/share/icons/Yaru


❯ ls /usr/share/icons/Yaru
128x128 16x16 16x16@2x 22x22 24x24 24x24@2x 256x256 256x256@2x 32x32 32x32@2x 48x48 48x48@2x 64x64 8x8 8x8@2x cursors cursor.theme index.theme scalable scalable-max-32

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay