Skip to content

tray: sort icons deterministically#4999

Open
Carltoffel wants to merge 1 commit into
Alexays:masterfrom
Carltoffel:feature/tray-icon-ordering
Open

tray: sort icons deterministically#4999
Carltoffel wants to merge 1 commit into
Alexays:masterfrom
Carltoffel:feature/tray-icon-ordering

Conversation

@Carltoffel
Copy link
Copy Markdown

Sort tray items deterministically instead of leaving the order up to the arrival time of D-Bus signals. Items whose key is listed in order-left or order-right are pinned to the respective edge in the configured order; everything else is placed between them in alphabetical order.

For Chrome-based SNI items the tooltip text (up to the first ':') is used as the key so the ordering stays stable when the tooltip's status suffix changes.

reverse-direction now reverses the alphabetical middle section only, so order-left / order-right keep their visual meaning regardless of its value.

Example added in man/waybar-tray.5.scd

Sort tray items deterministically instead of leaving the order up to
the arrival time of D-Bus signals. Items whose key is listed in
order-left or order-right are pinned to the respective edge in the
configured order; everything else is placed between them in
alphabetical order.

For Chrome-based SNI items the tooltip text (up to the first ':') is
used as the key so the ordering stays stable when the tooltip's
status suffix changes.

reverse-direction now reverses the alphabetical middle section only,
so order-left / order-right keep their visual meaning regardless of
its value.
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