You are not logged in.

#2401 2019-04-04 14:51:53

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

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

here page 95 post 2363

conky , script.sh & link to images pack

https://forums.bunsenlabs.org/viewtopic … 685#p84685

Last edited by loutch (2019-04-04 14:52:44)


Linuxmint 19.1 Tessa cinnamon on ssd hp pavilion g7
Xubuntu 18.10 xfce on ASUS Rog STRIX
tanks to  http://www.stci.qc.ca/affiche_smilies.php for the smileys

Offline

#2402 2019-04-06 16:25:54

chepioq
Member
Registered: 2015-11-29
Posts: 63

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

Thank loutch, but I can see in your conky:
......................
lua_load = '~/.conky/lua/image.lua',
..........................
..........................
${lua fDrawImage ~/.conky/barographe/base.png 66 18 228 97}
${lua fDrawImage ~/.conky/barographe/white.png 74 114 214 12}

what is the script "image.lua"

Offline

#2403 2019-04-06 18:50:42

unklar
Member
Registered: 2015-10-31
Posts: 831

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

smile   image.lua   smile

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

#2404 2019-04-07 11:02:30

chepioq
Member
Registered: 2015-11-29
Posts: 63

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

Thank unklar, now all work fine.

Offline

Board footer

Powered by FluxBB