You are not logged in.

#4361 2023-10-03 10:05:25

ploukop
Member
Registered: 2023-03-13
Posts: 13

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

Thank you @marens again!

Offline

#4362 2023-10-18 17:37:13

ploukop
Member
Registered: 2023-03-13
Posts: 13

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

@marens, how this 'color(#,#,#,#) command works if i want to change yellow color to  other?

Offline

#4363 2023-10-18 22:47:52

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

@ploukop

rgba(Red, Green, Blue, Alpha)

In this function, an Alpha is used to express the opacity of a color.
Opacity property is used to set the transparency of a color and its range lies between 0.0 to 1.0, where 0.0 represents the fully transparent and 1.0 represents the fully opaque.

It would be good if you have the color picker installed.
I use Gcolor2.

If you don't have one, use this:
https://www.w3schools.com/colors/colors_picker.asp

Pick a color or scroll down where there is a list of rgb colors.
Just add an Alpha (0.0 - 1.0) value and change the format to rgba.

In gis-weather.py file:
color=(180, 180, 0, 0.8) replace with new color=(XXX, YYY, ZZZ, 1).


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4364 2023-10-20 09:59:31

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

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

The package is called gcolor3 in debian and has display problems in testing/sid and unstable.
That's why it's better to use the color-picker package straight away.  wink

Offline

#4365 2023-10-20 11:56:56

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

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

unklar wrote:

The package is called gcolor3 in debian and has display problems in testing/sid and unstable.
That's why it's better to use the color-picker package straight away.  wink

I don't use gedit so even color-picker is not installed here:

 20 Oct 23 @ 08:36:19 ~
   $ ser color-picker
alias ser = aptitude search
p   gedit-plugin-color-picker   - Color Picker plugin for gedit        
 
 20 Oct 23 @ 08:36:32 ~
   $ ser gcolor
alias ser = aptitude search
p   gcolor3                     - Simple GTK3 color selector and picker
 
 20 Oct 23 @ 08:37:07 ~
   $ 

However I do have "yad" here and In my open-box menu I use:

<item label="Y Color">
	<action name="Execute">
		<execute>yad --color</execute>
	</action>
</item>

Works like a charm! See it here

Side note: I have yad for certain conky applications such as this.
yad --calendar nice too if you want a monthly calendar.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4366 2023-10-20 12:28:38

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,032
Website

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

marens wrote:

It would be good if you have the color picker installed.
I use Gcolor2.

Just a note that this app is very, very old and is only available as source code from Stretch and earlier...

https://sources.debian.org/src/gcolor2/

However, if you don't want to compile it and are a dirty, dirty boy like I am, it will install from this Ubuntu...

http://archive.ubuntu.com/ubuntu/pool/u … g/gcolor2/

Dependency errors will be fixed by running...

sudo apt -f install

BTW, gcolor3 was developed by forum member and former BunsenLabs developer @Unia.

https://www.hjdskes.nl/projects/gcolor3/

Hey @Sector11!


No, he can't sleep on the floor. What do you think I'm yelling for?!!!

Offline

#4367 2023-10-20 12:33:53

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

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

Hello, my friend Sector11!
and, exactly this pipette in gcolor3 does not work in boron anymore.

BLHi3o8t.png

Sector11 wrote:

Side note: I have yad for certain conky applications such as this.

Brilliant in BL. wink

Last edited by unklar (2023-10-20 12:38:23)

Offline

#4368 2023-10-20 12:59:57

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

unklar wrote:

The package is called gcolor3 in debian and has display problems in testing/sid and unstable.
That's why it's better to use the color-picker package straight away.  wink

Wrong.
I installed the .deb package Gcolor2:
https://mirrors.edge.kernel.org/ubuntu/ … /g/gcolor2

It works great.

P.S.
My uptime solution:

$ cat /proc/uptime |  perl -ne '/(\d*)/ ; printf "%02d:%02d:%02d\n",int(($1%86400)/3600),int(($1%3600)/60),$1%60'
00:29:51

or shorter:

cat /proc/uptime |  perl -ne '/(\d*)/ ; printf "%02d:%02d\n",int(($1%86400)/3600),int(($1%3600)/60)'
00:33

or if you want to reset the time after logout:
     
Lists how long the user for the given console has been logged in for:
user_time console

$ who
marens    :0           2023-10-20 13:54 (:0)

Console is :0.

Conky:

${user_time :0}

Format is same as uptime.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4369 2023-10-20 17:49:33

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

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

hhh wrote:

BTW, gcolor3 was developed by forum member and former BunsenLabs developer @Unia.

https://www.hjdskes.nl/projects/gcolor3/

Hey @Sector11!

Hey there Triple-h, I miss Unia.
Hope he's doing well.

unklar wrote:

Hello, my friend Sector11!

Sector11 wrote:

Side note: I have yad for certain conky applications such as this.

Brilliant in BL. wink

Hallo unklar, mein Freund
Yad is perfect to pick colours simple, easy to use and does exactly what it says it does.

Yad as my conky app top start|stop conkys is brilliant isn't it.
Not my original idea, got it from another distro that had an entry to start a conky and another to stop it.  I applied my "start|stop" scripts to it for just one entry per conky.
Damo grabbed it, bended it, folded it and molded it into what BL uses today.

Teamwork all the way.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4370 2023-10-20 18:11:55

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

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

Well, no, not wrong.
The package in "Debian" is as unklar said:

   $ ser gcolor
alias ser = aptitude search
p   gcolor3                     - Simple GTK3 color selector and picker

and hhh said that gcolor2 is very old and is only available as source code from Stretch and earlier... (NOTE: referring to older "Debian" files)

Also your link shows that hhh is correct, it is ±11 years old.

10-Aug-2012 13:33     43K
gcolor2_0.4-2.1ubuntu1.dsc                         10-Aug-2012 13:33    1935
gcolor2_0.4-2.1ubuntu1_amd64.deb                   10-Aug-2012 13:33     25K
gcolor2_0.4-2.1ubuntu1_i386.deb                    10-Aug-2012 13:34     25K
gcolor2_0.4.orig.tar.gz                            25-Oct-2005 22:26    366K

BL is a 'Debian' Linux, we don't recommend using "Ubuntu" deb files as they may mess up the system.

BTW: gcolor3 is there as well:
http://archive.ubuntu.com/ubuntu/pool/u … g/gcolor3/


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4371 2023-10-29 16:26:12

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

Moongiant conky script  -  Illumination Angle and Visibility in Real Time

Info for those (from Europe) using my Moongiant conky script plugin:
https://forums.bunsenlabs.org/viewtopic … 46#p128546

Daylight Saving Time ends on Sunday, 29 October 2023, 03:00.

If you want the moon in conky to look the same as it does in the sky, you have to replace the line:

date=$(date -d '-2 hour' '+%Y-%m-%dT%H:%M:%SZ')

with:

date=$(date -d '-1 hour' '+%Y-%m-%dT%H:%M:%SZ')

If people would know how little brain is ruling the world, they would die of fear.

Offline

#4372 2023-10-29 16:40:04

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,032
Website

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

marens wrote:

Daylight Saving Time ends on Sunday, 29 October 2023, 03:00.

https://www.bbc.co.uk/news/uk-67243110

But in the U.S.A. and most of Canada, but not in Mexico, it ends at 2 am (02:00) on November 5th (5 November). roll

https://www.timeanddate.com/time/change/usa

This rabbit hole goes way deeper...

https://en.wikipedia.org/wiki/Daylight_ … by_country


No, he can't sleep on the floor. What do you think I'm yelling for?!!!

Offline

#4373 2023-10-29 17:48:58

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

^ Those using my script plugin can always check with a simple command:

$ date +%z
+0100

This means that a correction of -1 hour (now) is required.

P.S.
At the beginning of the script there is an explanation and it applies to all locations.
This is just a reminder not to forget.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4374 2023-10-29 19:21:10

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

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

Eliminate a possible human error manual step:

Have "date", in the bash script, output a file every, example, hour:

date +%z>/$HOME/timechange

And check it in conky:

${if_match "${time %z}" == "${execpi 600 sed -n '1p' $HOME/timechange}"}no time change\
${else}there is a time change${endif}

Because conkys ${time} command does follow local daylight savings time changes.

Of which there is none here.

Test it:

 29 Oct 23 @ 16:21:55 ~
   $ date +%z>/$HOME/timechange
 
 29 Oct 23 @ 16:22:04 ~
   $ 

with the conky line above.

See it here bottom 3 lines

Time: ${time %z} or ${time %Z}
Date: ${execpi 600 sed -n '1p' $HOME/timechange}

${if_match "${time %z}" == "${execpi 600 sed -n '1p' $HOME/timechange}"}no time change\
${else}there is a time change${endif}

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4375 2023-11-02 16:03:23

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

Moongiant conky script  -  Illumination Angle and Visibility in Real Time


I changed the beginning of my script plugin and it no longer needs the DST correction.

Replace the line containing 'date=' with:

