mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
fix(polybar): fix weather entry
This commit is contained in:
parent
d578d31d6a
commit
dfc9956cb8
2 changed files with 7 additions and 3 deletions
|
|
@ -38,6 +38,9 @@ for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
|||
fi
|
||||
SIZE=${FONT_SIZES[$MONITOR]}
|
||||
SCALE=${EMOJI_SCALE[$MONITOR]}
|
||||
if [[ -z "$SCALE" ]]; then
|
||||
continue
|
||||
fi
|
||||
export FONT0="pango:monospace:size=$SIZE;1"
|
||||
export FONT1="NotoEmoji:scale=$SCALE:antialias=false;1"
|
||||
export FONT2="fontawesome:pixelsize=$SIZE;1"
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ format_1=${FORMAT_1:-"qF"}
|
|||
format_2=${FORMAT_1:-"format=v2n"}
|
||||
|
||||
bar_weather=$(curl -s wttr.in/${location}?format=${bar_format} || echo "??")
|
||||
if [ -z ${bar_weather} ]; then
|
||||
if [ -z "$bar_weather" ]; then
|
||||
exit 1
|
||||
elif [[ ${bar_weather} == *"Unknown"* ]]; then
|
||||
elif [[ "$bar_weather" == *"Unknown"* || "$bar_weather" == *"Sorry"* || "$bar_weather" == *"Bad Gateway"* ]]; then
|
||||
echo "??"
|
||||
exit 1
|
||||
else
|
||||
echo ${bar_weather}
|
||||
fi
|
||||
echo ${bar_weather}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue