diff --git a/.config/setup/03-install-cron-jobs.sh b/.config/setup/03-install-cron-jobs.sh new file mode 100755 index 0000000..0635fde --- /dev/null +++ b/.config/setup/03-install-cron-jobs.sh @@ -0,0 +1,3 @@ +#! /usr/bin/sh + +crontab ./crontab diff --git a/.config/setup/crontab b/.config/setup/crontab new file mode 100644 index 0000000..1d20f29 --- /dev/null +++ b/.config/setup/crontab @@ -0,0 +1 @@ +@hourly /home/ohad/.local/bin/update-weather diff --git a/.local/bin/print-status b/.local/bin/print-status index 72c332c..3863501 100755 --- a/.local/bin/print-status +++ b/.local/bin/print-status @@ -27,4 +27,6 @@ elif [ "${battery_state}" = "Discharging" ]; then battery_symbol="🔋" fi -echo 📆${today} ⏲${now} ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}% +weather=$(cat /tmp/weather-report.txt) + +echo ${weather} 📆${today} ⏲${now} ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}% diff --git a/.local/bin/update-weather b/.local/bin/update-weather new file mode 100755 index 0000000..4e76820 --- /dev/null +++ b/.local/bin/update-weather @@ -0,0 +1,4 @@ +#! /usr/bin/sh + +# Documentation available in https://github.com/chubin/wttr.in +curl -Ss 'https://wttr.in/?0&m&q&T&format=3' > /tmp/weather-report.txt