#Daylight saving time
sign=$(date +%z | sed 's/\(.\{1\}\).*/\1/')
dz=$(date +%z | sed 's/^.//' | sed 's/\(.\{2\}\).*/\1/' | sed 's/^0\(.*\)/\1/')

if [[ "$sign" == "+" ]]; then
   dst=$(echo 0-$dz | bc)      
else      
   dst=$(echo $dz)   
fi
   
date=$(date -d "$dst hour" "+%Y-%m-%dT%H:%M:%SZ")

I also tested two locations a long distance from Europe:

#Melbourne(Australia) +1000  Missing correction -10 hours to UTC
#Buenos Aires(Argentina) -0300  Missing correction +3 hours to UTC

Everything works as expected:

melbourne.png  buenos-aires.png


EDIT
Added title

Last edited by marens (2023-11-03 14:03:59)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4376 2023-11-04 09:45:22

asqwerth
Member
Registered: 2015-10-08
Posts: 24

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

Regarding TBG's accuweather conky script [as adjusted by marens], there is now an issue with conkyweather font's codes assigned to current condition and current wind direction in curr_cond.  Gibberish symbols are displayed for them. 

The codes for the various days' weather condition in daily_forecast is still showing fine.

Using the 2015 and 2016 weather images/icons is still ok.

Using TBG's Accuweather RSS script, conkyweather font is still working.

Offline

#4377 2023-11-04 10:24:20

il.harun
Member
Registered: 2020-06-04
Posts: 54

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

@marens
it's easier:
sign=$(date +%z | sed 's/[^+-]//g')
dz=$(date +%-:::z | sed 's/[^0-9]//g')
one-liner:
date=$(date -d "$(date +%-:::z | sed 's/+/-/g') hour" "+%Y-%m-%dT%H:%M:%SZ")

Offline

#4378 2023-11-04 14:24:06

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

@asqwerth

I'm sorry, but I stopped supporting the accuweather script.


Hi @il.harun,

Thanks for the suggestions and for using my moongiant conky script plugin.

From my old post:

marens wrote:

I'm not a developer and I'm not familiar with the sed command, but ...

I try to find the right solution in my own way and always learn something new.
I only use Copy/Paste when I have to do it.
Following your work I learned a lot about accuweather script, but I always analyzed solutions.
That's how I came to the situation where I can fix many things myself.
'Many things' are not the same as 'everything', but I am satisfied with the progress.

P.S.
Thank you (again) for maintaining the accuweather script for 9 months after @Teo left.
I was successful (with your support) for the next 9 months and it's time for someone else to come.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4379 2023-11-05 01:58:35

asqwerth
Member
Registered: 2015-10-08
Posts: 24

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

@marens

No worries, I understand your position.  I have other weather conkies using openweathermap + moongiant data, and gisweather on a laptop, so there are fallbacks.

But the conkyweather font symbols are back to normal.  Looks like it was a temporary glitch. At least for now.

Offline

#4380 2023-11-05 09:05:38

GioD
New Member
From: Germany
Registered: 2023-11-05
Posts: 4

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

marens wrote:

Moongiant conky script  -  Illumination Angle and Visibility in Real Time


I changed the beginning of my script plugin and it no longer needs the DST correction.

Replace the line containing 'date=' with:

#Daylight saving time
sign=$(date +%z | sed 's/\(.\{1\}\).*/\1/')
dz=$(date +%z | sed 's/^.//' | sed 's/\(.\{2\}\).*/\1/' | sed 's/^0\(.*\)/\1/')

if [[ "$sign" == "+" ]]; then
   dst=$(echo 0-$dz | bc)      
else      
   dst=$(echo $dz)   
fi
   
date=$(date -d "$dst hour" "+%Y-%m-%dT%H:%M:%SZ")

Hi marens

maybe I'm missing something out here, but from what I see, you just want to know what the time in UTC is, right?


Then you could just use 'date  -u, --utc, --universal print or set Coordinated Universal Time (UTC)'

date -u +%Y-%m-%dT%H:%M:%SZ

which is simply the very same out as il.haruns's one.liner

il.harun wrote:

@marens
it's easier:
sign=$(date +%z | sed 's/[^+-]//g')
dz=$(date +%-:::z | sed 's/[^0-9]//g')
one-liner:
date=$(date -d "$(date +%-:::z | sed 's/+/-/g') hour" "+%Y-%m-%dT%H:%M:%SZ")


Another alternative would be

 TZ=UTC date +%Y-%m-%dT%H:%M:%SZ

Offline

Board footer

Powered by FluxBB