You are not logged in.

#881 2016-05-18 12:27:12

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Right, I tested your code.
Using the line

wind_direction=$(sed -n 73p $HOME/2b_Wunderground_API/Conditions)

makes your tests fail, because in the latter you compare with the french names of the winds, but when you actually do your tests, the wind names are still in english.
Move the wind if tests at the end of the script, or the translation part before the if tests.

This way, you don't have to use the simple_forecast at all.


...another thing:
When you use the -e switch with sed, you can put a lot of commands in one line. So, instead of writing:

sed -i -e 's/A couple of showers/Averses éparses/' $HOME/Desktop/test/Conditions-fr
sed -i -e 's/A few a.m. showers,/Pluies l'\''après-midi/' $HOME/Desktop/test/Conditions-fr
sed -i -e 's/A little morning rai/Faible pluie le matin/' $HOME/Desktop/test/Conditions-fr
sed -i -e 's/a little morning rai/Faible pluie le matin/' $HOME/Desktop/test/Conditions-fr
sed -i -e 's/A touch of afternoon/Faible pluie l'\''après-midi/' $HOME/Desktop/test/Conditions-fr

you could write

sed -i -e 's/A couple of showers/Averses éparses/'  -e 's/A few a.m. showers,/Pluies l'\''après-midi/' -e 's/A little morning rai/Faible pluie le matin/' -e 's/a little morning rai/Faible pluie le matin/' -e 's/A touch of afternoon/Faible pluie l'\''après-midi/' $HOME/Desktop/test/Conditions-fr

Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#882 2016-05-18 14:45:10

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Tank's Theo you give me the solution

I left the script at his place and modify it in english like this

# icone direction vent 
wind_direction=$(sed -n 73p $HOME/2b_Wunderground_API/Conditions)
if [[ $wind_direction == "S" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"02.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "South" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"02.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "SSW" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"03.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "SW" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"04.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "WSW" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"05.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "W" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"06.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "West" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"06.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "WNW" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"07.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "NW" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"08.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "NNW" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"09.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "N" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"10.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "North" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"10.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "NNE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"11.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "NE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"12.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "ENE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"13.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "E" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"14.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "East" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"14.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "ESE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"15.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "SE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"16.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "SSE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"17.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "Variable" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"01.png" $HOME/2b_Wunderground_API/Wind1.png
fi

it work great , it use /Conditions for the wind-icon and for the french translation it use /Conditions-fr and i call it just with one line in the conkyrc .

@+

Last edited by loutch (2016-05-18 14:49:42)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#883 2016-05-18 14:49:53

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Good to know loutch!
Always happy to lend a hand.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#884 2016-05-18 16:27:34

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

EDITsad  Did not see the response above.  So now I have a question:  Why do I need the "quote" marks?
- also note for people interested: I changed the text in the script to reflect English directions OSO = WSW etc.
- I have very little internet yesterday so I tested a couple of things offline.

Wind Direction
loutch wrote:

Guys i need you help

i made a script to have an icon for wind direction he work great and i woud integrate it in the 2b script .

Try changing:

wind_direction=$(sed -n 73p /media/5/Conky/2b_Wunderground_API/Conditions)

to:

wind_direction="$(sed -n 73p /media/5/Conky/2b_Wunderground_API/Conditions)"

I don't have your blue arrows so I tested with it using the bearing icons from conkyForecast:
2016_05_18_13_20_29_Scrot11.jpg
I used two test scripts to test with the two colours and I needed to use quote marks in the line above.

Last edited by Sector11 (2016-05-18 16:30:02)


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#885 2016-05-18 17:05:48

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

unklar wrote:

@fvirgola80

for later it should do this Digital-7

@fvirgola80 and @S11,

Where to find the pixel ruler and how do you get that in the picture?   :8

It is the repos; name: screenruler
IMHO a must have for conky fanatics.

Also: "Digital-7" is not a good choice with this application of "grey and colour" for time, "Digital-7 Mono" however is a mono font and works well and in some cases better.  To use it on my system it must be called like this:

#font Digital\-7
#xftfont Digital\-7 
#font Digital\-7 Mono
xftfont Digital\-7 Mono
TEXT
${font Digital\-7 Mono:size=25}

Testing some fonts:
2016_05_18_13_47_00_Scrot11.jpg
As we see "Digital-7 Mono" can do more than LED_mono (or Digitalk) that do "time" exclusively - no text just numbers and a :

For "The Clock" conky I chose LED_mono for it's looks.

Now for the conky enthusiast that wants a true LED/LCD type background "Digital dream" can do it all but you have to build the board:

 Digital dream - for diehards!!
${font Digital dream:size=25}${goto 10}${color1}88:88:88${goto 10}${color5}${time %T}${color}${font}

${time %X} based on locale 12/24
${font Digital dream:size=20}${goto 10}${color1}88:88:88 88${goto 10}${color5}${time %X}${color}${font}

 - with some 'cheats':
${font Digital dream:size=25}${goto 10}${color1}88:88:88\
${goto 10}11:11:11${goto 10}00:00:00${goto 10}ww:ww:ww\
${goto 10}mm:mm:mm${goto 10}aa:aa:aa${goto 10}vv:vv:vv\
${goto 10}${color5}${time %T}${color}
${goto 10}${color1}88 888 88\
${goto 10}11 111 11${goto 10}00 000 00${goto 10}ww www ww\
${goto 10}mm mmm mm${goto 10}aa aaa aa${goto 10}vv vvv vvv\
${goto 10}${color5}${time %d %b %y}${color}${font}

And now back to the weather.
Today's high 14° with a low of 9° and winds from the ssw betweem 15 and 22 km/h.  Have a nice one everyone.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#886 2016-05-18 18:23:52

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

fvirgola80 wrote:

=== Conky v1.90 ===
Here's the conky Clock2FV80 created for those not using LUA script .. with 8 day weather forecast and moon phase of the current day .
The idea of a team made up of friends .....
@Yoda wink --> Sector11
@Obi-Wan :8 --> TEO

I updated the front page with the appropriate links to your amazing job.
Well done once again my friend!!!


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#887 2016-05-18 18:25:07

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Sector11 wrote:

EDITsad  Did not see the response above.  So now I have a question:  Why do I need the "quote" marks?

What quote marks?


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#888 2016-05-18 19:03:27

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

TeoBigusGeekus wrote:
Sector11 wrote:

EDITsad  Did not see the response above.  So now I have a question:  Why do I need the "quote" marks?

What quote marks?

For me to get it to work, I had to change:

wind_direction=$(sed -n 73p /media/5/Conky/2b_Wunderground_API/Conditions)

to:

wind_direction="$(sed -n 73p /media/5/Conky/2b_Wunderground_API/Conditions)"

wind.sh

#!/bin/bash
# loutch wind direction
# https://forums.bunsenlabs.org/viewtopic.php?pid=27481#p27481
# icone direction vent
#wind_direction=$(sed -n 73p /media/5/Conky/2b_Wunderground_API/Conditions)
wind_direction="$(sed -n 73p /media/5/Conky/2b_Wunderground_API/Conditions)"
if [[ $wind_direction == "no wind" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/00.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "N" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/13.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NNE" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/14.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NE" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/15.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ENE" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/16.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "E" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/17.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ESE" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/18.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SE" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/19.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SSE" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/20.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "S" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/05.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SSW" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/06.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SW" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/07.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "WSW" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/08.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "W" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/09.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "WNW" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/10.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NW" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/11.png /media/5/Conky/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NNW" ]]; then
	cp /media/5/Conky/2b_Wunderground_API/bearingicons/12.png /media/5/Conky/2b_Wunderground_API/Wind.png
fi
exit
TEXT
${execi 300 bash /media/5/Conky/2b_Wunderground_API/wind.sh}\
${image /media/5/Conky/2b_Wunderground_API/Wind.png -p 120,150}

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#889 2016-05-18 19:09:04

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

What message do you get from the terminal when you remove the quote marks?


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#890 2016-05-18 19:29:46

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Well this is  :8 embarrassing :8  - nothing:

 18 May 16 @ 16:20:19 ~
  $ bash /media/5/Conky/2b_Wunderground_API/wind.sh
 
 18 May 16 @ 16:20:22 ~
  $ bash /media/5/Conky/2b_Wunderground_API/wind2.sh
 
 18 May 16 @ 16:20:40 ~
  $ 

wind2.sh - has:

wind_direction=$(sed -n 73p /media/5/Conky/2b_Wunderground_API/Conditions)
#wind_direction="$(sed -n 73p /media/5/Conky/2b_Wunderground_API/Conditions)"

and calls the red images

wind.sh - has:

#wind_direction=$(sed -n 73p /media/5/Conky/2b_Wunderground_API/Conditions)
wind_direction="$(sed -n 73p /media/5/Conky/2b_Wunderground_API/Conditions)"

and calls the green images

It didn't work yesterday.  sad
OK, I'm going back to my corner now....


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#891 2016-05-18 19:40:49

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

The quotes should be ignored (see here)
The if commands didn't work for another reason.

...one of them could be that I, for instance, have "Variable" instead of a wind in my WU forecast...

loutch should add a few more ifs...

EDIT:
That's why the following code works:

cp $HOME/2b_Wunderground_API/vents/"02.png" $HOME/2b_Wunderground_API/Wind.png

There's no need to put quotes to 02.png

Last edited by TeoBigusGeekus (2016-05-18 19:43:27)


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#892 2016-05-18 22:08:00

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

OH ... interesting ... I just noticed that my test scripts don't have the "06.png" (quotes) See post #889

and because of this, in your 2b script:

if [[ $day_or_night == nt ]]; then

I guess the quotes are not needed here either:

elif [[ $wind_direction == "SSW" ]]; then

cool


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#893 2016-05-19 05:57:34

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

No, I guess they're not.
Try it yourself.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#894 2016-05-19 06:20:00

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Hello guys

Here the link to the blue wing-icons.zip

Blue wind-icons


@+


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#895 2016-05-19 13:05:30

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 262

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

TeoBigusGeekus wrote:
fvirgola80 wrote:

=== Conky v1.90 ===
Here's the conky Clock2FV80 created for those not using LUA script .. with 8 day weather forecast and moon phase of the current day .
The idea of a team made up of friends .....
@Yoda wink --> Sector11
@Obi-Wan :8 --> TEO

I updated the front page with the appropriate links to your amazing job.
Well done once again my friend!!!

wink wink


Nothing happens by chance

Offline

#896 2016-05-19 13:07:39

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 262

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Even today the force was with me ....

Sound familiar?

v9000_S11.jpg --> v9000ok1.jpg

big_smile

Last edited by fvirgola80 (2016-05-19 13:10:10)


Nothing happens by chance

Offline

#897 2016-05-19 13:23:33

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,647

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Sector11 wrote:

It is the repos; name: screenruler

@ElConkystator,

many, many thanks for this excellent explanation!

Under KDE the package is kruler.
Your clue led me to the hot track.  {)
Here always disappeared a part of the second zero.kruler2.th.jpg

Sector11 wrote:

IMHO a must have for conky fanatics.

A true word has been confirmed again!  big_smile

Last edited by unklar (2016-05-19 13:26:15)

Online

#898 2016-05-19 14:46:18

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

fvirgola80 wrote:

Even today the force was with me ....

Sound familiar?

That's what I call conky extravaganza...


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#899 2016-05-19 15:31:01

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 262

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

TeoBigusGeekus wrote:
fvirgola80 wrote:

Even today the force was with me ....

Sound familiar?

That's what I call conky extravaganza...

Of course extravaganza , a little experiment with the weather in lua that I still have to understand how it works ..... I think Sector11 he knows something .... ]:D ]:D


Nothing happens by chance

Offline

#900 2016-05-19 17:33:13

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

^ Not me ... I struggle with that script all the time.  It's been so long since I did anything with that I'd probably need a week to get it to do anything.  mrpeachy did well creating the v9000 LUA script though.

It's a PITA to configure.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

Board footer

Powered by FluxBB