thinkpad: declarative dconf — keyfile → file-db layered under the user-db #72
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "glen/thinkpad-dconf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
GNOME/GTK settings become declarative using only the existing
[[files]]/[[units]], with no engine change. dconf's own~/.config/dconf/useris a mutable binary database the desktop rewrites on every toggle, so it can't be a store symlink. Instead, the declared settings become a layer under it.How it works
files/.config/dconf/bubblebox.d/00-thinkpadis a curated dconf keyfile (46 keys covering interface/theme, keyboard + caps↔esc, wm buttons and keybindings, the Vicinae Super+Space custom shortcut, power/idle, night light, shell extensions + favorites, Ptyxis and file-chooser). It holds preferences only, with no app state such as window sizes, timestamps or portal grants. Every value matches what's on think today.files/.config/dconf/bubblebox.profilelistsuser-db:user, thenfile-db:~/.local/state/dconf/bubblebox, then Fedora's stocksystem-dbs.files/.config/environment.d/20-dconf.confsetsDCONF_PROFILE, so the systemd user manager, D-Bus-activated readers (gsd-*, portals, dconf-service) and the session all see it.units/dconf-bubblebox-compile.{service,path}runsdconf compile(temp file + rename) at login and whenever the keyfile symlink changes.cjust bubblebox-applyalso starts it directly.dconf resetfalls back to the repo value, and a key removed from the file stops being a default.generations switchrolls the layer back like any other file.dconf-bubblebox([[files]]) has three commands.statusshows shadowed keys (personal copy == declared) and overridden keys (local value differs).adoptbacks up the user-db, then resets shadow copies so the layer shows through; it refuses unless the profile is live in the session.accept <key>drops one override.thinkpad-bubblebox-checknow pings once per distinct state when a declared key is overridden with a different value.gnome-right-click-resizerecipe, and the icon-theme write incjust icons, which would otherwise plant an override over the declaredPapirus-Dark.Verified on think (GNOME session)
gsettingsreads declared values through the profile from an empty user-db.dconf reset, the stock profile returns nothing, the bubblebox profile returns the declaredtrue, andgsettingsagrees. The value was then restored.dconf-bubblebox statusagainst the real user-db finds 46 declared keys: 46 shadowed and 0 overridden (the curation matches exactly).bubblebox --profile <this> planagainst the live system shows only the expected new links/units plus enables. No conflicts, generation57641124 → a490c78e.systemd-analyze --user verifypasses for both units.Not yet verified: the
environment.d→ logged-in session path (gsd/portals actually reading the file-db) needs a real logout/login. Rollout:cjust bubblebox-apply.systemctl --user show-environment | grep DCONFanddconf-bubblebox status(expect 46 shadowed).dconf-bubblebox adopt, then spot-check that Settings still shows the same values.Rollback is
generations switch <prev>plus a re-login; the adopt backup sits at~/.config/dconf/user.pre-adopt.*.