@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.
*Edited because of my bad!.. Sorry all.
Polybar weather module and script from… Here
Get an openweathermap api and fill in script accordingly, copy weather module into your modules.conf
Confirm script has permission to run as program.
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…
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
@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.
Hmm… Looked at @Dobbie03’s script and it’s the same as mine. Should be, I stole it from him hehehe.
@Xase It should work. Confirm the script has permission to run as a program in right click properties dialog in thunar.
@Dobbie03 I can’t remember but was there also a font which needed to be installed?
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
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.
Good question and I can’t understand it, they’re identical and I just posted a scrot after installing the new testing iso and it works perfectly here.
@anon37345411, lol, so true !
I thought I accomplished that with
chmod +x ./.config/polybar/weather ?
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
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.
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.
@ector This is my fault, disregard module and script posted above. They didn’t get copied correctly.
Download from my dropbox… Here
We all love terminal Geek Boutique, it’s just cool but confirm in thunar right click dialog, script has permission to run as a program.
Sorry to all for the inconvenience