bar: use loader instead of swipeview
Also properly set it up Make network reloadable cause getting is pretty slow
This commit is contained in:
parent
232f299286
commit
9339394e07
4 changed files with 140 additions and 91 deletions
|
|
@ -1,11 +1,7 @@
|
||||||
import "root:/widgets"
|
import "root:/widgets"
|
||||||
import "root:/config"
|
import "root:/config"
|
||||||
import "components"
|
|
||||||
import "components/workspaces"
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Wayland
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
|
||||||
|
|
||||||
Variants {
|
Variants {
|
||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
|
|
@ -41,11 +37,64 @@ Variants {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
SwipeView {
|
Preset {
|
||||||
anchors.fill: parent
|
presetName: "pills"
|
||||||
currentIndex: 1
|
|
||||||
|
|
||||||
Pills {}
|
Pills {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
component Preset: Loader {
|
||||||
|
id: loader
|
||||||
|
|
||||||
|
required property string presetName
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
asynchronous: true
|
||||||
|
active: false
|
||||||
|
opacity: 0
|
||||||
|
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "visible"
|
||||||
|
when: BarConfig.preset.name === loader.presetName
|
||||||
|
|
||||||
|
PropertyChanges {
|
||||||
|
loader.opacity: 1
|
||||||
|
loader.active: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
transitions: [
|
||||||
|
Transition {
|
||||||
|
from: ""
|
||||||
|
to: "visible"
|
||||||
|
|
||||||
|
SequentialAnimation {
|
||||||
|
PropertyAction {}
|
||||||
|
NumberAnimation {
|
||||||
|
property: "opacity"
|
||||||
|
duration: Appearance.anim.durations.large
|
||||||
|
easing.type: Easing.BezierSpline
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.standard
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Transition {
|
||||||
|
from: "visible"
|
||||||
|
to: ""
|
||||||
|
|
||||||
|
SequentialAnimation {
|
||||||
|
NumberAnimation {
|
||||||
|
property: "opacity"
|
||||||
|
duration: Appearance.anim.durations.large
|
||||||
|
easing.type: Easing.BezierSpline
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.standard
|
||||||
|
}
|
||||||
|
PropertyAction {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@ import Quickshell.Wayland
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
Item {
|
BoxLayout {
|
||||||
BoxLayout {
|
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
function get(horiz, vert) {
|
function get(horiz, vert) {
|
||||||
|
|
@ -107,7 +106,6 @@ Item {
|
||||||
anchors.verticalCenter: root.get(parent.verticalCenter, undefined)
|
anchors.verticalCenter: root.get(parent.verticalCenter, undefined)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
component Pill: PaddedRect {
|
component Pill: PaddedRect {
|
||||||
id: pill
|
id: pill
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ Item {
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: ScriptModel {
|
model: ScriptModel {
|
||||||
values: Hyprland.clients.filter(c => c.workspace.id === root.ws)
|
values: Hyprland.clients.filter(c => c.workspace?.id === root.ws)
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialIcon {
|
MaterialIcon {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ Singleton {
|
||||||
active: true
|
active: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reloadableId: "network"
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
running: true
|
running: true
|
||||||
command: ["nmcli", "m"]
|
command: ["nmcli", "m"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue