waybar/src/modules/sway
Johannes Wienke 4a85ec0f59 fix: match sway workspace order with sway one
Ensure that sway workspaces are always displayed in the same order as
used internally by sway. The previous sorting code always sorted
unnumbered workspaces lexicographically. This isn't the order used by
sway internally. Therefore, commands such as "workspace next" might have
jumped arbitrarily in waybar.

This commit reworks the sorting code such that the internal order is
always obeyed. Additionally, numbered persistent workspaces are inserted
at their natural position at the front of the workspace list while
unnumbered ones are appended. This should match the expectations of
workspace ordering known from sway's behavior.

The changes make the configuration property "numeric-first" unnecessary
as this will always be the case now. There's also no reasonable way
around this behavior now. Otherwise, persistent workspaces would jump
around in the visual representation as soon as they become known to
sway.

Fixes #802
2022-01-07 10:26:27 +01:00
..
ipc fix(sway): resolve destruction dependency between Ipc and SleeperThread 2020-02-04 23:22:43 -08:00
bar.cpp fix(swaybar-ipc): avoid unnecessary copy of struct swaybar_config 2021-11-28 11:34:21 -08:00
language.cpp Checking if emoji byte doesn't get out of bounds 2021-11-24 02:15:10 +02:00
mode.cpp Merge branch 'master' into on-update 2020-04-12 18:32:19 +02:00
window.cpp sway/window: include floating_nodes when considering window count for class 2021-10-02 18:35:38 +02:00
workspaces.cpp fix: match sway workspace order with sway one 2022-01-07 10:26:27 +01:00