start mullvad thing
This commit is contained in:
parent
4c74dd5024
commit
ac251e6d90
2 changed files with 33 additions and 5 deletions
|
@ -29,7 +29,7 @@
|
||||||
(box
|
(box
|
||||||
:halign "end"
|
:halign "end"
|
||||||
; (label :text "${iceData.speed}km/h")
|
; (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 []
|
(defwidget iceTacho []
|
||||||
(box
|
(box
|
||||||
:class "iceTacho"
|
:class "iceTacho"
|
||||||
:tooltip "Tz${iceTachoData.tzn} (BR ${iceTachoData.br})"
|
:tooltip "Tz${iceTachoData.tzn} (BR ${iceTachoData.br})"
|
||||||
(circular-progress
|
|
||||||
:value { iceTachoData.frac * 60 + 20 }
|
|
||||||
:thickness 3
|
|
||||||
)
|
|
||||||
(label :text "${iceTachoData.speed} km/h")
|
(label :text "${iceTachoData.speed} km/h")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -33,4 +33,20 @@ label {
|
||||||
|
|
||||||
.traveldingsWindow {
|
.traveldingsWindow {
|
||||||
border-radius: 15px;
|
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
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue