Adding a conky

This commit is contained in:
Derek Taylor
2023-08-31 18:14:26 -05:00
parent cf12132648
commit ef6f204591
17 changed files with 1061 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
#!/bin/bash
# v2.0
# I create this scripts to show weather icon with text icon
# and take data from json file, so it can use offline
# the font i use Feather icon font { https://github.com/AT-UI/feather-font }
# to get weather.json file i use another script
# Closebox73
# icon font based openweathermap.org data
ICON_01D=""
ICON_01N=""
ICON_02=""
ICON_09=""
ICON_10=""
ICON_11=""
ICON_13=""
ICON_50=""
NO_DATA=""
WEATHER_ICON=$(cat ~/.cache/weather.json | jq -r '.weather[0].icon')
if [[ "${WEATHER_ICON}" = *01d* ]]; then
echo "${ICON_01D}"
elif [[ "${WEATHER_ICON}" = *01n* ]]; then
echo "${ICON_01N}"
elif [[ "${WEATHER_ICON}" = *02d* || "${WEATHER_ICON}" = *02n* || "${WEATHER_ICON}" = *03d* || "${WEATHER_ICON}" = *03n* || "${WEATHER_ICON}" = *04d* || "${WEATHER_ICON}" = *04n* ]]; then
echo "${ICON_02}"
elif [[ "${WEATHER_ICON}" = *09d* || "${WEATHER_ICON}" = *09n* ]]; then
echo "${ICON_09}"
elif [[ "${WEATHER_ICON}" = *10d* || "${WEATHER_ICON}" = *10n* ]]; then
echo "${ICON_10}"
elif [[ "${WEATHER_ICON}" = *11d* || "${WEATHER_ICON}" = *11n* ]]; then
echo "${ICON_11}"
elif [[ "${WEATHER_ICON}" = *13d* || "${WEATHER_ICON}" = *13n* ]]; then
echo "${ICON_13}"
elif [[ "${WEATHER_ICON}" = *50d* || "${WEATHER_ICON}" = *50n* ]]; then
echo "${ICON_50}"
else
echo "${NO_DATA}"
fi
exit