Page 29 of 35

Re: Conky Helps and Stuff

Posted: Sat Jan 05, 2019 9:15 am
by male
smilliken wrote:Where in this thread is the script for this conky? This looks awesome.

Thanks in advance,

Scott
sometimes I look for myself dead... :happy:
That should be it.

Edit 2019-01-07: for a given reason, once again the procedure ;)

You need to unpack/install:
-- Teo's Accuweather - 1_2018-10-1 and read the README !
-- the package lynx
-- this Lua script image.lua

note: look at the paths in the conkyrc!

image.lua

Code: Select all

--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

Re: Conky Helps and Stuff

Posted: Sat Jan 05, 2019 9:37 am
by KoO
male wrote: Fri Jan 04, 2019 12:50 pm
KoO wrote: (Just one thing I would like to have either Ethernet or Wifi displaying which one is being used at the time but not both...just can't the get ( if ) (end) (ifconfig) commands worked out.Any help with this would be welcome..)
above TEXT

Code: Select all

if_up_strictness address
underneath TEXT
example

Code: Select all

${if_up eth0}${voffset -10}${font Open Sans:bold:size=8.5}Ethernet $font$alignr ${addr eth0}
↑ ${upspeedf eth0} kb/s $alignr ${totalup eth0}
${voffset -14}$alignc${upspeedgraph eth0 10,120  ff0000 0000ff}
↓ ${downspeedf eth0} kb/s $alignr ${totaldown eth0}
${voffset -14}$alignc${downspeedgraph eth0 10,120  ff0000 0000ff}${endif}

${if_up wlan0}${voffset -10}${font Open Sans:bold:size=8.5}WiFi $font${wireless_bitrate wlan0} $alignr ${addr wlan0}
${voffset -14}$alignc${wireless_essid wlan0}
$alignc${color2}${wireless_link_bar 4,260 wlan0}${color E9E9E9} 
↑ ${upspeedf wlan0} kb/s $alignr ${totalup wlan0}
${voffset -14}$alignc${upspeedgraph wlan0 10,120 ff0000 0000ff}
↓ ${downspeedf wlan0} kb/s $alignr ${totaldown wlan0}
${voffset -14}$alignc${downspeedgraph wlan0 10,120 ff0000 0000ff}${endif}
Thanks for your help male will jump on MX an run code.
Jerry3904 wrote: Fri Jan 04, 2019 1:01 pm Yeah, that is already being used in some of the conkies--see, for instance, MX-MyConky. We have been slowly going through the MX conkies, making changes like this where appropriate; see the GitHub repo mx-conky-data for recent changes that have not been packaged yet.

Anyone interested in improving the conky collection should use GitHub so that versioning and tracking become much easier.
Thanks for the link jerry3904 will upload.. And have added OS $alignr${exec cat 30 /etc/mx-version}

Re: Conky Helps and Stuff

Posted: Sat Jan 05, 2019 10:05 am
by Jerry3904
That's excellent, thanks!

Re: Conky Helps and Stuff

Posted: Sun Jan 06, 2019 1:54 am
by KoO
@ male
Thanks again for your help I just used my code an add [${if_up eth0} , ${endif} ${if_up wlan0} ${endif}] and above TEXT if_up_strictness address as you can see from below Works A Treat :clap:

Image


Code: Select all

# NETWORK
${if_up eth0}${font Open Sans:Bold:size=10}${color0}NETWORK ${color1}${hr 2}
${color}${font Open Sans:bold:size=8.5}Ethernet ${font}${alignr}${addr eth0}
↑ ${upspeed eth0}  ${alignr} ${totalup eth0}
${voffset -14}${alignc}${upspeedgraph eth0 10,120  ff0000 0000ff}
↓ ${downspeed eth0}  $alignr ${totaldown eth0}
${voffset -14}${alignc}${downspeedgraph eth0 10,120  ff0000 0000ff}${endif}

${if_up wlan0}${font Open Sans:bold:size=10}${color0}WiFi $font${wireless_bitrate wlan0} ${color}${font}${alignr}${addr wlan0}
${color2}${wireless_link_bar 6 wlan0} ${color}
↑ ${upspeed wlan0}  $alignr ${totalup wlan0}
${voffset -14}$alignc${upspeedgraph wlan0 10,120 ff0000 0000ff}
↓ ${downspeed wlan0}  $alignr ${totaldown wlan0}
${voffset -14}$alignc${downspeedgraph wlan0 10,120 ff0000 0000ff}${endif}

Re: Conky Helps and Stuff

Posted: Mon Jan 07, 2019 1:35 pm
by asqwerth
male wrote: Sat Jan 05, 2019 9:15 am sometimes I look for myself dead... :happy:
That should be it.

[snip]
@male, has something happened to ConkyWindNESW.otf font or the way that accuweather script lists the wind direction info?

Yesterday I tried running the 3 conkys in your above link (yes, TBG's accuweather script has been updated and lynx installed) while booted into MX15/16 and all ran well except eadwine_weather which uses the conkywindnesw font. The wind direction compass and arrow did not appear.

I thought maybe something was wrong with MX15/16, so I booted into Manjaro. Currently in Manjaro I'm running the small square weather conky you posted some time ago, together with another conky. Upon bootup, yup, the wind direction compass/arrow was present.

I then changed the other conky to eadwine_weather. When I killed conky and re-started both conkies, the wind compass and arrow disappeared from the square conky when previously it worked. Of course it never showed up in eadwine_weather.

This is what the square conky looks like today:

smallsquareconky-jan2019.png
The wind compass used to be on the right side. It's now missing.

Re: Conky Helps and Stuff

Posted: Mon Jan 07, 2019 3:50 pm
by male
There's no problem with that here. All three wind symbols are displayed. ;)

Re: Conky Helps and Stuff

Posted: Mon Jan 07, 2019 4:27 pm
by asqwerth
Male, could you test Eadwine_weather?

It was running it that removed the wind compass on my square weather conky.

Re: Conky Helps and Stuff

Posted: Mon Jan 07, 2019 5:18 pm
by male
That's what I did and said.

Re: Conky Helps and Stuff

Posted: Tue Jan 08, 2019 2:15 am
by asqwerth
male wrote: Mon Jan 07, 2019 5:18 pm That's what I did and said.
Discovered the problem. I was using a very localised URL address for the area that I live in accuweather script, and somehow that no longer generates line 27p in the curr_cond file for the conkywind font (even though I see the wind direction and the wind code number on the Accuweather webpage).

I had to use the main URL address for my city (which means the weather is more generalised) before the wind direction number in 27p was generated again.

Re: Conky Helps and Stuff

Posted: Tue Jan 08, 2019 4:58 am
by male
asqwerth wrote:(even though I see the wind direction and the wind code number on the Accuweather webpage).

I had to use the main URL address for my city (which means the weather is more generalised) before the wind direction number in 27p was generated again.
Don't let Teo hear that explanation... :lipsrsealed: