do things
This commit is contained in:
parent
b4dfef1d6d
commit
f903d1b45e
11 changed files with 47 additions and 26 deletions
|
@ -26,7 +26,7 @@
|
|||
)
|
||||
(box
|
||||
:halign "end"
|
||||
(label :text "right")
|
||||
(label :text "${iceData.speed}km/h")
|
||||
)
|
||||
)
|
||||
(box
|
||||
|
@ -42,3 +42,9 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defpoll iceData
|
||||
:interval "2s"
|
||||
:initial ""
|
||||
`(iw dev wlp4s0 link | grep "WIFIonICE" > /dev/null) && curl https://iceportal.de/api1/rs/status`
|
||||
)
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
)
|
||||
(box
|
||||
(progress
|
||||
:class { traveldings_data.live ? "traveldings_live" : "traveldings_disconnected" }
|
||||
:value {traveldings_data.progress * 100}
|
||||
:orientation "horizontal"
|
||||
)
|
||||
|
@ -29,20 +30,6 @@
|
|||
)
|
||||
)
|
||||
|
||||
(defwindow traveldingsWindow
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
:exclusive "false"
|
||||
:geometry (geometry
|
||||
:x "0%"
|
||||
:y "6.6%"
|
||||
:width "30%"
|
||||
:height "20%"
|
||||
:anchor "bottom center")
|
||||
(box
|
||||
:class "traveldingsWindow"
|
||||
(label :text "TODO"))
|
||||
)
|
||||
|
||||
(deflisten traveldings_data
|
||||
:initial "null"
|
||||
|
|
|
@ -22,12 +22,16 @@ label {
|
|||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.traveldings progressbar progress {
|
||||
.traveldings progressbar.traveldings_live progress {
|
||||
background-color: #79740e;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.traveldings progressbar.traveldings_disconnected progress {
|
||||
background-color: #cc241d;
|
||||
}
|
||||
|
||||
|
||||
.traveldingsWindow {
|
||||
border-radius: 15px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nu
|
||||
|
||||
const TABLE = [
|
||||
[ br vmax ];
|
||||
[ 401 280 ]
|
||||
[ 402 280 ]
|
||||
[ 403 330 ]
|
||||
[ 406 330 ]
|
||||
[ 407 320 ]
|
||||
[ 408 320 ]
|
||||
[ 411 230 ]
|
||||
[ 415 230 ]
|
||||
[ 412 265 ]
|
||||
[ 605 200 ]
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue