Skip to content

feat(workspace-tray): add workspace tray bar widget with dropdown panel#3072

Open
joao-paulo-santos wants to merge 1 commit into
noctalia-dev:mainfrom
joao-paulo-santos:feat/workspace-tray-widget
Open

feat(workspace-tray): add workspace tray bar widget with dropdown panel#3072
joao-paulo-santos wants to merge 1 commit into
noctalia-dev:mainfrom
joao-paulo-santos:feat/workspace-tray-widget

Conversation

@joao-paulo-santos

@joao-paulo-santos joao-paulo-santos commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new bar widget (workspace_tray) that shows the active workspace name as colored text and opens a dropdown panel on click to switch workspaces. Intended as a minimal alternative to the workspaces widget for users who prefer less visual clutter.

Motivation

The existing workspaces widget shows numbered pills for every workspace. Some users only want to see the current workspace name and switch via a dropdown, similar to workspace switchers in other desktop environments. This widget provides that with a small footprint and full compositor-agnostic workspace data via CompositorPlatform.

Type of Change

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

Related Issue

N/A

Testing

  • ninja -C build clean build
  • python3 tools/i18n-check.py passes
  • clang-format --dry-run --Werror passes
  • Tested on Hyprland with two monitors. Verified workspace name display, dropdown panel open/close, workspace switching, scroll cycling, new-workspace button, and hide_when_empty behavior.

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

2026-06-19.01-25-04.mp4

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

Config example:

[widget.workspace_tray]
type = "workspace_tray"
display = "name"
focused_only = true
max_label_chars = 3
show_new_workspace = true
new_workspace_command = "hyprctl dispatch workspace emptyw"
new_workspace_glyph = "plus"

Widget features:

  • Text-only rendering, no pill background by default; capsule styling adds background when configured
  • Active workspace colored with focused_color; unfocused monitors use occupied_color when focused_only is enabled
  • Scroll to cycle adjacent workspaces
  • Optional chevron indicator
  • hide_when_empty to hide when all workspaces on the monitor are empty

Dropdown panel:

  • Lists all workspaces for the monitor that opened it
  • Active workspace highlighted in focused color
  • Same placement system as other panels (attached / floating / centered with optional open-near-click)
  • Optional new-workspace button with user-defined command and icon

Uses CompositorPlatform exclusively for workspace data and activation. Works across all supported compositors.

@joao-paulo-santos joao-paulo-santos force-pushed the feat/workspace-tray-widget branch 4 times, most recently from aa0e5a1 to 986fc82 Compare June 24, 2026 02:33
New bar widget that shows the active workspace name as colored text
(no pill background by default), with a dropdown panel listing all
workspaces on the current monitor. Click to switch, scroll to cycle.

Widget settings: display mode (id/name), max label chars, show
chevron, focused highlight only (different color per monitor focus),
hide when empty, custom focused/occupied colors, optional new-workspace
button with user-defined command and icon.

The dropdown panel follows the same placement system as other panels
(wallpaper, session, tray-drawer): attached/floating/centered with
optional open-near-click positioning.
@joao-paulo-santos joao-paulo-santos force-pushed the feat/workspace-tray-widget branch from 986fc82 to dde2197 Compare June 24, 2026 05:36
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