Merge pull request #9 from tjarksaul/master

ICE updates
This commit is contained in:
embr 2022-10-04 16:57:02 +02:00 committed by GitHub
commit d4a9c8d11a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View file

@ -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)

View file

@ -1,3 +1,6 @@
set ambient_icomera_country ""
set ambient_icomera_provider ""
set -l ssid (ambient_get_ssid)
switch $ssid
case "GatwickExpress_WiFi"

View file

@ -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