2020-01-03 15:07:57 +00:00
#!/bin/bash
2020-01-08 21:21:10 +00:00
SOURCE = " ${ BASH_SOURCE [0] } "
while [ -h " $SOURCE " ] ; do # resolve $SOURCE until the file is no longer a symlink
DIR = " $( cd -P " $( dirname " $SOURCE " ) " >/dev/null 2>& 1 && pwd ) "
SOURCE = " $( readlink " $SOURCE " ) "
[ [ $SOURCE != /* ] ] && SOURCE = " $DIR / $SOURCE " # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR = " $( cd -P " $( dirname " $SOURCE " ) " >/dev/null 2>& 1 && pwd ) "
WIDGET = $( /usr/local/bin/fish $DIR /../ambient-widgets | tr '\n' ' ' )
2020-01-03 15:07:57 +00:00
if [ -z " $WIDGET " ] ; then
echo "🚄"
else
echo $WIDGET
2020-01-08 21:57:18 +00:00
echo "---"
2020-01-15 23:02:36 +00:00
echo "Go to map|href=https://iceportal.de/karte"
2020-01-08 21:57:18 +00:00
echo $( /usr/local/bin/fish $DIR /../ambient | tr '\n' '\r\n' )
2020-01-08 21:21:10 +00:00
fi