Repository navigation
feat(settings): Add config profiles - #3867
Conversation
Config profiles are named copies of the user's settings. A profile covers the groups the user picks (theme, wallpaper, bar, dock, fonts and so on), and switching to it only changes those. Profiles show as a gallery in Wallpaper & colors with a right-click menu, and a Control Center widget switches between them. Sync writes later setting changes into the active profile; "Update from current settings" does it on demand. Compare lists the groups where a profile differs from the current settings and applies only the ones the user keeps. The first time Settings opens, the current setup is saved as "Default". Every settings and session key is mapped to a group or to "never" (input, power, display configuration, authentication, custom commands, history), and a test keeps the map complete. `dms profile export|import` packs a profile with its wallpapers into a .tar.gz. Imports are untrusted: entries are allowlisted and size limited, extracted through os.Root into a staging folder, plugin settings and plugin widgets are dropped, command keys are blanked and values that reach a shell or compositor config are kind- and content-checked. An import never applies itself.
|
/claude review |
1 similar comment
|
/claude review |
Claude reviewNo issues found. Checked: the Go |
|
/claude review |
Claude reviewTwo issues to fix before merge.
Checked: Go export, import and CLI (tar extraction limits, path and symlink handling, which settings are dropped, agreement with the shell on paths, ids and format); ConfigProfileService, ConfigProfiles.js and the SettingsData/SessionData apply and sync paths (debounce, switch races, feedback loops, argv-only processes); profile UI, CC widget, capture bar and the DPopout/DOSDSheet/IslandHostChrome grab-peer changes (service refs, D* widgets, deprecated shims, Theme tokens, I18n, Connections). Model: claude-opus-5-5. |
Exports kept plugin settings, which can hold API keys, and the trash command, although imports drop both. Strip on both ends through one path, blank a key whatever kind its value is, and blank the custom launcher logo path, which only names a local file and user. Unsaved editor changes were lost when returning from Compare, and when closing Settings, which also cost a new profile its name and groups during the screenshot flow. The back arrow still discards them. The folder model listed the shell's working directory until the profiles folder was set, so every user got a scan and a file view per folder at startup. It now only exists once the folder does. Keep profile cards across a sync write instead of rebuilding them, and drop the unused updated field.
Map the keys added since, drop the greeter check that upstream removed, and keep Fcitx5 and the profile pages side by side in Settings. Density sets a key's default now, so a key missing from a profile falls back to the default for the density being applied, and the sizes the density hook writes get saved.
The page resets twice while it is created, so restoring and clearing the kept changes in one step lost them on the second reset. Clear them when the page goes away for any reason but closing Settings. Also map the settings keys the shared submodule added.
…shot Changes kept over closing Settings came back with nothing saying so, and Save would have applied them unnoticed. Show that there are unsaved changes at the top of the editor, with a way to discard them. Closing Settings to set up the screen left the user to find their way back to the editor after the capture. Reopen it when the capture ends.
Reopening Settings on the editor loaded the page before it was shown, so it counted as left and threw away the draft holding the image. Only a real activation counts now, and the reopen selects the profile the capture belongs to. A new profile's form is only kept over a close while a capture is pending, otherwise New starts fresh, and kept forms are stored per profile so editing another one doesn't replace them. Back from an editor opened directly goes to Profiles.
|
Both fixes from the issues Claude found are in. I also merged master and sorted the new settings into their groups. Also fixed:
After taking a screenshot for a profile with Settings closed, Settings now opens the editor again. Going back from there lands on Profiles. Closing Settings on a new profile without a screenshot now clears the form instead of keeping the unfinished profile. |
|
/claude review |
Claude reviewNo issues found. Both findings from the last review are fixed: export now strips plugin settings, the trash command and the logo path, and editor changes now survive going to Compare and closing Settings. Checked: the commits since the last review ( |
Claude reviewNo issues found. Checked: the commits since the last review. In 9d05a9a: starting the service on demand ( |
Description
This PR adds config profiles: A copy of the settings with configurable scope to switch between.
This is particularly useful for people who like different configurations for different workloads, as well as everyone who likes to try out new things and wants to keep their old working config as an easy one-click backup.
It also supports export and import, allowing users to share their configurations and potentially helping developers to reproduce bugs more easily.
Main changes and feature list:
.tar.gzthat bundles the wallpapers, also from the CLI (dms profile list|export|import). An import adds a new profile and opens its editor, where you pick which of its groups to keep. Nothing is applied until you switch to it.Planned follow-ups
To keep this PR focused, more features will come later as separate PRs on top of this one, for example:
Notes
ConfigProfiles.js. The failure message for that should be obvious and it enforces that every new addition is evaluated regarding profiles and cant forget to either explicitly in- or exclude it.dms backupalready includes the profiles, but not wallpapers that came in through an import.Type of change
Related issues
Related to #3167. Doesn't directly close this issue, but this might serve as a way to implement the requested feature.
Screenshots / video
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings