Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

Workspace 10 shows before 2-9 with sort-by-name

Open R0dn3yS opened this issue 2 years ago • 5 comments

On the "wlr/workspaces" module workspace 10 shows before 2-9 with sort-by-name.

R0dn3yS avatar Jun 22 '22 10:06 R0dn3yS

same issue here

primalmotion avatar Jun 22 '22 16:06 primalmotion

Because it reads 1 then 0. So its like Workspace 1, 0 instead of 10. Technically correct. If you want, you can try renaming 10 to 92 or something

bakerk98 avatar Jul 01 '22 17:07 bakerk98

Because it reads 1 then 0. So its like Workspace 1, 0 instead of 10. Technically correct. If you want, you can try renaming 10 to 92 or something

I agree, this seems like expected behaviour for sort-by-name. However, personally, I have the same issue yet I still use sort-by-name anyway since sort-by-coordinates doesn't appear to have any effect (even with sort-by-name set to false), and otherwise workspaces are sorted by order of creation (which I assume is sorting by id).

Can anyone confirm if sort-by-coordinates actually does anything compared to being turned off?

CharlesEkkel avatar Jul 03 '22 02:07 CharlesEkkel

Can anyone confirm if sort-by-coordinates actually does anything compared to being turned off?

I have tried to manually disable sort-by-name and then testing out sort-by-coordinates, I can say that it did not yield any difference.

But disabling sort-by-name actually fixed the issue with 10 appearing before 1

This works for me,

    "wlr/workspaces": {
        //"sort-by-coordinates": true, //It did not have an effect
        "sort-by-name": false,
        "on-click": "activate",
        "format": "{name} {icon}",
        "format-icons": {
            "default": "",
            "active": "",
            "urgent": ""
        }
    },

But using this configuration then results in if I open workspace 3 before workspace 2 then 3 is show before 2... facepalm...

tomshoo avatar Jul 03 '22 17:07 tomshoo

Same issue here, 20 workspaces are sorted like: 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 3, 4, 5, 6, 7, 8, 9

Makes sense why it sorts this way, but it's not how I want my bar to look.

JoshuaFern avatar Aug 21 '22 20:08 JoshuaFern