Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 48

Thread: Easy configuring conky with conkyconf

  1. #21

    Default Re: Easy configuring conky with conkyconf

    Quote Originally Posted by please_try_again View Post
    The first error looks like a bug in the lua script. I was able to reproduce it with your .conkyrc. Will try to fix it.
    Hmmm .No, it's another error. Actually your forecast works OK for me. (?)

  2. #22

    Default Re: Easy configuring conky with conkyconf

    what's the output of this command:

    Code:
    $ conkyweather forecast cabc0054 60 /home/saultdon /usr/share/conkyweather/images

    This is what I get (just changing the home directory):

    Code:
    Tomorrow,Friday,Saturday 
    Sunny,Sunny,Sunny
    24 C/7 C,22 C/11 C,25 C/9 C
    And you should have the file /home/saultdon/weatherdata_cabc0054.xml which gets updated after 60 minutes.

  3. #23

    Default Re: Easy configuring conky with conkyconf

    If you look at the function conky_forecast in /etc/conky/conky.lua, here's the line where the error occurs:

    Code:
    function conky_forecast (location,update,datadir,iconpath, unit)
    	local t = ""
    	local x = -116
    	local w = ""
    	local file
    	local l = assert(io.popen("conkyweather forecast " .. location .. " " .. update .. " " .. datadir))
    	day = {}
     	for s in l:lines() do table.insert(day, s) end
    	l:close()
    	d = {} ; for i in string.gmatch(day[1],"%a+") do table.insert(d, i) end
    	e = {} ; for i in string.gmatch(day[2],"%a+") do table.insert(e, i) end
    	print(day[2])
    	f = {} ; for i in string.gmatch(day[3],"[%w /]+") do table.insert(f, i) end
    	u = string.format("${voffset 3}${offset 12}${color aaaaaa}%s${goto 135}%s${goto 250}%s", d[1], d[2], d[3])
    	fsize = getfsize()
    	if fsize > 8 then y = 109 else y = 100 end
    	k = y + 35
    	for i,icon in ipairs (e) do
    		icon = string.lower(icon) .. '.png' ; baseicon = icon
    		x = x + 116
    		icon = iconpath .. "/" .. icon
    		file = io.open(icon)
    		if file then file:close() else icon = iconpath .. "/" .. weatherIcon(baseicon) end
    		w = w .. string.format("${if_existing %s}${if_running plasma-desktop}${image %s -p %d,%d -s 80x48}${else}${image %s -p %d,%d -s 80x48}${endif}${endif}", icon, icon, x, k, icon, x, y)
     	end
    	w = w .. "${voffset 40}"
    	g = {}
    	for i,temp in ipairs (f) do
    		high = temp:gsub("(%d*) .*", "%1")	
    		low  = temp:gsub(".*\/(%d*) .*", "%1")	
    		if unit:match("F") then
    			high = string.format("%s%sF", toFahrenheit(high), BUL)
    			low = string.format("%s%sF", toFahrenheit(low), BUL)
    		else
    			high = string.format("%s%sC", high, BUL)
    			low = string.format("%s%sC", low, BUL)
    		end
    		temp = string.format("%s/%s", high, low)
    		table.insert(g, temp)
    	end
    	z = string.format("${offset 12}${color aaaaaa}%s${goto 130}%s${goto 240}%s", g[1], g[2], g[3])
    	t = u .. '\n\n' .. w .. z
    	return t 
    end
    So add
    Code:
    print(day[2])
    below this line, run conky from the command line and watch the output. You should see something like that:


    Code:
    Conky: desktop window (2600700) is subwindow of root window (b2)
    Conky: window type - normal
    Conky: drawing to created window (0x4200001)
    Conky: drawing to double buffer
    Sunny,Sunny,Sunny
    Sunny,Sunny,Sunny
    Sunny,Sunny,Sunny
    Sunny,Sunny,Sunny
    ....

  4. #24
    Join Date
    Jan 2012
    Location
    BC
    Posts
    178

    Default Re: Easy configuring conky with conkyconf

    Quote Originally Posted by please_try_again View Post
    Sounds good. But looking at your .conkyrc, I noticed that option -N had no effect. It should have written something like this:


    Code:
    ${if_match "${nvidia temp}" != "N/A"}${voffset 3}${color1}Nvidia Gfx card ${color2}${hr}
    ${color0}GPU Frequency:${color8}${goto 110}${nvidia gpufreq} Mhz ${lua_parse gputemp temp}
    ${color0}Mem Frequency:${color8}${goto 110}${nvidia memfreq} Mhz${goto 165}${color0}Image quality:${color8}${alignr}${nvidia imagequality}${else}${voffset -15}${endif}
    Thus it makes me wonder if you are using the nvidia proprietary driver, if the module is loaded and if the conky version you're using has nvidia support. It's not related with the other issues though. Did you install conky from my repo?
    I was wondering why I couldn't see any NVIDIA stuff:

    Code:
    saultdon@d830-opensuse:~> conky -v
    Conky 1.8.1 compiled Mon Jul 16 19:28:57 UTC 2012 for Linux 2.6.37.6-0.11-xen (x86_64)
    
    
    Compiled in features:
    
    
    System config file: /etc/conky/conky.conf
    Package library path: /usr/lib64/conky
    
    
     X11:
      * Xdamage extension
      * XDBE (double buffer extension)
      * Xft
      * ARGB visual
    
    
     Music detection:
      * MPD
      * MOC
    
    
     General:
      * math
      * hddtemp
      * portmon
      * Curl
      * RSS
      * wireless
      * eve-online
      * config-output
      * Imlib2
      * apcupsd
      * iostats
      * ncurses
      * Lua
    
    
      Lua bindings:
       * Cairo
       * Imlib2
    saultdon@d830-opensuse:~> zypper se -s -i conky
    Loading repository data...
    Reading installed packages...
    
    
    S | Name         | Type    | Version     | Arch   | Repository           
    --+--------------+---------+-------------+--------+----------------------
    i | conky        | package | 1.8.1-5.1.2 | x86_64 | openSUSE-12.2-Oss    
    i | conkyconf    | package | 4.0-16.1    | noarch | home:please_try_again
    i | conkyweather | package | 1.0-22.1    | noarch | home:please_try_again
    Looks like I don't have the one from your repo because it isn't in your 12.2 repo yet =) I installed the 1.9 conky package from your 12.1 repo on my 12.2 PC and reran the conkyconf and now I can see the nvidia info.

    Now I get this error: Conky: Unable to load image '/usr/share/conkyweather/images/ but that folder exists and is full of images.

  5. #25
    Join Date
    Jan 2012
    Location
    BC
    Posts
    178

    Default Re: Easy configuring conky with conkyconf

    Quote Originally Posted by please_try_again View Post
    what's the output of this command:

    Code:
    $ conkyweather forecast cabc0054 60 /home/saultdon /usr/share/conkyweather/images

    This is what I get (just changing the home directory):

    Code:
    Tomorrow,Friday,Saturday 
    Sunny,Sunny,Sunny
    24 C/7 C,22 C/11 C,25 C/9 C
    And you should have the file /home/saultdon/weatherdata_cabc0054.xml which gets updated after 60 minutes.
    Code:
    saultdon@d830-opensuse:~> conkyweather forecast cabc0054 60 /home/saultdon /usr/share/conkyweather/images
    Error: xsltrpoc not found
    So it looks like something is missing from my end and zypper can't find a package called xsltrpoc.
    I also can't see that xml file in my home dir.

  6. #26
    Join Date
    Jan 2012
    Location
    BC
    Posts
    178

    Default Re: Easy configuring conky with conkyconf

    Quote Originally Posted by please_try_again View Post
    So add
    Code:
    print(day[2])
    below this line, run conky from the command line and watch the output. You should see something like that:


    Code:
    Conky: desktop window (2600700) is subwindow of root window (b2)
    Conky: window type - normal
    Conky: drawing to created window (0x4200001)
    Conky: drawing to double buffer
    Sunny,Sunny,Sunny
    Sunny,Sunny,Sunny
    Sunny,Sunny,Sunny
    Sunny,Sunny,Sunny
    ....
    I added that line, but because of the error in my last post about the conkyweather Error It didn't have much of a change:

    Code:
    saultdon@d830-opensuse:~> conky&[1] 9609
    saultdon@d830-opensuse:~> Conky: forked to background, pid is 9612
    
    
    Conky: desktop window (2200209) is subwindow of root window (257)
    Conky: window type - normal
    Conky: drawing to created window (0x1800002)
    Conky: drawing to double buffer
    Conky: llua_do_call: function conky_forecast execution failed: /etc/conky/conky.lua:594: bad argument #1 to 'gmatch' (string expected, got nil)
    Conky: Unable to load image '/usr/share/conkyweather/images/'
    I'm beginning to think that this whole error is because of whatever I am missing in my system when I ran that conkyweather command.

  7. #27

    Default Re: Easy configuring conky with conkyconf

    Quote Originally Posted by saultdon View Post
    Code:
    saultdon@d830-opensuse:~> conkyweather forecast cabc0054 60 /home/saultdon /usr/share/conkyweather/images
    Error: xsltrpoc not found
    So it looks like something is missing from my end and zypper can't find a package called xsltrpoc.
    I also can't see that xml file in my home dir.
    OK. We have the answer. xsltproc is needed to format the xml file with the 2 xslt styles weather.xslt and forecast.xslt (located in /usr/share/conkyweather). It is a dependency of the conkyweather package. Thus the spec file of the rpm contains this:


    Code:
    %if 0%{?suse_version}
    Group: 		System/Monitoring
    Requires:	libxslt1
    %endif
    It obviously couldn't install libxslt1 under 12.2, because this package is either not available or has another name. However I wonder why conkyweather built successfully in OBS. .... Hmmm.... maybe libxslt1 is there but doesn't include xsltproc anymore. That would be a possible explanation.

    You don't have the xml file because conkyweather looks for xsltproc first and abort the script if it doesn't find it. Thus it doesn't download the RSS feed.

    Code:
    # we need xsltproc
    which xsltproc &>/dev/null || exec echo "Error: xsltrpoc not found"
    We need to know which package contains xsltproc under 12.2, and if it's not available, I will have to build a package for 12.2 (or use another XSLT processor).

  8. #28

    Default Re: Easy configuring conky with conkyconf

    But I should also catch this error in conky.lua. Thus there is also a bug there. Or I could just let conkyconf check if xsltproc is present beore writing these lines in .conkyrc:

    Code:
    ${lua_parse weather cabc0054 60 /home/saultdon /usr/share/conkyweather/images C}
    ${lua_parse forecast cabc0054 60 /home/saultdon /usr/share/conkyweather/images C}

  9. #29
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: Easy configuring conky with conkyconf

    Am 06.09.2012 15:06, schrieb please try again:
    > We need to know which package contains xsltproc under 12.2


    it is in libxslt-tools in 12.2

    --
    PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
    ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
    eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

  10. #30

    Default Re: Easy configuring conky with conkyconf

    Thanks, Martin.

    rebuilding with:

    Code:
    %if 0%{?suse_version}
    Group: 		System/Monitoring
    %if 0%{?suse_version} >=1220
    Requires:	libxslt-tools
    %else
    Requires:	libxslt1
    %endif
    %endif
    @saultdon,
    Updating conkyweather should fix the issue by installing libxslt-tools this time. Don't forget to back up your /etc/conky/conky.lua!

    Thank you for your feedback.

Page 3 of 5 FirstFirst 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •