start mullvad thing

This commit is contained in:
Schrottkatze 2025-03-27 01:57:44 +01:00
parent 4c74dd5024
commit ac251e6d90
Signed by: schrottkatze
SSH key fingerprint: SHA256:FPOYVeBy3QP20FEM42uWF1Wa/Qhlk+L3S2+Wuau/Auo
2 changed files with 33 additions and 5 deletions

View file

@ -29,7 +29,7 @@
(box
:halign "end"
; (label :text "${iceData.speed}km/h")
(iceTacho)
(mullvadThing)
)
)
)
@ -47,14 +47,26 @@
)
)
(deflisten mullvad
:initial "{\"state\":\"init\"}"
`mullvad status -j listen`
)
(defwidget mullvadThing []
(box
:class "container"
(button
:height 16
:width 16
:class "mullvad-state-${mullvad.state}"
)
)
)
(defwidget iceTacho []
(box
:class "iceTacho"
:tooltip "Tz${iceTachoData.tzn} (BR ${iceTachoData.br})"
(circular-progress
:value { iceTachoData.frac * 60 + 20 }
:thickness 3
)
(label :text "${iceTachoData.speed} km/h")
)
)

View file

@ -33,4 +33,20 @@ label {
.traveldingsWindow {
border-radius: 15px;
}
.mullvad-state-connected {
background-color: #98971a
}
.mullvad-state-connecting {
background-color: #d79921
}
.mullvad-state-disconnected {
background-color: #cc241d
}
.mullvad-state-init {
background-color: #458588
}