FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

plugins/plugins/theme-detection at main · xfetch-cli/plugins · GitHub

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

 Theme Detection Plugin

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)

Build

cargo build --release --manifest-path plugins/theme-detection/Cargo.toml

Install

xfetch plugin install theme-detection

Configuration

{
  "info_plugins": [
    {
      "plugin": "theme-detection"
    }
  ],
  "modules": [
    "os",
    "kernel",
    "plugin:theme-detection",
    "shell",
    "cpu",
    "memory"
  ]
}

The theme-detection plugin does not require any arguments.

Output

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

How It Works

  1. xfetch sends a JSON request with kind: "info_provider".
  2. 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.
  3. On Windows it reads the registry: light/dark mode from HKCU\...\Themes\Personalize\AppsUseLightTheme and the accent color from HKCU\...\DWM\ColorizationColor.
  4. The plugin returns a JSON response with the formatted lines.
  5. xfetch displays them under the plugin:theme-detection module key.

Notes

  • 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.

Back | FazBrowse Home | New Git URL