Skip to content

vaxp/theme-daemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Theme Daemon Extract

Current standalone status:

  • The extracted code now builds as an independent Meson project from theme-daemon/.
  • The standalone daemon keeps the theme, icon, cursor, font, Xft, GTK modules, and XSETTINGS logic.
  • The standalone daemon now reads runtime settings from ~/.config/vaxp/theme-daemon.ini.
  • Cursor changes are applied through both persistent config files and a live GTK runtime sync path, so running GTK applications update immediately.

Build:

cd theme-daemon
meson setup builddir
ninja -C builddir

Output binary:

  • builddir/plugins/xsettings/theme-daemon

Config example:

  • theme-daemon.ini.example

D-Bus control:

  • Bus name: org.vaxp.ThemeDaemon
  • Object path: /org/vaxp/ThemeDaemon
  • Interface: org.vaxp.ThemeDaemon
  • Methods: SetGtkTheme, SetIconTheme, SetCursorTheme, SetCursorSize, SetInterfaceMode, SetFontName, SetTextScalingFactor, Reload, GetConfigPath

Cursor handling notes:

  • XSETTINGS and Xcursor are still updated for general desktop clients.
  • The daemon also writes cursor settings to: ~/.config/gtk-3.0/settings.ini, ~/.config/gtk-4.0/settings.ini, ~/.gtkrc-2.0, and ~/.icons/default/index.theme.
  • For immediate GTK updates, the daemon initializes GTK at startup and applies gtk-cursor-theme-name and gtk-cursor-theme-size through GtkSettings before refreshing the root-window cursor.

Interface mode notes:

  • interface-mode is read from the [interface] section and accepts: system, light, or dark.
  • The daemon syncs this mode to GTK runtime settings and to the per-user GTK config files so light and dark apply immediately and persist across new application launches.

Modern portal support:

  • A dedicated backend now exists for org.freedesktop.impl.portal.Settings.
  • It exports org.freedesktop.appearance/color-scheme from the same interface-mode value used by the theme daemon.
  • Portal integration is installed for both vaxp and venom desktop IDs, so sessions exporting XDG_CURRENT_DESKTOP=Venom can select the backend.
  • After installing portal files, restart xdg-desktop-portal in the user session before testing GTK4, Chrome, VS Code, or other modern apps.
  • On xdg-desktop-portal 1.18.x, the Settings portal may still probe unrelated GTK/GNOME backends and fail before exporting org.freedesktop.portal.Settings. To avoid that on VAXP/Venom sessions, the installer also ships local gtk.portal and gnome.portal overrides that remove only the org.freedesktop.impl.portal.Settings interface, leaving the rest of those backends untouched.
  • On the user's current system, xdg-desktop-portal reads portal configuration from /usr/local/share/xdg-desktop-portal, but it only scanned implementation descriptors from /usr/share/xdg-desktop-portal/portals. For that reason, the installer places the .portal files and D-Bus service registration in /usr/share so the backend is actually discoverable.
  • This is the path used by newer GTK4 applications, browsers, and other modern clients that listen to the portal settings API instead of legacy XSETTINGS.

Post-install checklist:

  1. Install the daemon and support files:
sudo bash install.sh
  1. Make sure your session manager starts the daemon on login:
/usr/local/bin/theme-daemon
  1. After every install or portal-related update, refresh the user portal environment and restart the portal services:
systemctl --user import-environment XDG_CURRENT_DESKTOP DESKTOP_SESSION
systemctl --user restart xdg-desktop-portal.service
systemctl --user restart xdg-desktop-portal-gtk.service
  1. Confirm the modern appearance portal is active:
gdbus introspect --session \
  --dest org.freedesktop.portal.Desktop \
  --object-path /org/freedesktop/portal/desktop

You should see org.freedesktop.portal.Settings in the output.

  1. Confirm the exported color-scheme value:
gdbus call --session \
  --dest org.freedesktop.portal.Desktop \
  --object-path /org/freedesktop/portal/desktop \
  --method org.freedesktop.portal.Settings.Read \
  org.freedesktop.appearance color-scheme

Expected values:

  • 0 = system
  • 1 = dark
  • 2 = light
  1. Confirm the daemon config file exists:
~/.config/vaxp/theme-daemon.ini
  1. If you change cursor, GTK theme, icon theme, or interface mode from your own control center, make sure it talks to the daemon D-Bus API instead of editing unrelated desktop settings.

  2. If GTK4, Chrome, VS Code, or other modern apps do not react after a fresh install, restart those applications after step 3 so they reconnect to the active portal instance.

Notes:

  • Legacy applications rely on the daemon's XSETTINGS and GTK config file sync.
  • Modern applications rely on the Settings portal path.
  • Both paths must be active for a fully consistent desktop.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors