Skip to content

[BUG] GTK theme/icons/font not detected on standalone WMs (Hyprland, sway, niri, i3) #2504

Description

@HashimAbdulaziz

Read the FAQ first

  • I have checked the FAQ but the issue is not covered

Description

On a standalone Wayland compositor, Theme/Icons/Font report "not found" even though the values are set in org.gnome.desktop.interface.

$ gsettings get org.gnome.desktop.interface gtk-theme
'adw-gtk3-dark'
$ gsettings get org.gnome.desktop.interface icon-theme
'WhiteSur-dark'
$ gsettings get org.gnome.desktop.interface font-name
'Adwaita Sans 11'

$ fastfetch --structure Theme:Icons:Font:Cursor --logo none
Theme: No themes found
Icons: No icons could be found
Font: No fonts found
Cursor: Bibata-Modern-Classic (24px)      <- cursor resolves, the rest don't

Root cause

detectGTKFromSettings() (src/detection/gtk_qt/gtk.c) is an else if chain on wmde->dePrettyName covering XFCE / Cinnamon / MATE / GNOME-family / Enlightenment. Anything else falls through to GTK config-file parsing, which no longer holds these values.

The trigger is an unmatched DE name, not an empty one. Instrumenting the function on Hyprland gives dePrettyName="" (len=0), but varying XDG_CURRENT_DESKTOP on the same machine shows non-empty names fail identically:

Hyprland  ->  dePrettyName=""        Theme: No themes found
sway      ->  dePrettyName="sway"    Theme: No themes found
river     ->  dePrettyName="river"   Theme: No themes found
niri      ->  dePrettyName="niri"    Theme: No themes found
i3        ->  dePrettyName="i3"      Theme: No themes found
GNOME     ->  dePrettyName="GNOME"   Theme: adw-gtk3-dark [GTK2/3/4]

Only the Hyprland row is a live session — the others were produced by setting XDG_CURRENT_DESKTOP on this Hyprland machine. The branch reads only that value so it exercises the same path, but I haven't run those compositors and don't want to claim I have.

The GNOME row is the useful part: one env var flips it, and the existing ffSettingsGetGnome() calls read the correct values. The data is reachable; only the branch is missing.

Proposed fix

Adding an else that calls the same ffSettingsGetGnome keys produces:

Theme: adw-gtk3-dark [GTK2/3/4]
Icons: WhiteSur-dark [GTK2/3/4]
Font: Adwaita Sans (11pt) [GTK2/3/4]
} else if (!ffStrbufIgnCaseEqualS(&wmde->dePrettyName, FF_DE_PRETTY_PLASMA)) {
    themeName = ffSettingsGetGnome("/org/gnome/desktop/interface/gtk-theme", "org.gnome.desktop.interface", nullptr, "gtk-theme", FF_VARIANT_TYPE_STRING).strValue;
    iconsName = ffSettingsGetGnome("/org/gnome/desktop/interface/icon-theme", "org.gnome.desktop.interface", nullptr, "icon-theme", FF_VARIANT_TYPE_STRING).strValue;
    fontName = ffSettingsGetGnome("/org/gnome/desktop/interface/font-name", "org.gnome.desktop.interface", nullptr, "font-name", FF_VARIANT_TYPE_STRING).strValue;
    cursorTheme = ffSettingsGetGnome("/org/gnome/desktop/interface/cursor-theme", "org.gnome.desktop.interface", nullptr, "cursor-theme", FF_VARIANT_TYPE_STRING).strValue;
    cursorSize = ffSettingsGetGnome("/org/gnome/desktop/interface/cursor-size", "org.gnome.desktop.interface", nullptr, "cursor-size", FF_VARIANT_TYPE_INT).intValue;
}

Plasma is excluded deliberately. A bare else silently changed KDE from No themes found to adw-gtk3-dark, because Plasma isn't in the chain; since kde-gtk-config manages GTK settings there it could misreport, and I have no KDE system to check on. XFCE, MATE and Cinnamon are unaffected either way.

Degradation is clean: no DBus session bus still resolves via GSettings; no schemas and no DBus returns No themes found at exit 0 with no crash; empty HOME resolves via system schemas.

wallpaper is left unset on purpose — the GNOME branch fills it from org.gnome.desktop.background, but on standalone WMs that's owned by hyprpaper/swww. Output verified identical before and after.

Would you take a change of that shape, or would you rather standalone WMs keep reporting no theme?

Version used

fastfetch 2.66.0 (x86_64) — also reproduced on dev (2.67.0-15)

Bug prevalence

Always

Regression

No

Installation

Package manager

Package manager

dnf

Screenshots

No visual changes — output shown inline above.

Configuration

Stock; no ~/.config/fastfetch/ present.

System information

OS: Fedora Linux 43 (Workstation Edition) x86_64
Kernel: Linux 7.1.6-101.fc43.x86_64
DE: No DE found
WM: Hyprland 0.51.1 (Wayland)
Theme: No themes found
Icons: No icons could be found
Font: No fonts found
Cursor: Bibata-Modern-Classic (24px)

Features built-in

linux-headers 7.1.3
threads
vulkan
wayland
xcb-randr
xrandr
drm
gio
dconf
eet
dbus
imagemagick7
chafa
zlib
sqlite3
rpm
egl
glx
opencl
libpulse
libddcutil
libelf
libzfs
va-drm
va-x11
vdpau
System yyjson
linux/videodev2
Embedded wcwidth
Lua 5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions