You are not logged in.
@ututo
I've split this weather script into temeprature read and system notification action on left-click. Maybe you will like the idea so here it is:
executor in .tint2rc
# Executor 1 - Weather
execp = new
execp_command = ~/Scripts/tint2_weather.sh
execp_interval = 300
execp_has_icon = 0
execp_cache_icon = 0
execp_continuous = 0
execp_markup = 0
execp_tooltip = Current temperature in Belgrade
execp_lclick_command = ~/Scripts/weather_cond.sh
execp_rclick_command = x-www-browser http://wttr.in/belgrade
execp_mclick_command =
execp_uwheel_command =
execp_dwheel_command =
execp_font = Ostrich Sans Bold 20
execp_font_color = #FFFFFF 60
execp_padding = 0 0
execp_background_id = 0
execp_centered = 1
execp_icon_w = 0
execp_icon_h = 0
weather_cond.sh
#!/bin/bash
# weather_cond.sh
# Taken from
# https://petermolnar.net/hacking-tint2-panel-weather-cpu-temperature-and-volume-executors/
# and edited for convenience
geo="$(wget -O- -q http://geoip.ubuntu.com/lookup)"
if grep -qi '11.11.11.11' <<< $geo; then
lat="11.1111"
lon="11.1111"
else
lat="$(sed -r 's/.*<Latitude>(.*?)<\/Latitude>.*/\1/g' <<< $geo)"
lon="$(sed -r 's/.*<Longitude>(.*?)<\/Longitude>.*/\1/g' <<< $geo)"
fi
weather="$(wget -q -O- http://api.wunderground.com/auto/wui/geo/WXCurrentObXML/index.xml?query=$lat,$lon)"
kw="weather"
condition="$(sed -r "s/.*<$kw>(.*?)<\/$kw>.*/\1/g" <<< $weather)"
popup_notification="Current conditions: ${condition}"
notify-send "$popup_notification"
tint2_weather.sh
#!/bin/bash
# Taken from
# https://petermolnar.net/hacking-tint2-panel-weather-cpu-temperature-and-volume-executors/
# and edited for convenience
geo="$(wget -O- -q http://geoip.ubuntu.com/lookup)"
if grep -qi '11.11.11.11' <<< $geo; then
lat="11.1111"
lon="11.1111"
else
lat="$(sed -r 's/.*<Latitude>(.*?)<\/Latitude>.*/\1/g' <<< $geo)"
lon="$(sed -r 's/.*<Longitude>(.*?)<\/Longitude>.*/\1/g' <<< $geo)"
fi
weather="$(wget -q -O- http://api.wunderground.com/auto/wui/geo/WXCurrentObXML/index.xml?query=$lat,$lon)"
kw="temp_c"
temperature="$(sed -r "s/.*<$kw>(.*?)<\/$kw>.*/\1/g" <<< $weather)"
display_output="${temperature}°C"
echo "${display_output:0:12}"
This is how it looks:
You just edit IP and geo data in both scripts to match your locale.
Last edited by Sun For Miles (2017-08-10 14:09:21)
Señor Chang, why do you teach Spanish?
Online
Offline
Heavily inspired by @NixiePro
https://cdn.scrot.moe/images/2017/08/10/hexagon.th.png
@Addy, beatiful and great job !!
Offline
Heavily inspired by @NixiePro
https://cdn.scrot.moe/images/2017/08/10/hexagon.th.png
oh, the termcolor script, prettyplease?
Offline
@yunn thanks!
@Addy great screenshot! I wonder who this @nixiepro is. It seems he has some styyyyle
@Sun For Miles. That looks really nice! I'll have to give it a try. This is how it looks in mine:
BunsenLabs on deviantArt
Don't touch my git!
Offline
@Addy, beatiful and great job !!
Thank You very much @yunn!!
oh, the termcolor script, prettyplease?
Of course, please check my github here
@Addy great screenshot! I wonder who this @nixiepro is. It seems he has some styyyyle
Thank You very much! Your screenshot is great as well.
Me too, He must be a legend. It needs ten years more for me to pass him.
Last edited by Addy (2017-08-11 02:39:08)
If it ain't broke, then tweak it until it breaks.
Offline
Just inspected your profile @ututo, now I know something
If it ain't broke, then tweak it until it breaks.
Offline
@yunn thanks!
@Addy great screenshot! I wonder who this @nixiepro is. It seems he has some styyyyle
@Sun For Miles. That looks really nice! I'll have to give it a try. This is how it looks in mine:
https://cdn.scrot.moe/images/2017/08/10/Screenshot-08102017-060523PM.th.png
That is super nice.
"All we are is dust in the wind, dude"
- Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
- Wayne Campbell
Offline
Of course, please check my github here
thanks!
it seems I'm using a weird colorscheme:
Offline
working on a new version of dwmX called dwmXS - based on 'S'tretch of course
playing with dwm Alt+b - hide that bar...
and back again...
Offline
Not sure about dwm but I can smell the incense from here.
and tineye found it for me ... has a scratch-n-sniff corner.
Must try dwm someday.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Can you tell me the name of movie/series?
Just installed Bunsenlabs and really enjoying it.
Offline
Very nice Matt. I want to go there
thanks!
it seems I'm using a weird colorscheme:
https://cdn.scrot.moe/images/2017/08/11/whatsapp.png
You are very welcome
Weird, but I have to admit your top layer colors are beautiful
Last edited by Addy (2017-08-12 05:08:30)
If it ain't broke, then tweak it until it breaks.
Offline
Dobbie03 wrote:Very nice Matt. I want to go there
ohnonot wrote:thanks!
it seems I'm using a weird colorscheme:
https://cdn.scrot.moe/images/2017/08/11/whatsapp.pngYou are very welcome
Weird, but I have to admit your top layer colors are beautiful
Thanks Addy.
"All we are is dust in the wind, dude"
- Theodore "Ted" Logan
"Led Zeppelin didn't write tunes that everybody liked, they left that to the Bee Gees."
- Wayne Campbell
Offline
Ground Control to Major Tom
The Moon is actually an analog clock. But still have no idea how to design the clockhands.
Maybe I should replace Moon with Mars, and using Phobos & Deimos as clockhands.
Last edited by Addy (2017-08-12 04:40:20)
If it ain't broke, then tweak it until it breaks.
Offline
.... But still have no idea how to design the clockhands.
....
Eagle and Columbia, from the first landing in 1969?
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
But still have no idea how to design the clockhands.
just white dots, indicating floating astronauts?
Offline
Awesome desktops this month, my vanilla scrots make me ashamed to post (doesn't seem to stop me though).
Killing two birds with one boot:
pacman won but Alpine's apk would have shown it a clean pair of heels...
Offline