Detects and displays current GTK and KDE Plasma theme settings in xfetch.
| Kind |
info_provider |
| Binary |
xfetch-plugin-theme-detection |
| Dependencies |
gsettings (GTK), plasmarc/kdeglobals (KDE) |
cargo build --release --manifest-path plugins/theme-detection/Cargo.toml
xfetch plugin install theme-detection
{
"info_plugins": [
{
"plugin": "theme-detection"
}
],
"modules": [
"os",
"kernel",
"plugin:theme-detection",
"shell",
"cpu",
"memory"
]
}
The theme-detection plugin does not require any arguments.
| Environment |
Example Output |
| GNOME / GTK |
GTK Theme: Adwaita-dark (dark) Icons: Adwaita Cursor: Adwaita Font: Cantarell 11 |
| KDE Plasma |
GTK: Breeze (light) Plasma: breeze-dark Colors: BreezeDark Icons: breeze-dark Cursor: breeze_cursors |
| Windows |
Windows Theme: Dark Accent: #00B9FF |
| No theme detected |
Theme: not detected |
- xfetch sends a JSON request with kind: "info_provider".
- On Linux/macOS the plugin reads GTK settings via gsettings get org.gnome.desktop.interface; KDE Plasma themes are read from ~/.config/plasmarc and ~/.config/kdeglobals.
- On Windows it reads the registry: light/dark mode from HKCU\...\Themes\Personalize\AppsUseLightTheme and the accent color from HKCU\...\DWM\ColorizationColor.
- The plugin returns a JSON response with the formatted lines.
- xfetch displays them under the plugin:theme-detection module key.
- GTK detection works on any desktop using gsettings (GNOME, Budgie, Cinnamon, etc.).
- KDE detection reads from standard Plasma config files.
- If both GTK and KDE are detected, both are shown (GTK listed first).
- Uses prefer-dark/prefer-light color scheme from GNOME for dark/light detection.