Skip to content

feat(workspaces): support min_workspaces for dynamic outputs - #120

Closed
Ashur-D wants to merge 1 commit into
noctalia-dev:mainfrom
Ashur-D:feat/dynamic-min-workspaces
Closed

feat(workspaces): support min_workspaces for dynamic outputs#120
Ashur-D wants to merge 1 commit into
noctalia-dev:mainfrom
Ashur-D:feat/dynamic-min-workspaces

Conversation

@Ashur-D

@Ashur-D Ashur-D commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Adds a min_workspaces configuration option (integer from 1 to 64, default 1) to [workspaces].

When using dynamic workspaces on an output:

  • Initial workspace resolution guarantees at least min_workspaces are created.
  • During dynamic reconciliation (WorkspaceGroup::reconcileDynamic()), empty workspaces with indices < min_workspaces (0-based) are retained rather than pruned.
  • Workspaces beyond min_workspaces continue to be dynamically created and destroyed as views open and close.
  • Runtime changes to min_workspaces trigger workspaceInventory and workspaceLayout refreshes.

Motivation

Users who enjoy dynamic workspaces often still want a persistent minimum set of workspaces (e.g. 3, 4, or 5) always available and visible in their status bar, dock, or overview without having to switch completely to static workspace rules.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Build / packaging
  • Documentation

Related Issue

Testing

  • Added unit tests:
    • tests/unit/config_load.cpp: verifies loading and clamping of min_workspaces (clamp to 1 min, 64 max).
    • tests/unit/config_resolve.cpp: verifies resolveWorkspacesForOutput produces at least min_workspaces on dynamic outputs.
    • tests/unit/config_change.cpp: verifies ConfigEffects::between reports workspaceInventory and workspaceLayout when min_workspaces changes.
  • Automated tests passed:
    • meson test -C build --no-suite umbrielfx (all 35/35 unit tests passed).
  • Code formatting verified with clang-format.

Manual Coverage

  • Tested in a native Umbriel session
  • Tested with native Wayland applications
  • Tested with the scrolling layout
  • Tested with the dwindle layout

Screenshots / Videos

Checklist

  • This PR is ready for review, or it is marked as Draft.
  • This change fits SCOPE.md, or its scope was agreed in an issue or on Discord first.
  • I read and followed the relevant guidance in CONTRIBUTING.md.
  • I ran just format, or this PR has no C++ changes.
  • I ran the relevant build, test, lint, or verification commands, or explained why they were not run.
  • I functionally verified compositor behavior where automated checks are insufficient.
  • I self-reviewed the changes.
  • I checked for new warnings or errors.
  • I updated docs/ and examples/config.toml, or this PR does not change user-facing configuration or behavior.
  • I used canonical names for config keys, IPC actions, paths, and identifiers.

Additional Notes

None.

@ItsLemmy

ItsLemmy commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR, as you pointed on Github yesterday it was a bit of a shortcut to get it working.
I rewrote a more global approach with "min_workspaces" per output, so people with multi monitors can profit from the feature. Thanks none the less for your input! every contribution matters.

@ItsLemmy ItsLemmy closed this Sep 4, 2026
@ItsLemmy

ItsLemmy commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Implemented in c34d7b9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants