1
0
Fork 0

visual updates for statusbar

This commit is contained in:
Luca Bilke 2022-08-23 19:34:38 +02:00
parent 6e59a83feb
commit e2e81bde9f
3 changed files with 3 additions and 3 deletions

View File

@ -15,4 +15,4 @@ case "$clock" in
"11") icon="" ;; "11") icon="" ;;
"12") icon="" ;; "12") icon="" ;;
esac esac
printf "%s \033[11m%s\033[10m %s\n" "$(date "+%d.%M.%Y")" "$icon" "$(date "+%H:%M")" printf "%s \033[11m%s\033[10m %s\n" "$(date "+%H:%M")" "$icon" "$(date "+%d.%M.%Y")"

View File

@ -30,7 +30,7 @@ getforecast() { curl -sf "$url$opt" > "$weatherfile" && curl -sf "$url$emojiopt"
showweather() { showweather() {
emoji="$(printf "\033[12m%s\033[10m" "$(cut -d ' ' -f 1 "$emojifile")")" emoji="$(printf "\033[12m%s\033[10m" "$(cut -d ' ' -f 1 "$emojifile")")"
sed '16q;d' "$weatherfile" | grep -wo "[0-9]*%" | sort -rn | sed "s/^/$emoji /g;1q" | tr -d '\n' sed '16q;d' "$weatherfile" | grep -wo "[0-9]*%" | sort -rn | sed "s/^/$emoji /g;1q" | tr -d '\n'
sed '13q;d' "$weatherfile" | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print "  " $1 "°"," " $2 "°"}'; sed '13q;d' "$weatherfile" | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " \033[34m\033[0m " $1 "°","\033[31m\033[0m " $2 "°"}';
} }
getforecast && convertemoji getforecast && convertemoji
showweather showweather

View File

@ -12,6 +12,6 @@ elif [ "$vol" -gt "0" ]; then
elif [ "$vol" -eq "0" ]; then elif [ "$vol" -eq "0" ]; then
icon="" icon=""
else else
echo "   " && exit echo " \033[11m\033[10m  " && exit
fi fi
printf "\033[11m%s\033[10m %s" "$icon" "$vol" printf "\033[11m%s\033[10m %s" "$icon" "$vol"