Weather on I3 bar

Hi Team,

Where to edit weather on I3 bar? I didn’t see anything in ~/.config/i3 file
Or i miss something?

The output of the bar is configured in /etc/i3status.conf. Usually you would copy that to ~/i3status.conf I believe. For real information check here :grinning: https://wiki.archlinux.org/index.php/I3

1 Like

I’ll check then. Thanks.

i3status is not used by default on EndeavourOS-i3-setup…
We do use i3-blocks:

weather (openweather you need to get city code and apikey first [adding it to ~/.config/i3/scripts/openweather.sh]) get your api key here: https://openweathermap.org/appid and City code: https://openweathermap.org/find?q= (search your city and take the city code from the url in your browser [7 numbers at the end of the url])

https://github.com/endeavouros-team/i3-EndeavourOS/blob/master/.config/i3/scripts/openweather.sh

or use the second weather script included:
https://github.com/endeavouros-team/i3-EndeavourOS/blob/master/.config/i3/scripts/weather2.sh
this will need to change the executable on blocks:
https://github.com/endeavouros-team/i3-EndeavourOS/blob/56dd979291ebf35d941bb5098ef7e6884f544f52/.config/i3/i3blocks.conf#L122

1 Like

Thank you!

hello community

i have a problem with weather settings i3status(bar)
what am i doing wrong

i3blocks.conf:

[Weather]
command=~/.config/i3/scripts/openweather-city
#or command=~/.config/i3/scripts/openweather
interval=1800
color=#95d7ff

openweather-city:

APIKEY="b81f33c7dee250df1fda3778f201eedc"
CITY_ID="1516789"
URL="http://api.openweathermap.org/data/2.5/onecall?lat=45.9569&lon=61.8485&units=metric&exclude=minutely,hourly,daily&APPID=b81f33c7dee250df1fda3778f201eedc"

openweather:

APIKEY="b81f33c7dee250df1fda3778f201eedc"
LAT="45.9569"
LON="61.8485"
URL="http://api.openweathermap.org/data/2.5/onecall?lat=45.9569&lon=61.8485&units=metric&exclude=minutely,hourly,daily&APPID=b81f33c7dee250df1fda3778f201eedc"
WEATHER_RESPONSE=$(wget -qO- "$https://openweathermap.org/city/1516789")

@Qazaq please open a new thread. It makes no sense to bring up a 5 year old thread. There are now several updates and therefore this thread is no longer up to date. Thank you

close

1 Like