Skip to content

workspaces: show empty hyprland workspaces in between - #4459

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:hyprland-fill-workspace-gaps
Nov 28, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:hyprland-fill-workspace-gaps

Conversation

@Conava

@Conava Conava commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Description

The Hyprland workspace switcher currently only shows the active and the existing workspaces. The empty workspaces between 1 and the highest used one were missing and are added in this PR, so it's easier to see where the current workspace sits. With windows on 1, 2 and 5 it shows 1 2 3 4 5 instead of 1 2 5.
I did this with persistent workspace rules from a Lua script in my Hyprland config until now, and I think it's a better default without needing one.

With multiple monitors each bar fills up to its own highest workspace and leaves out the ones on other monitors. "Show occupied workspaces only" still hides all empty ones like before and now this options actually does work as intended for hyprland users.

No new terms to translate.

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

Screenshots / video

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

Hyprland only reports workspaces that exist, so the switcher showed
1 2 5 with windows on 1, 2 and 5, which made it hard to see where the
focused workspace sits. Fill the empty numbered workspaces from 1 up to
the highest listed one, using the same path as workspace padding, so
ids owned by or bound to another monitor stay skipped. Showing occupied
workspaces only turns the fill off.
@github-actions github-actions Bot added feature ui Quickshell UI under quickshell/ labels Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: hyprlandWorkspacesForScreen gap fill against padding, occupied-only, follow-focus and per-monitor modes, named (-1/-1337) and special ids, the empty-workspace fallback, workspace-rule monitor binding, the CompositorService caller and the updated test. Model: claude-opus-5-5.

@bbedward
bbedward merged commit 05710d7 into duxlabs-dev:master Nov 28, 2026
5 checks passed
@ad-on-is

ad-on-is commented Dec 1, 2026

Copy link
Copy Markdown

Nooooo, this broke my setup :-D

I have workspaces like this:

  • 11,12,13 on monitor A
  • 21,22,23 on monitor B

This allows me to have 3 workspaces on each monitor, which I can then switch to with keyboard shortcuts. my bash-script takes the current workspace index "11" increases/decreases it by 1, depending whether I want to go to the next or previous workspace.

Now the bar is cluttered with workspaces 1-13.

@Conava

Conava commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Nooooo, this broke my setup :-D

I have workspaces like this:

  • 11,12,13 on monitor A
  • 21,22,23 on monitor B

This allows me to have 3 workspaces on each monitor, which I can then switch to with keyboard shortcuts. my bash-script takes the current workspace index "11" increases/decreases it by 1, depending whether I want to go to the next or previous workspace.

Now the bar is cluttered with workspaces 1-13.

Wow thats a very special use case I definitely did not consider.

But there is an option in the settings to only show occupied workspaces (in the hyprland menu under system/integrations i think.
Try that and if needed you can switch the keybinds around however you want in the keybind menu.
Let me know if that works for you.

@ad-on-is

ad-on-is commented Dec 1, 2026

Copy link
Copy Markdown

lol... I know it's an edge-case. but this is what I'm used to.

The show only occupied is a bit confusing to me, that's why I don't use it.

Would you please be so kind and implement a setting for this change. you can leave it "on" by default, as long as it can be disabled, I'm fine.

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

Labels

feature ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants