You are not logged in.

#4161 2023-02-04 16:04:22

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

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

@marens
script ~/Accuweather_conky_script/accuweather - I don't support it.
fork ~/Accuweather_conky_script/conkyconfig/Accuweather/1b2_ru - still support.
1b2_ru - localized script with minor improvements
1b2_en - English version
If you are interested, I can personally upload it to you on my Google disk.
With a little attention, you can find differences and similarities with the accuweather file and make the accuweather script work.

Offline

#4162 2023-02-04 18:27:06

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

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

il.harun wrote:

@marens
script ~/Accuweather_conky_script/accuweather - I don't support it.
fork ~/Accuweather_conky_script/conkyconfig/Accuweather/1b2_ru - still support.
1b2_ru - localized script with minor improvements
1b2_en - English version
If you are interested, I can personally upload it to you on my Google disk.
With a little attention, you can find differences and similarities with the accuweather file and make the accuweather script work.


@il.harun,thanks to your hard work over the last few months.
I am happy to see that you are here with us again, you brightened my evening.

Yes, I am interested.
Of course, the best solution would be your return.
It's not the same with you and without you.


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

Offline

#4163 2023-02-04 19:58:57

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

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

@marens
You can do it, I'll help.
  I will keep script 1b2_ru up to date for several months. This is where you get experience.

file :  only_marens_Accuweather_conky_script.tar.gz  on google drive

Offline

#4164 2023-02-04 22:19:22

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

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

il.harun wrote:

@marens
You can do it, I'll help.
  I will keep script 1b2_ru up to date for several months. This is where you get experience.

file :  only_marens_Accuweather_conky_script.tar.gz  on google drive


Thanks.
I downloaded the only_marens_Accuweather_conky_script.tar.gz file.
I will try to learn something new in the coming days.
The most important thing is that everything is working properly right now.

P.S.
I found your folder from 05/15/2022 in my conky archive.


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

Offline

#4165 2023-02-05 00:37:02

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

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

I promised to share some of my settings with everyone.

If you want to receive fresh data immediately after the start,
use this simple script.

Create a file accuweather_start.sh in Accuweather_conky_script folder.

Open file with text editor and copy/paste content:

#!/bin/bash

while true 
 
  do

    bash $HOME/Accuweather_conky_script/accuweather -f2015
        
  sleep 500
      
done

If you use another command,replace it.
Save text editor.

Right click on file accuweather_start.sh > Properties > Permissions and check: Allow executing file as program.

This script will execute the command every 500s:

bash $HOME/Accuweather_conky_script/accuweather -f2015

and send the retrieval data to the curr_cond file.


Now,you don't need this line in conky itself:

${texeci 500 bash $HOME/Accuweather_conky_script/accuweather -f2015}

and remove her from conky.

Make sure the script starts immediately after login.
In Ubuntu it looks like this:
Menu > StartUp Applications > Add Button:

  Name: AccuWeather
  Command:  sh -c '$HOME/Accuweather_conky_script/accuweather_start.sh'
  Comment: Start AccuWeatherScript before Conky

Finally, delay the start conky 5s.

Reboot.


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

Offline

#4166 2023-02-17 23:36:23

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

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

Colored UV Index

Values:
Low (0-2)
Moderate (3-5)
High (6-7)
Very High (8-10)
Extreme (11+)

My colors:
color3 00AD00
color5 orange
color7 F2DA40
color8 magenta
color9 FF4040

Find Line:

UV INDEX: $color${texeci 600 sed -n '9p' $HOME/Accuweather_conky_script/curr_cond}

Replace with:

UV INDEX:  ${color}\
${if_match "${texeci 600 sed -n '9p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond | awk '{print $2}'}" == ""}-\
${else}\
${if_match "${texeci 600 sed -n '9p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond | awk '{print $2}'}" != ""}\
${texeci 600 sed -n '9p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond | awk '{print int($1+0.5)}'}\
${endif}${endif}\
${if_match "${texeci 600 sed -n '9p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond | awk '{print $2}'}" == "(Low)"}${color3}  Low\
${else}${if_match "${texeci 600 sed -n '9p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond | awk '{print $2}'}" == "(Moderate)"}${color7}  Moderate\
${else}${if_match "${texeci 600 sed -n '9p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond | awk '{print $2}'}" == "(High)"}${color5}  High\
${else}${if_match "${texeci 600 sed -n '9p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond | awk '{print $2, $3}'}" == "(Very High)"}${color9}  Very High\
${else}${if_match "${texeci 600 sed -n '9p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond | awk '{print $2}'}" == "(Extreme)"}${color8}  Extreme\
${else}${endif}${endif}${endif}${endif}${endif}

Test:
Open curr_cond file

Change line 9:
12 Extreme

Save.
Restart conky.

EDIT
The code has been updated.

Last edited by marens (2025-08-21 02:06:20)


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

Offline

#4167 2023-02-18 00:22:20

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

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

NICE!!!

Thank you.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4168 2023-02-18 01:11:56

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

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

@Sector11
Thanks.

Show weather retrieval time

First line after Weather:

WEATHER${alignr 10}${font Ubuntu:size=9:italic}${blink ${color 0098FF}Retrieval Time:  ${color gold}${texeci 600 date -r $HOME/Accuweather_conky_script/curr_cond_raw -R | awk '{print $5}'}}

or without blink effect:

WEATHER${alignr 10}${font Ubuntu:size=9:italic}${color 0098FF}Retrieval Time:  ${color gold}${texeci 600 date -r $HOME/Accuweather_conky_script/curr_cond_raw -R | awk '{print $5}'}

Change colors,font,alignr XX ...


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

Offline

#4169 2023-02-19 11:01:31

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

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

@marens, Keep it up!   wink

Very nice!
I have always solved this via the script and a line in the conky. wink

		date +%T > $HOME/Accuweather_conky_script/update

and

${texeci 600 sed -n '1p' $HOME/Accuweather_conky_script/update}

Offline

#4170 2023-02-19 12:18:39

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:

@marens, Keep it up!   wink

Very nice!
I have always solved this via the script and a line in the conky. wink

		date +%T > $HOME/Accuweather_conky_script/update

and

${texeci 600 sed -n '1p' $HOME/Accuweather_conky_script/update}

Both are nice ...


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4171 2023-02-19 14:29:28

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

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

@unklar,
@Sector11
Thanks.

Show Last Update

Add before(after) Retrieval Time.

Time when conky starts.
Now,we expect the next update in 600s(10m).

${color 0098FF}Last Update:  ${color gold}${texeci 600 date -R | awk '{print $5}'}

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

Offline

#4172 2023-02-19 14:56:05

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

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

@ marens and unklar

I have applied unklar's version to my weather script AND my mind kept ticking.

S11 thought
SELF!  When was the last time I updated my system?

And SELF replied

ummm Fri, 15 July 1842, how would I know?

So off into my bash aliases I go:  and "up2" gets edited:

alias up2='sudo apt update && sudo apt upgrade --no-install-recommends && date +%Y·%m·%d%n%T > /media/5/Conky/sysupdated'
 19 Feb 23 @ 10:59:59 ~
   $ date +%Y·%m·%d%n%T
2023·02·19
11:04:27

And 3 lines added in my conky:

${alignc}${color5}System Last updated${color}
${alignc}${texeci 600 sed -n '1p' /media/5/Conky/sysupdated}
${alignc}@ ${texeci 600 sed -n '2p' /media/5/Conky/sysupdated}

As seen here top line on the left conky and in S Y S  I N F O in the conky on the right.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4173 2023-02-19 15:10:01

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

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

marens wrote:
${color 0098FF}Last Update:  ${color gold}${texeci 600 date -R | awk '{print $5}'}

Why not just use:  "date +%T" - no awk needed.
See unklar's example

I wonder if faketime can do seconds.

Or a "countdown" timer  smile


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4174 2023-02-19 19:12:47

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

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

Sector11 wrote:
marens wrote:
${color 0098FF}Last Update:  ${color gold}${texeci 600 date -R | awk '{print $5}'}

