controlcenter connected network top of list fix
This commit is contained in:
parent
9a08d6666e
commit
bd6122eaef
1 changed files with 10 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import qs.components.effects
|
||||||
import qs.components.containers
|
import qs.components.containers
|
||||||
import qs.services
|
import qs.services
|
||||||
import qs.config
|
import qs.config
|
||||||
|
import Quickshell
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
@ -279,7 +280,15 @@ RowLayout {
|
||||||
id: wirelessRepeater
|
id: wirelessRepeater
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: 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;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
delegate: StyledRect {
|
delegate: StyledRect {
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue