theming: set gtk-theme via dconf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4edadbd2c2
commit
7245a69088
1 changed files with 10 additions and 3 deletions
|
|
@ -605,12 +605,19 @@ let
|
|||
# one event, and needed a Ctrl+R sendshortcut here — which dropped calls.)
|
||||
|
||||
# Point GTK3 at this wallpaper's theme. Every wallpaper has its own theme
|
||||
# name, so this is always a real change: gsettings emits, the portal
|
||||
# name, so this is always a real change: dconf emits, the portal
|
||||
# forwards it, and running GTK3 apps reload the named theme — no restart,
|
||||
# no away-and-back dance.
|
||||
#
|
||||
# dconf, not gsettings: gsettings refuses without the compiled schemas,
|
||||
# and nothing here puts them on XDG_DATA_DIRS — not quickshell's env, not
|
||||
# the user manager's — so every `gsettings set` answered "No schemas
|
||||
# installed" and GTK3 sat on whichever theme last landed. dconf writes the
|
||||
# same key straight into the store the portal watches. The value is a
|
||||
# GVariant, hence the inner quotes.
|
||||
gtktheme=$(cat "$theme/gtk-theme-name")
|
||||
${pkgs.glib.bin}/bin/gsettings set org.gnome.desktop.interface gtk-theme "$gtktheme" \
|
||||
|| echo "gsettings set gtk-theme $gtktheme failed"
|
||||
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/gtk-theme "'$gtktheme'" \
|
||||
|| echo "dconf write gtk-theme $gtktheme failed"
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue