controlcenter: connected wireless network at top of list

This commit is contained in:
ATMDA 2025-11-14 17:44:41 -05:00
parent 45ef91998e
commit b40b797caf

View file

@ -94,7 +94,15 @@ ColumnLayout {
Layout.fillWidth: true
Layout.fillHeight: true
model: Nmcli.networks
model: ScriptModel {
values: [...Nmcli.networks].sort((a, b) => {
// Put active/connected network first
if (a.active !== b.active)
return b.active - a.active;
// Then sort by signal strength
return b.strength - a.strength;
})
}
spacing: Appearance.spacing.small / 2
clip: true