Change GTK4 application theme in GNOME 40+?

Change GTK4 Theme On GNOME 40+ Desktop Environments

With the ongoing migrations of the GNOME applications from GTK3 to GTK4, it is hard to apply one theme like we used to do earlier from the Gnome Tweaks application.

Several applications now use GTK4 while, GTK3 is also used by many applications, which may result in inconsistencies and not look good.

Although the default Dark mode of Gnome looks good, there’s nothing wrong with customizing as it is an integral part of using Linux-based distributions.

Default GNOME Dark Theme
Default GNOME Dark Theme

In this tutorial. I will show you how to change the theme of both GTK3 and GTK4 applications in the GNOME desktop environment, we will be using Fedora 37 and GNOME 43 for this purpose, but you can follow the steps even if you have GNOME 40-42 versions.

Enable GNOME extensions

Visit the GNOME extensions official website from your web browser and download the extension and then reload the page.

Install Browser Extension
Install Browser Extension

Finally, search for the ‘User Theme’ extension and simply enable it, if prompted, simply click on the install button.

Install User Theme Extension
Install User Theme Extension

Once installed, it is usually recommended to log out and log in again to your PC, so this extension can start properly. Once you’re done, let’s decide which theme we would like to implement on our PC.

Download Themes

You can go to the GNOME look website to download any GTK4 theme you want, but for this tutorial, I’m downloading the TokyoNight theme.

Downloading A GTK4 Theme
Downloading A GTK4 Theme

Once downloaded, go to your Downloads folder in the file manager and then extract the zip file, and Copy/Cut the extracted directory. Now, go back to your Home directory and then create a new folder named .themes. Note that adding a dot (.) before a directory/file hides it, so press Ctrl+H on your keyboard to view hidden directories.

Finally, paste your extracted theme folder into the directory we just created.

Paste The Extracted Directory Into The Themes Folder
Paste The Extracted Directory Into The Themes Folder

There is usually a GTK4 folder inside these themes, make sure to copy all the contents from that folder (usually a CSS file and assets), and paste it into ~/.config/gtk-4.0/ directory.

Copy And Paste The Contents In The Specified Directory
Copy And Paste The Contents In The Specified Directory

We’re almost done, for the rest of the theme, we have to install an application called GNOME Tweaks.

Installing GNOME Tweaks

This tool is available in the repositories of all the Linux distributions, so you can either install it directly from your software center or from the command line by typing the following commands :

# On Debian and Ubuntu Based distributions :
sudo apt update && sudo dnf install gnome-tweak-tool

# On Arch Linux
sudo pacman -S gnome-tweak-tool

# On Fedora Workstation
sudo dnf install gnome-tweak-tool
Installing Gnome Tweaks On Fedora Linux
Installing Gnome Tweaks On Fedora Linux

Applying the Theme

Once installed, simply launch it from your Applications Grid/Applications Menu. And it’s very easy after that. Go to the Appearance tab and change your Shell and Legacy applications to the theme we downloaded (in my case, TokyoNightDark). And restart your all open applications.

TokyoNight Theme On GTK4 Applications
TokyoNight Theme On GTK4 Applications

You can also find a matching Icon theme from the same website to give your desktop a more uniform look. You can change your Icon theme by placing them in the ~/.icons directory.

Summary

Overall, the GTK4 looks very uniform and hopefully, all the applications switch to it from GTK3 as well, however, there are still applications that use other toolkits such as QT (VLC media player uses it), and you have to install and use Kvantum Manager to change their look.

Achieving a uniform look is really hard on the Linux desktop because of its open-source nature and huge fragmentation. However, It’s nice to see the GNOME developers agreeing on a standard.