controlcenter: connected wireless network at top of list
This commit is contained in:
parent
45ef91998e
commit
b40b797caf
1 changed files with 9 additions and 1 deletions
|
|
@ -94,7 +94,15 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: 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
|
spacing: Appearance.spacing.small / 2
|
||||||
clip: true
|
clip: true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue