| @@ -14,11 +14,7 @@ update_memory () { |
| 14 | 14 | | } |
| 15 | 15 | | |
| 16 | 16 | | update_time () { |
| 17 | | − | time="$(date "+[ %a %d %b ] [ %I:%M %P ]")" |
| 18 | | − | } |
| 19 | | − | |
| 20 | | − | update_weather () { |
| 21 | | − | weather=" $(curl -s "wttr.in?format=1" | awk '{printf $2}')" |
| 17 | + | time="$(date "+[ %a %d %b ] [ %I:%M %P ]")" |
| 22 | 18 | | } |
| 23 | 19 | | |
| 24 | 20 | | # update_bat () { |
| @@ -45,7 +41,7 @@ update_vol |
| 45 | 41 | | |
| 46 | 42 | | display () { |
| 47 | 43 | | #printf "%s\n" " $event [$weather] [$memory $cpu] [$bat] [$backlight] [$vol] $time " |
| 48 | | − | xsetroot -name " [ $weather ] [ $memory $cpu ] [ $vol ] $time " |
| 44 | + | xsetroot -name " [ $vol ] [ $memory $cpu ] $time " |
| 49 | 45 | | } |
| 50 | 46 | | |
| 51 | 47 | | # SIGNALLING |
| @@ -65,7 +61,6 @@ do |
| 65 | 61 | | [ $((sec % 5)) -eq 0 ] && update_cpu # update cpu every 15 seconds |
| 66 | 62 | | [ $((sec % 15)) -eq 0 ] && update_memory |
| 67 | 63 | | # [ $((sec % 60)) -eq 0 ] && update_bat |
| 68 | | − | [ $((sec % 3600)) -eq 2 ] && update_weather |
| 69 | 64 | | #[ $((sec % 300)) -eq 1 ] && update_event |
| 70 | 65 | | |
| 71 | 66 | | # how often the display updates ( 5 seconds ) |