Skip to content

feat(workspace):color cycling#3198

Open
ayanamixxx wants to merge 3 commits into
noctalia-dev:mainfrom
ayanamixxx:feat/workspace-color-cycle
Open

feat(workspace):color cycling#3198
ayanamixxx wants to merge 3 commits into
noctalia-dev:mainfrom
ayanamixxx:feat/workspace-color-cycle

Conversation

@ayanamixxx

@ayanamixxx ayanamixxx commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Adds optional color cycling for the bar workspaces widget.

New workspace settings:

[widget.workspaces]
color_mode = "cycle"
cycle_colors = ["#5BCEFA", "#F5A9B8", "#FFFFFF"]

When color_mode is set to cycle, active and occupied workspaces use colors from cycle_colors based on the workspace number.

Empty workspaces keep the existing empty_color behavior, and urgent workspaces keep the existing error color.

The feature also works with minimal = true, where the workspace text color follows the same cycle.

Motivation

This makes it possible to create repeating workspace color schemes without replacing the native workspaces widget or relying on plugin/external workarounds.

The default behavior is unchanged because color_mode defaults to state.

Type of Change

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

Related Issue

N/A

Testing

Ran:

just format
just build
just test
just lint
noctalia-dev-validate
python3 tools/i18n-check.py

Manual testing:

  • Tested color_mode = "cycle" with hex colors.
  • Tested normal workspace mode.
  • Tested minimal = true.
  • Verified empty workspaces keep the existing empty color behavior.
  • Verified invalid color_mode values fall back to state mode with a warning.
  • Verified color_mode = "cycle" with an empty cycle_colors list falls back to state mode with a warning.

Manual Coverage

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor:
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors

Screenshots / Videos

Example config:

[widget.workspaces]
color_mode = "cycle"
cycle_colors = ["#5BCEFA", "#F5A9B8", "#FFFFFF"]
image

Checklist

  • This PR is ready for review, or it is marked as Draft.
  • I read and followed the relevant guidance in CONTRIBUTING.md.
  • I ran just format with clang-format v22+ installed, or this PR has no code changes.
  • I ran the relevant build or test commands, or explained why they were not run.
  • I self-reviewed the changes.
  • I checked for new warnings or errors.
  • I will update end-user documentation after merge, or this PR does not change user-facing configuration or behavior.
  • I added or updated assets/translations/en.json, or this PR adds no new user-facing strings.
  • I did not edit non-English translation files unless this PR is explicitly for translation tooling, an import/export sync, or a maintainer-requested locale change.
  • I used the existing canonical names for config keys, IPC names, paths, and identifiers.

Additional Notes

This is intentionally opt-in. Existing workspace coloring remains unchanged unless color_mode = "cycle" is configured.

I kept color_mode registered as an advanced string setting for now to avoid adding new user-facing translation keys. Happy to adjust this to a segmented/select setting if preferred.

@ayanamixxx ayanamixxx changed the title Add workspace color cycling Feat Add workspace color cycling Jun 28, 2026
@ayanamixxx ayanamixxx changed the title Feat Add workspace color cycling feat(workspace):color cycling Jun 28, 2026
@ayanamixxx ayanamixxx force-pushed the feat/workspace-color-cycle branch from 90fc475 to ec9d479 Compare June 29, 2026 07:26
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.

1 participant