Polybar Weather

@Dobbie03 I was looking at the polybar thread under the artwork section, and saw your polybar config at one point contained a weather ?script?.. though when trying to look at your config to get an idea for how to do it, it was 404’d so I assume you changed/moved it?

https://github.com/kamek-pf/polybar-forecast <<< is this what I’m looking for, it’s what came up in a google search for polybar weather.

Anyone else feel free to chime in as well; curious, since I don’t use workspaces, I’d like to replace that module with weather.

There seem to be a couple scripts for grabbing the weather out there.

Must’ve done something wrong. I wrote the weather script in at ~/.config/polybar/weather, added the module to modules.conf and then changed the workspaces module to weather… now I just have a white line separator that keeps reappearing and disappearing.

I’ll have to solve it in the morning I s’pose.

EDIT-- I’m not good at going to bed I suppose, so I tried some things
Noticed I had made it with sudo nano, so I didn’t own the file…
so sudo chown jase ./.config/polybar/weather
And just to make sure it could be executed chmod +x ./.config/polybar/weather though I’m not sure this was necessary.

Still no luck :frowning:

@Xase, here is the weather script I use. You need to be a member of Gitlab and logged in.

For the weather to show up you need to create an account with openweathermap.org, replace the api key with yours and change the city name to your home town.

Thank you @Dobbie03. I unfortunately didn’t get it to work yet, probably missing something stupid simple. I tried both the city name and the city code. No change =/ Just the separator pops up and disappears.

What @anon37345411 says.

I have installed the polybar user contributed weather script ;

I installed weather icons from AUR;

I installed jq;

Download the script and make it executable.


Add your API key from openweathermap;

Remember that the font has a 1-based index;

In ArchLabs, for example, fonts 0-4 were already declared so I made weather icons font #5
Therefore, your label-font would be 6 in this example;
label-font = 6

my module looks like this;

type = custom/script
exec = ~/openweathermap-fullfeatured.sh
interval = 300
label-font = 6
format-padding = 1

Good luck.

1 Like

Does anyone know how to view the weather in Italian?
I can make @Dobbie03 modules work, but not @anon37345411, do you know why?
Then tomorrow, I see if I can make @mrneilypops work
thanks to all

Thx for the nice job in there @mrneilypops.

Linux s mysteries.


@anon37345411, lol, so true !

1 Like

I thought I accomplished that with chmod +x ./.config/polybar/weather ? :confused:

I have it executable though, just double checked with thunar.

I think I found the issue though… it’s using the curly double quotes that have a left and right instead of the mono quotes. I think because I used Atom it copied the formatting. Will report in a few moments

It was the curly quotes, AND the blank format = line in glenn’s module I think as well… as after I removed that and the curly quotes “” in exchange for "" :o

Started right up after I removed format = then I noticed there was an error on line 5 since the script was actually trying to run… and saw the quotes looked weird.

I’ve tried successfully all weather modules found here:
The instructions are pretty simple.


The module @Dobbie03.
It does not seem to me the same.
Maybe it’s the old woman who’s changing me. :weary::grinning:
type = custom/script
exec = /home/don/.config/polybar/weather.sh
click-middle = weather.sh
label = %output%
interval = 1800

Have you updated the script with your personal api from openweather?

apy personal is my.

1 Like

@anon37345411, completely not your fault. The Forum auto formats it seems. I thank you for the help And I’m changing solution to this post above me.

1 Like

Best to use pastebin or Gist and post a link here I suppose.

No need to :smiley: It’s not like you killed anyone’s system :smile:

1 Like

9 posts were split to a new topic: We Love you Glenn!

Hi all there is a LESS sophisticated way (no 3 days forecast…) to get weather in polybar and i3status or blocks, just creat a module with this command:
eg:Partly cloudy 20 °C

curl -Ss ‘https://wttr.in?0&T&Q’ | cut -c 16- | head -2 | xargs echo

with wind force & direction

curl -Ss ‘https://wttr.in?0&T&Q’ | cut -c 16- | head -3 | xargs echo