Skip to content

feat(settings): Add config profiles - #3867

Merged
purian23 merged 10 commits into
duxlabs-dev:masterfrom
Conava:config-profiles
Nov 14, 2026
Merged

purian23 merged 10 commits into
duxlabs-dev:masterfrom
Conava:config-profiles

Conversation

@Conava

@Conava Conava commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • Profiles show as a gallery under Wallpaper & colors. Clicking a profile switches to it, the right-click menu has Apply, Partial apply, Edit and Delete. "Manage profiles" opens the full page with New Profile and Import.
  • A profile covers the groups you pick (theme, wallpaper, bar, dock, fonts and so on, organized in four categories), and switching only changes the active ones.
  • Syncs saves changes into the active profile shortly after they are made. It's on by default and can be turned off per profile, with "Update from current settings" to save on demand or save the current settings to a different, not active profile.
  • Compare shows the differences between a profile and the current settings, allowing selective application to the users current settings.
  • Export and import as a .tar.gz that 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.
  • A Control Center widget to switch profiles, and a import or screenshot button for the profile's preview image.

Planned follow-ups

To keep this PR focused, more features will come later as separate PRs on top of this one, for example:

  • Backups that save one or more profiles automatically or manually to a local or remote location.
  • More depth in compositor settings and window rules in profiles.
  • Keybinds, automations and more in profiles, so for example a work and a personal profile can differ in more than their look.
  • More of the lock screen settings.
  • Switching profiles automatically, for example by time of day or connected monitors.
  • Sharing profiles in a hub like plugins and themes
  • A set of curated Profiles, either for all or for new users only

Notes

  • Design discussion in discord > dux-designs > DMS profiles holds more context
  • We discussed putting this under User & Accounts, bt doesn't really fit there yet since it's mostly about how things look, so for now it lives in Wallpaper & colors. It would fit well on a Settings home or quick settings page once there is one. The gallery is already its own settings page, so I can convert it to a tab quickly if that is preferred over the current placement.
  • The first time Settings opens, the current setup is saved as a profile named Default with sync on.
  • Some settings never travel with a profile because they belong to the machine or the user: input, power and battery, display configuration, lock screen and greeter authentication, night mode, custom commands, launcher and notification history, and the weather location. History is excluded on purpose, since turning it off in a profile would delete it on every switch. Some of those may be revisited once the scope of profiles is expanded.
  • Every settings and session key is either in one of the groups or marked explicitly as not included, and I did create a test to enforce that. So a PR that adds a new key fails that test until the key gets a line in 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.
  • Imports are treated as untrusted since they're meant to be shared: plugin settings, plugin widgets and the dock's custom trash command are dropped, values that reach a shell or a compositor config are checked, and the archive is extracted with size limits into a staging folder. Only risk here could be a very slow regex pattern.
  • Missing settings in a profile are always kept as-is when activating the profile, so a plugin newly installed while using profile A will keep working and keep its settings when switching to profile B, even though it is not included in profile B's config.
  • dms backup already includes the profiles, but not wallpapers that came in through an import.
  • It adds 17 new strings for i18n.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

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

screenshot_2026-10-22_14-10-30 screenshot_2026-10-22_14-10-39 screenshot_2026-10-22_14-20-29 screenshot_2026-10-22_14-20-55 screenshot_2026-10-22_14-24-03 screenshot_2026-10-22_14-24-12 screenshot_2026-10-22_14-24-19 screenshot_2026-10-22_14-24-32 screenshot_2026-10-22_14-57-51 screenshot_2026-10-22_14-57-58

Checklist

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.
@purian23

Copy link
Copy Markdown
Member

/claude review

@github-actions

Copy link
Copy Markdown
Contributor

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.

Checked: the Go configprofile package and dms profile CLI (tar extraction limits, path and symlink handling, which settings are dropped on import, agreement with the shell on paths and ids); ConfigProfileService, ConfigProfiles.js and the SettingsData/SessionData apply and save paths (sync debounce, switch races, feedback loops, argv-only process calls, id validation); the profile UI, control center widget and capture bar (service refs, D* widgets, Deprecation shims, Theme tokens, I18n, Connections usage, the grab-peer changes to DPopout/DOSDSheet/IslandHostChrome). Model: claude-opus-5-5.

@purian23

purian23 commented Nov 7, 2026

Copy link
Copy Markdown
Member

/claude review

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

Two issues to fix before merge.

  • Export puts plugin settings, including API keys, into the shared archive. Import drops them, so export should too. core/internal/configprofile/configprofile.go:215
  • Going to Compare and back resets unsaved edits in the profile editor. quickshell/Modules/Settings/ProfileEditTab.qml:118

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.
@github-actions github-actions Bot added core Go daemon and CLI under core/ feature ui Quickshell UI under quickshell/ labels Nov 7, 2026
@Conava

Conava commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Both fixes from the issues Claude found are in.
Exports now leave out everything that gets dropped on import so plugin settings and the dock's trash command are not in the archive anymore. The custom launcher logo path is left out too. Unsaved changes in the editor now survive going to Compare and back, and closing Settings. When they come back after closing Settings, the editor shows that there are unsaved changes and lets you discard them, so they are not saved by accident.

I also merged master and sorted the new settings into their groups.

Also fixed:

  • a bug where the shell scanned its working directory at startup for every user, even when profiles were never used
  • a bug where the profile cards were rebuilt after every synced change
  • a bug where a profile saved at another density could apply the wrong bar and dock sizes

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.

@Conava

Conava commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

/claude review

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No 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 (stripUnshared on export and import, blankKey on any value type, the FolderListModel only loading once the folder exists, ScriptModel keyed by id in ProfileGrid, the per-id configProfileEdits and how they are restored and dropped against pageActive, _release and page teardown in _syncPages, the screenshotEnded reopen in DMSShell and every place that emits it, backPage in setPage, and the "New profile" draft guard in openPage); how the master merge was resolved in applyProfileSettings (density defaults) and the commands list; added QML for deprecated Dank* names; catalog terms. Model: claude-opus-5-5.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found.

Checked: the commits since the last review. In 9d05a9a: starting the service on demand (_wanted, ensureDefault now only on the Profiles page and the CC widget, the grid hidden until a profile exists), _settingsDirty and the session-only comparison in _sync (activate still runs a full sync, so changes made by hand are not lost on a switch), selectForSettings, pageActive defaulting to false in ProfileInspectTab (the Loader binding still runs _reset), cloneDef in SessionData, and _isImageName against Go isPreviewName. In the master merge: how the new keys were sorted into groups, including the compositorAnimation* keys, which CompositorAnimations.generate normalizes and clamps before writing compositor config. Also checked the new tokens (SettingsMetrics.previewTileMinWidth, Theme.fullRadius). Model: claude-opus-5-5.

@purian23
purian23 merged commit f883132 into duxlabs-dev:master Nov 14, 2026
7 checks passed
@Conava Conava mentioned this pull request Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Go daemon and CLI under core/ feature ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants