visual updates for statusbar
This commit is contained in:
parent
6e59a83feb
commit
e2e81bde9f
|
@ -15,4 +15,4 @@ case "$clock" in
|
|||
"11") icon="" ;;
|
||||
"12") icon="" ;;
|
||||
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")"
|
||||
|
|
|
@ -30,7 +30,7 @@ getforecast() { curl -sf "$url$opt" > "$weatherfile" && curl -sf "$url$emojiopt"
|
|||
showweather() {
|
||||
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 '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
|
||||
showweather
|
||||
|
|
|
@ -12,6 +12,6 @@ elif [ "$vol" -gt "0" ]; then
|
|||
elif [ "$vol" -eq "0" ]; then
|
||||
icon=""
|
||||
else
|
||||
echo " " && exit
|
||||
echo " \033[11m\033[10m " && exit
|
||||
fi
|
||||
printf "\033[11m%s\033[10m %s" "$icon" "$vol"
|
||||
|
|
Loading…
Reference in New Issue