You are not logged in.
image.lua
--créer par Didier-T
require 'cairo'
home = os.getenv ('HOME')
--Fonction d'affichage
function conky_fDrawImage(path,x,y,w,h,arc)
path = string.gsub(path, "~", home)
path = string.gsub(path, "$HOME", home)
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local function fDrawImage(path,x,y,w,h,arc)
x=x+(w/2)
y=y+(h/2)
local img = cairo_image_surface_create_from_png(path)
local w_img, h_img = cairo_image_surface_get_width (img), cairo_image_surface_get_height (img)
local cr = cairo_create (cs)
cairo_translate (cr, x, y)
if arc then
cairo_rotate (cr, arc)
end
cairo_scale (cr, w/w_img, h/h_img)
cairo_set_source_surface (cr, img, -w_img/2, -h_img/2)
cairo_paint (cr)
cairo_destroy(cr)
cairo_surface_destroy (img)
end
fDrawImage(path,x,y,w,h,arc)
cairo_surface_destroy(cs)
return ""
end
Offline
Thank unklar, now all work fine.
Offline
S11_accu_tm_BAR_2016-full.conky & S11_accu_UVI.conky
Finally diecided to get the {cough cough}new {cough} accuweather script with lynx, such a cat, and ran into an OOPS! right off the bat!
Top and bottom of the script:
weather_conky_launch_command="conky -b"
{snip}
pkill -CONT -xf "$weather_conky_launch_command"
Teo Teo Teo, it's me ... when do I ever run just ONE conky? HUH! HUH!
And that includes your 1_accu scripts as well Scheeeeech...
So I made a new conky
weather_conky_launch_command="conky -c /media/5/Conky/1_accuweather/TEO-accu-data_2019.conky"
{snip}
pkill -CONT -xf "$weather_conky_launch_command"
... see it below.
Also I had to change /$HOME/1_accuweather as well .. but Teo throws a beautiful curve ball at Sector11, he swings ...
STIIIIIIIIIRKE! 1
So I go looking ... 867 lines later...
Line 867:
sed -i "4s/$/\${image \$HOME\/1_accuweather\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" /media/5/Conky/1_accuweather/altogether16_2015
fi
if [[ $hourly2016 == 1 ]]; then
Line 870:
sed -i "4s/$/\${image \$HOME\/1_accuweather\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" /media/5/Conky/1_accuweather/altogether16_2016
Said to myself what would Teo do....
Line 867:
sed -i "4s/$/\${image \/media\/5\/Conky\/1_accuweather\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" /media/5/Conky/1_accuweather/altogether16_2015
fi
if [[ $hourly2016 == 1 ]]; then
Line 870:
sed -i "4s/$/\${image \/media\/5\/Conky\/1_accuweather\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" /media/5/Conky/1_accuweather/altogether16_2016
Seems to be working. Did I do that right Teo?
NOW snippits of the NEW conky to satisfy the new script - done for conky v1.9 though.
/media/5/Conky/1_accuweather/TEO-accu-data_2019.conky
{snip}
minimum_size 1 1
maximum_width 1
gap_x 0 ## l|r
gap_y 0 ## u|d
alignment bl
update_interval 1
{snip}
TEXT
${texeci 900 bash /media/5/Conky/1_accuweather/1_accuweather -f2015 -f2016 -h2015 -h2016}
shows nothing on the screen ... BUT the other conkys use the "data"
Now a funny thing happened when running the script, I keep seeing this error:
14 May 19 @ 13:44:29 ~
$ conky -c /media/5/Conky/1_accuweather/TEO-accu-data_2019.conky &
[1] 25803
14 May 19 @ 13:44:33 ~
$ Conky: desktop window (265) is root window
Conky: window type - normal
Conky: drawing to created window (0x2400001)
Conky: drawing to double buffer
rm: cannot remove ‘/media/5/Conky/1_accuweather/altogether16’: No such file or directory
sed: can't read /media/5/Conky/1_accuweather/altogether16: No such file or directory
rm: cannot remove ‘/media/5/Conky/1_accuweather/altogether16’: No such file or directory
sed: can't read /media/5/Conky/1_accuweather/altogether16: No such file or directory
Conky: '/media/5/Conky/1_accuweather/TEO-accu-data_2019.conky' modified, reloading...
Conky: desktop window (265) is root window
Conky: window type - normal
Conky: drawing to created window (0x2400001)
Conky: drawing to double buffer
rm: cannot remove ‘/media/5/Conky/1_accuweather/altogether16’: No such file or directory
sed: can't read /media/5/Conky/1_accuweather/altogether16: No such file or directory
rm: cannot remove ‘/media/5/Conky/1_accuweather/altogether16’: No such file or directory
sed: can't read /media/5/Conky/1_accuweather/altogether16: No such file or directory
rm: cannot remove ‘/media/5/Conky/1_accuweather/altogether16’: No such file or directory
sed: can't read /media/5/Conky/1_accuweather/altogether16: No such file or directory
Conky: '/media/5/Conky/1_accuweather/TEO-accu-data_2019.conky' modified, reloading...
Conky: desktop window (265) is root window
Conky: window type - normal
Conky: drawing to created window (0x2400001)
Conky: drawing to double buffer
? ?
Last edited by Sector11 (2019-05-15 11:57:11)
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Hello, my friend, (I would like to be Teo)
maybe you still have a "predecessor script" working. Because with me the lines for "uv" 863 - 871 look like this:
if [[ $h_uv == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '17,18s/^.*$/VOID/' $HOME/1_accuweather/altogether16
elif [[ $hourly2015 == 1 ]]; then
sed -i '19,20s/^.*$/VOID/' $HOME/1_accuweather/altogether16_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '19,20s/^.*$/VOID/' $HOME/1_accuweather/altogether16_2016
fi
fi
Offline
Seems to be working. Did I do that right Teo?
Yep, it goes without saying, replace all paths with your paths for the script to function properly.
Now a funny thing happened when running the script, I keep seeing this error:
If you mean the messages for the altogether files pay no attention to it.
Line 584 of the script
rm $HOME/1_accuweather/{altogether16,altogether16_2015,altogether16_2016}
Tries to delete altogether16, altogether16_2015 and the altogether16_2016 files, whether they exist or not, so an error message is inevitable if any of them is not present.
On an unrelated note, nice to see you again in the thread, we've missed you old bean!
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
It was late 2008/early 2009 and not many conky weather scripts were out there, the most popular one being the one kaivalagi had created which used weather.com.
Weather.com didn't have a forecast for my hometown, so I created a script of my own using Accuweather's RSS service.
It was tiny and absolutely minimal, but it worked fine and I was happy with it, so I posted it in the Ubuntuforums.
Here's a screenshot of the thread's first page from 2011 (as far back as wayback machine would go):
You can see that the Wunderground ICAL script (RIP) had been added, as well as the NWS XML one (also RIP).
The date that thread was created was May, 11th 2009.
Since then the scripts have been moved to different sites, have increased in number and complexity and have been updated dozens of times.
Some of them have been deprecated while new ones took their place, new features have been added while others have been abandoned.
None of the above would have been achieved without your support all these years...
Happy 10 year anniversary to the Conky Weather Scripts, to 10 more years predicting the weather through Conky!!!
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
Hello, my friend, (I would like to be Teo)
![]()
maybe you still have a "predecessor script" working. Because with me the lines for "uv" 863 - 871 look like this:
if [[ $h_uv == 0 ]]; then if [[ $hourly0 == 1 ]]; then sed -i '17,18s/^.*$/VOID/' $HOME/1_accuweather/altogether16 elif [[ $hourly2015 == 1 ]]; then sed -i '19,20s/^.*$/VOID/' $HOME/1_accuweather/altogether16_2015 elif [[ $hourly2016 == 1 ]]; then sed -i '19,20s/^.*$/VOID/' $HOME/1_accuweather/altogether16_2016 fi fi
Hi unklar ...
Those are lines 949-957 in my /media/5/Conky/1_accuweather/1_accuweather script, that I had just downloaded.
Maybe yours is old? Now I KNOW I'm old but my scripts are the latest:
1) Accuweather - 1_2019-3-17
Last edited by Sector11 (2019-05-15 12:46:33)
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Hey, Teo,
in May 2009 I still shit in the Linux diaper ]:D
Only in September 2009 I changed with skin and hair to Linux.
It is enormous what you have created over the years. Your weather scripts belong to the basic equipment of my desktops. They do an excellent job. Thank you very much for that!
It is an honor to know you! Congratulations!
Offline
Maybe your is old? Now I KNOW I'm old but my scripts id the latest:
No doubt about it!
https://forums.bunsenlabs.org/viewtopic … 035#p39035
I'm glad you're back. O:)
Offline
It was late 2008/early 2009 ... {snip}
Happy 10 year anniversary to the Conky Weather Scripts, to 10 more years predicting the weather through Conky!!!
I was a great fan of kaivalagi's python scripts, beta testing them all, except the Google ones, I don't do Google, and I still use a few of them, but of course not the weather. It took me a while to find Teo's scripts.
I followed Teo from Ubu to ARCH and I'm proud to say invited him to #! and Bunsen. We became good friends over the years.
So, if I may, on behalf of all that use any of "Teo Scripts" ...
Teo, we would not be here if YOU were not here. You have satisfied our desire to bend, fold and mutilate weather conkys from the minimal to the monsters I and a few other had fun creating. Some I created just because I could and I must say because they are so easy to manipulate.
I tip my hat to you TeoBigusGeekus. Thank you for your dedication and fast responses. Most times the pixels hadn't even lost the sheen of newness on the screen and you've replied or posted a fix to problems.
Now on a more personal note, and if I may be so bold, I have seen Teo's boot next to a bear's paw print, he really is Teo, the BIGUS Geekus!
Here's to 10 more years! ... to start with.
-------------------------
and don't you go spoiling it by telling them it was a baby bear either. :8
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Sector11 wrote:Maybe your is old? Now I KNOW I'm old but my scripts id the latest:
No doubt about it!
![]()
https://forums.bunsenlabs.org/viewtopic … 035#p39035I'm glad you're back. O:)
Feels good but will be going slower than before ... things have settled.
Like I told Teo, I may not post as often, but I still read everything.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
It is an honor to know you! Congratulations!
I tip my hat to you TeoBigusGeekus. Thank you for your dedication and fast responses. Most times the pixels hadn't even lost the sheen of newness on the screen and you've replied or posted a fix to problems.
The pleasure has been all mine gentlemen; it's been a privilege knowing you.
Your support has been essential to me, thanks again...
EDIT @ S11: I am very lucky to be still alive with that bear and its mother
It sounds funny now but it wasn't back then...
Last edited by TeoBigusGeekus (2019-06-29 16:02:11)
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
Top and bottom of the script:
weather_conky_launch_command="conky -b" {snip} pkill -CONT -xf "$weather_conky_launch_command"
Teo Teo Teo, it's me ... when do I ever run just ONE conky? HUH! HUH!
And that includes your 1_accu scripts as wellScheeeeech...
I'm going to have to chime in with the well-meant critique here.
I haven't needed to use this sort of hack for years now, and frankly I'm a little surprised you're still using it, TBG!
Are you running the script as a separate daemon that creates separate files, then adding hundreds of sed commands to the conky itself?
I find it much more efficient when the script itself generates conky output; my conky just contains this:
${execpi 777 scripts/itl.sh $CONFIG}${catp ./data/conkyoutput}
no need to start/stop the conky process, haven't ever seen incomplete output with this.
With all that said, consistency in development and community support is just as important as the code itself, and TBG has been great in that, so here's to another 10 years!
Happy Anniversary, Bigus Conky-Geekus!
Offline
Thanks ohnonot!
As for the conky ready files, I already do this for the hourly weather because otherwise people would need a very fast connection not to have an empty screen.
But doing it for everything else, I don't know, it would take away from the flexibility of the script's output.
This way one can have a data file and do whatever they want with it (ie. use whatever info they want, however they want), otherwise it would be very limiting imo.
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
EDIT @ S11: I am very lucky to be still alive with that bear and it's mother
It sounds funny now but it wasn't back then...
I can not tell a lie ... I two was concerned for my friend when I saw those. Now just a story for your younger family members when you are old and sitting in a rocking chair ...
Say did Uncle Teo ever tell you about the time there was a bear and her cub ...
G R O A N ! again with the bear story ...
Yup, sounds funny now.
Thanks ohnonot!
As for the conky ready files, I already do this for the hourly weather because otherwise people would need a very fast connection not to have an empty screen.
But doing it for everything else, I don't know, it would take away from the flexibility of the script's output.
This way one can have a data file and do whatever they want with it (ie. use whatever info they want, however they want), otherwise it would be very limiting imo.
I agree, I prefer the flexability. Not everyone wants the same conky, same font or maybe even the same screen sizes.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
I find it much more efficient when the script itself generates conky output; my conky just contains this:
${execpi 777 scripts/itl.sh $CONFIG}${catp ./data/conkyoutput}
no need to start/stop the conky process, haven't ever seen incomplete output with this.
You and Teo have given me the and idea.
Take MY conky layout make a file: Conky.TopBar.template
and have at it.... must try ...
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
I agree, I prefer the flexability. Not everyone wants the same conky, same font or maybe even the same screen sizes.
+1
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
And that's exactly why I have a 'few' laying around. ]:D ]:D
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Teo is conky-weather legendary. I don't use nowdays conky with weather rather than a simple line bar.
...But, I appreciate a lot his contribution, and I thank him for his time and sharing/updating the codes with the rest of us.
Be blessed!
Congratulations and the same words go for Sector11 aswell, You guys have been inspiration for me in time.
Best Regards!
Last edited by Nili (2019-05-24 13:24:19)
Tumbleweed | KDE Plasma
Offline
Nili - It has been a long time. I hope you are well. Always nice to see an old friend here.
Thank you for the kind words.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline