plugin: rust-side modules + theme services with serde-typed config
This commit is contained in:
parent
a86e90e927
commit
f34f3f2f4e
95 changed files with 2477 additions and 1011 deletions
|
|
@ -3,6 +3,7 @@ pragma Singleton
|
|||
import QtQuick
|
||||
import Quickshell.Io
|
||||
import "." as S
|
||||
import NovaStats as NS
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
|
@ -40,7 +41,7 @@ QtObject {
|
|||
|
||||
// Status polling
|
||||
property Process _statusProc: Process {
|
||||
running: S.Modules.network.enable
|
||||
running: NS.ModulesService.networkEnable
|
||||
command: ["sh", "-c", "line=$(nmcli -t -f NAME,TYPE,DEVICE connection show --active 2>/dev/null | head -1); if [ -z \"$line\" ]; then dev=$(nmcli -t -f DEVICE,STATE device 2>/dev/null | grep ':connected' | grep -v ':unmanaged\\|:unavailable\\|:disconnected\\|:connecting' | head -1 | cut -d: -f1); [ -n \"$dev\" ] && line=\"linked:linked:$dev\"; fi; [ -z \"$line\" ] && exit 0; echo \"$line\"; dev=$(echo \"$line\" | cut -d: -f3); ip=$(nmcli -t -f IP4.ADDRESS device show \"$dev\" 2>/dev/null | head -1 | cut -d: -f2); echo \"ip:${ip:-}\"; sig=$(nmcli -t -f GENERAL.SIGNAL device show \"$dev\" 2>/dev/null | head -1 | cut -d: -f2); echo \"sig:${sig:-}\""]
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
|
|
@ -76,7 +77,7 @@ QtObject {
|
|||
|
||||
// Event-driven monitor
|
||||
property Process _monitor: Process {
|
||||
running: S.Modules.network.enable
|
||||
running: NS.ModulesService.networkEnable
|
||||
command: ["nmcli", "monitor"]
|
||||
stdout: SplitParser {
|
||||
splitMarker: "\n"
|
||||
|
|
@ -92,7 +93,7 @@ QtObject {
|
|||
// Fallback poll
|
||||
property Timer _fallbackPoll: Timer {
|
||||
interval: 60000
|
||||
running: S.Modules.network.enable
|
||||
running: NS.ModulesService.networkEnable
|
||||
repeat: true
|
||||
onTriggered: root.refresh()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue