Conky Helps and Stuff

Message
Author
male

Re: Conky Helps and Stuff

#281 Post 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
Last edited by male on Mon Jan 07, 2019 9:45 am, edited 1 time in total.

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 1:21 am

Re: Conky Helps and Stuff

#282 Post 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}
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

User avatar
Jerry3904
Administrator
Posts: 21942
Joined: Wed Jul 19, 2006 6:13 am

Re: Conky Helps and Stuff

#283 Post by Jerry3904 »

That's excellent, thanks!
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 1:21 am

Re: Conky Helps and Stuff

#284 Post 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}
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

User avatar
asqwerth
Developer
Posts: 7231
Joined: Sun May 27, 2007 5:37 am

Re: Conky Helps and Stuff

#285 Post 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.
You do not have the required permissions to view the files attached to this post.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

male

Re: Conky Helps and Stuff

#286 Post by male »

There's no problem with that here. All three wind symbols are displayed. ;)
You do not have the required permissions to view the files attached to this post.

User avatar
asqwerth
Developer
Posts: 7231
Joined: Sun May 27, 2007 5:37 am

Re: Conky Helps and Stuff

#287 Post by asqwerth »

Male, could you test Eadwine_weather?

It was running it that removed the wind compass on my square weather conky.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

male

Re: Conky Helps and Stuff

#288 Post by male »

That's what I did and said.

User avatar
asqwerth
Developer
Posts: 7231
Joined: Sun May 27, 2007 5:37 am

Re: Conky Helps and Stuff

#289 Post 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.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

male

Re: Conky Helps and Stuff

#290 Post 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:

Post Reply

Return to “Software / Configuration”