mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 13:15:20 +01:00
[GH-ISSUE #942] Ability to sort workspaces by Id #7311
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#7311
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hattivatt on GitHub (Apr 18, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/942
Is your feature request related to a problem? Please describe.
Currently Workspaces module provides only three variants of sorting Name, Label and Added. None of this options are convenient for people like me, who wants their workspaces always had same order, and also want to name it freely, without any numbers.
Describe the solution you'd like
Implement ability to sort workspaces by workspace_id. Similar to waybar
@JakeStanger commented on GitHub (Apr 18, 2025):
I'm not sure I understand this. Why does the
nameoption not work for you?It sounds like you're asking to sort on the internal id, which is not consistently the same.
@hattivatt commented on GitHub (Apr 19, 2025):
Well, I guess it's about internal Id...
I use hyprland and I bind switching between workspaces to number keys. Like Mod + 1 go to workspace 1, Mod + 2 go to workspace 2, etc... And those binds made by workspace ids. And for names I just use hyprland-autoname-workkspaces to make workspace names show icons of apps opened on this workspace.
Right now I'm using waybar and it has option to sort workspaces by id, but now I'm trying to replicate this setup on ironbar and came to this
Basically it looks like this (waybar on top, ironbar lower) for now it's in order (workspaces 1, 2, 3, 9)

But when I want to switch for let's say workspace 6, now empty, waybar put's it correctly between 3 and 9, but ironbar just put it first and that's it

Of course it's not a huge problem, but it feels too weird for me to, considering that I have workspaces binded to number keys and got used to this order.
@JakeStanger commented on GitHub (Apr 19, 2025):
Right, I see the issue.
I don't really like the idea of relying on the IDs, because it is a compositor-specific implementation detail that will only work on Hyprland; Sway and Niri just use the IDs as an internal unique value, and there's no guarantee the same workspace number will always have the same name. That'll change with
ext-workspacesupport again.I am struggling to see another option though...
I'd be open to adding a sort of "manual" sort option, where you can stick the desired order in the config. Issue is, I can't see how that'd work either because again it needs some sort of identifier.
Any other ideas, I'm open.
@hattivatt commented on GitHub (Apr 20, 2025):
I see, so waybar can do it because it has different workspaces module for different compositors... I can see the problem here, but sadly I'm too don't have any ideas
@deathtrip commented on GitHub (May 21, 2025):
Currently even if the workspace name starts with a number, and you select sorting by name, it won't be placed numerically.
When i have a lot of workspaces open and i launch ironbar, it initially sorts them by their number, only the ones opened after that are placed first or last (depending on sorting option). So it looks like there's a way to sort them bu their number right now, just like waybar does it.
@Deebster commented on GitHub (Nov 27, 2025):
tldr: to support Niri, ironbar needs to have support for ordering by index (not id)
This is a problem in Niri (tested on current head
6caebe287a). You can rename and reorder workspaces, and the order matters as you can navigate between workspaces by going up and down, move columns up and down workspaces, etc.I had set the order to "added" as it was the only way to get my 1 = comms and 2 = logs to show correctly, but this means that reordering workspaces leads to an incorrect order.
Here you can see that comms is still the first workspace (and I can switch to it with super+1):
I have moved test up and the workspaces have been reindexed:
Test is now index 1 but no sort option will show this without restarting ironbar.