Why not just use:  "date +%T" - no awk needed.
See unklar's example

I wonder if faketime can do seconds.

Or a "countdown" timer  smile

Yes.
@unklar command "date +%T" is elegant.

I like to look for a solution in my own way.
Sometimes it's not good, but it's fun.

Example,

My way - System Info Last Update:

$ cat /var/log/apt/history.log | grep 'End-Date'
End-Date: 2023-02-01  23:02:35
End-Date: 2023-02-01  23:06:18
End-Date: 2023-02-01  23:11:30
End-Date: 2023-02-01  23:12:11
End-Date: 2023-02-02  23:21:03
End-Date: 2023-02-06  18:33:01
End-Date: 2023-02-08  23:00:53
End-Date: 2023-02-08  23:06:01
End-Date: 2023-02-13  17:44:21
End-Date: 2023-02-14  15:06:33
End-Date: 2023-02-17  01:32:14
End-Date: 2023-02-17  01:38:24

$cat /var/log/apt/history.log | grep 'End-Date' | sed -n '$p'
End-Date: 2023-02-17  01:38:24

$cat /var/log/apt/history.log | grep 'End-Date' | sed -n '$p' | awk '{print $2}'
2023-02-17

$cat /var/log/apt/history.log | grep 'End-Date' | sed -n '$p' | awk '{print $3}'
01:38:24

In your case:

${alignc}${color5}System Last updated${color}
${alignc}${texeci 600 cat /var/log/apt/history.log | grep 'End-Date' | sed -n '$p' | awk '{print $2}'}
${alignc}@ ${texeci 600 cat /var/log/apt/history.log | grep 'End-Date' | sed -n '$p' | awk '{print $3}'}

No script needed.

Or a "countdown" timer?
Thanks,no(for now).


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

Offline

#4175 2023-02-20 11:05:05

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

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

marens wrote:

I like to look for a solution in my own way.
Sometimes it's not good, but it's fun.

That the key to it all!

Thanks for your solution with the history file.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4176 2023-02-20 14:10:09

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

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

Sector11 wrote:
marens wrote:

I like to look for a solution in my own way.
Sometimes it's not good, but it's fun.

That the key to it all!

Thanks for your solution with the history file.

Thanks, you gave me a new idea.
The system is upgraded once in few days, but every day it is updated several times.
It might be good to know when it was last done?

Check:

$ stat -c %y /var/lib/apt/periodic/update-success-stamp

Test:

Run:

$ sudo apt update

Then:

$ stat -c %y /var/lib/apt/periodic/update-success-stamp | awk -F'.' '{print $1}'

Maybe this is a better solution for your nice AccuWeather-SysInfo conky?


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

Offline

#4177 2023-02-21 12:33:52

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

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

Actually I run "up2" every now and then:

alias up2='sudo apt update && sudo apt upgrade --no-install-recommends && date +%Y·%m·%d%n%T > /media/5/Conky/sysupdated'
alias sup2='sudo apt update && apt upgrade --no-install-recommends --simulate'

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#4178 2023-02-21 12:54:08

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

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

Sector11 wrote:

Actually I run "up2" every now and then:

alias up2='sudo apt update && sudo apt upgrade --no-install-recommends && date +%Y·%m·%d%n%T > /media/5/Conky/sysupdated'
alias sup2='sudo apt update && apt upgrade --no-install-recommends --simulate'

Yes.
Just simulate upgrade.
Nice.


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

Offline

#4179 2023-02-22 16:24:45

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

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

Hello guys


Have anyone the latest accuweather script  who work

many tanks

@+


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

#4180 2023-02-23 10:38:28

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

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

Malheureusement @loutch

Je n'ai plus de script corrigé.
Donc, je le laisse de côté jusqu'à ce que ces 'idiots de la météo des jeux' le cassent aussi:

I no longer have a debugged script.
So, I'll just leave that out until those 'game weather idiots' break that too:

vIpYObHt.png

Offline

Board footer

Powered by FluxBB