GTK, or the GIMP Toolkit, is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK is suitable for projects ranging from small one-off tools to complete application suites
GTK was initially made by the GNU Project for GIMP, but it is now a very popular toolkit with bindings for many languages. This article will explore the tools used to configure the GTK theme, style, icon, font and font size, and also detail manual configuration.
Configuration
GTK-3
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.interface gtk-theme "Breeze-Dark"
gsettings set org.gnome.desktop.interface icon-theme "Papirus"
gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"
Code Snippet 1:
gtk command line using gsettings
[Settings]
gtk-theme-name=Breeze-Dark
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-key-theme-name=Emacs
gtk-font-name=JetBrainsMonoNL Nerd Font Mono 8
gtk-sound-theme-name=freedesktop
gtk-icon-theme-name=Papirus
gtk-cursor-theme-name=Bibata-Modern-Classic
gtk-application-prefer-dark-theme=1
gtk-xft-rgba=rgb
Code Snippet 2:
~/.config/gtk-3.0/settings.ini
GTK-4
[Settings]
gtk-theme-name=Breeze-Dark
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-key-theme-name=Emacs
gtk-font-name=JetBrainsMonoNL Nerd Font Mono, 8
gtk-sound-theme-name=freedesktop
gtk-icon-theme-name=Papirus
gtk-cursor-theme-name=Bibata-Modern-Classic
gtk-application-prefer-dark-theme=1
Code Snippet 3:
~/.config/gtk-4.0/settings.ini