mirror of
https://github.com/liclac/ambient
synced 2025-02-16 12:28:24 +00:00
commit
d4a9c8d11a
3 changed files with 9 additions and 2 deletions
|
@ -4,7 +4,11 @@ ambient_is_ssid "WIFIonICE" "WIFI@DB"; or exit
|
|||
# We can tell if we're on a train if iceportal.de resolves to a private IP addr.
|
||||
string match '172.*' (ambient_resolve4 iceportal.de) >/dev/null; or exit
|
||||
|
||||
curl -s https://iceportal.de/api1/rs/status | jq -r '"
|
||||
set train_status (curl -s https://iceportal.de/api1/rs/status)
|
||||
|
||||
echo $train_status | jq type >/dev/null 2>&1; or exit
|
||||
|
||||
echo $train_status | jq -r '"
|
||||
AMBIENT_DE_ICE_CONNECTION=\(.connection)
|
||||
AMBIENT_DE_ICE_SERVICE_LEVEL=\(.servicelevel)
|
||||
AMBIENT_DE_ICE_INTERNET=\(.internet)
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
set ambient_icomera_country ""
|
||||
set ambient_icomera_provider ""
|
||||
|
||||
set -l ssid (ambient_get_ssid)
|
||||
switch $ssid
|
||||
case "GatwickExpress_WiFi"
|
||||
|
|
|
@ -31,6 +31,6 @@ if [ -z "$WIDGET" ]; then
|
|||
else
|
||||
echo $WIDGET
|
||||
echo "---"
|
||||
echo "Go to map|href=https://iceportal.de/karte"
|
||||
echo "Go to map|href=https://iceportal.de/Karte_neu"
|
||||
echo $(/usr/local/bin/fish $DIR/../ambient | tr '\n' '\r\n')
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue