As shown in the above screenshot I have a couple of images in my conky but for some reason they seem to be under the lua background. How do I bring them to the front?
Last edited by Petro Dawg; December 30th, 2012 at 01:34 PM.
Who's Awesome? You're Awesome.
It's a COMPIZ thing.
You must take your background drawing function (draw_bg) from above the "TEXT" part (lua_draw_hook_pre) to inside of (below) "TEXT" part, as a first command (${lua} function).
That means modification of ~/.draw_bg.lua - post it here, along with current conkyrc.
Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | My Conky Pitstop corner | One4All project
I'm a conky newb, and I'm having trouble getting my conky to move down the desktop.
Code:################################## ## VinDSL | rev. 11-02-17 01:46 ## ################################## ## Screen res: 1280x1024x24 ## ################################## #### ## Prerequisites (required). ## conky-all 1.8.0 or 1.8.1 ## conkyForecast 2.16 ## weather.com XML Data Feed (XOAP) # #### ## Use XFT? Required to Force UTF8 (see below). # use_xft yes xftfont DroidSans:size=8.75 xftalpha 0.1 text_buffer_size 4096 #### ## Force UTF8? Requires XFT (see above). ## Displays degree symbol, instead of °, etc. # override_utf8_locale yes #### ## Daemonize Conky, aka 'fork to background'. # background yes #### ## Update interval in seconds. # update_interval 1.5 #### ## This is the number of times Conky will update before quitting. ## Set to zero to run forever. # total_run_times 0 #### ## Create own window instead of using desktop (required in nautilus)? # own_window yes own_window_argb_visual yes own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager #### ## Force images to redraw when they change. # imlib_cache_size 0 #### ## Use double buffering? Reduces flicker. # double_buffer yes #### ## Draw shades? # draw_shades no #### ## Draw outlines? # draw_outline no #### ## Draw borders around text? # draw_borders no #### ## Draw borders around graphs? # draw_graph_borders yes #### ## Print text to stdout? ## Print text in console? # out_to_ncurses no out_to_console no #### ## Text alignment. # alignment bottom_left #### ## Minimum size of text area. # minimum_size 0 0 #### ## Gap between text and screen borders. # gap_x 1050 gap_y -1000 #### ## Shorten MiB/GiB to M/G in stats. # short_units yes #### ## Pad % symbol spacing after numbers. # pad_percents 0 #### ## Pad spacing between text and borders. # border_inner_margin 4 #### ## Limit the length of names in "Top Processes". # top_name_width 10 #### ## Subtract file system -/+buffers/cache from used memory? ## Set to yes, to produce meaningful physical memory stats. # no_buffers yes #### ## Set to yes, if you want all text to be in UPPERCASE. # uppercase no #### ## Number of cpu samples to average. ## Set to 1 to disable averaging. # cpu_avg_samples 2 #### ## Number of net samples to average. ## Set to 1 to disable averaging. # net_avg_samples 2 #### ## Add spaces to keep things from moving around? ## Only affects certain objects. # use_spacer right #### ## My colors (suit yourself). # color0 White color1 Ivory color2 Ivory2 color3 Ivory3 color4 Tan1 color5 Tan2 color6 Gray color7 AntiqueWhite4 color8 DarkSlateGray color9 Black TEXT ############################## ## SYSTEM ## ############################## ${voffset -6}${font DroidSans:bold:size=8.25}${color4}SYSTEM${color8}${hr 2}${font} ${if_match ${execi 1700 aptitude search "~U" | wc -l | tail} == 0}${font DroidSansFallback:size=8.3}${color brown}No Updates ${else}${font DroidSansFallback:size=8.3}${color white}${execi 1700 aptitude search "~U" | wc -l | tail}${color light blue} New Updates ${font}${endif}${font DroidSans:size=8.65}${goto 119}${color brown}Mint Version:${color4} ${pre_exec lsb_release -r -s}${goto 244}${color brown}Uptime: $uptime ${voffset -18} ################## ## PROCESSORS ## ################## ${voffset -9}${font DroidSans:bold:size=8}${color4}PROCESSORS${offset 8}${color8}${voffset -2}${hr 2}${font} ${font DroidSans:size=8.65}${color royal blue}${offset 5}Intel Core 2 Duo${alignr}${font DroidSans:size=8.3}${freq_g cpu0}${offset 1}GHz${font} ${font DroidSansFallback:size=8.39}${offset 2}${freq}MHz Load: ${loadavg} ${font DroidSansFallback:size=8.39}${offset 2}CPU1${offset 5}${font DroidSans:size=8.3}${alignr}${cpu cpu1}%${font} ${font DroidSansFallback:size=8.39}${offset 2}CPU2${offset 5}${font DroidSans:size=8.3}${alignr}${cpu cpu2}%${font} ${voffset -4}${cpugraph cpu1 555753 FF5721} ${voffset -14}${cpugraph cpu2 555753 EE9572} ${voffset -7}NAME${alignr 9}PID CPU% MEM% ${top name 1}${alignr 9}${top pid 1} ${top cpu 1} ${top mem 1} ${top name 2}${alignr 9}${top pid 2} ${top cpu 2} ${top mem 2} ${top name 3}${alignr 9}${top pid 3} ${top cpu 3} ${top mem 3} ${top name 4}${alignr 9}${top pid 4} ${top cpu 4} ${top mem 4} ################## ## MEMORY ## ################## ${font DroidSans:bold:size=8}${color4}MEMORY${offset 8}${color8}${voffset -2}${hr 2}${font} ${color red}Ram Used: ${mem} ${alignr}(${memperc}%) Ram Total: ${memmax} | Ram Cached: ${cached} | Ram Buffered: ${buffers} Ram Free: ${memfree} Swap: ${swap}/ ${swapmax} ${alignr}(${swapperc}%) ${voffset -7}NAME${alignr 9}PID CPU% MEM% ${top_mem name 1}${alignr 9}${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1} ${top_mem name 2}${alignr 9}${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2} ${top_mem name 3}${alignr 9}${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3} ${top_mem name 4}${alignr 9}${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4} ################## ## HDD ## ################## ${font DroidSans:bold:size=8}${color4}HDD${offset 8}${color8}${voffset -2}${hr 2}${font} ${voffset 5}${color light blue}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}ROOT: ${font DroidSans:size=8.3}${color pink}${fs_used /}${color light blue}/${fs_size /}/${color white}${fs_free /}${alignr}${color light blue}${fs_used_perc /}%${font} ${if_match ${exec ls /media | grep -c "Videos"} == 1}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}Videos: ${font DroidSans:size=8.3} ${color pink}${fs_used /media/Videos}${color light blue}/${fs_size /media/Videos}/${color white}${fs_free /media/Videos}${alignr}${color light blue}${fs_used_perc /media/Videos}%${font}${else}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color dark red}Videos: ${font DroidSans:size=6.4}${color red} NOT CONNECTED ${alignr}${fs_used_perc /media/Videos}%${font}${endif} ${if_match ${exec ls /media | grep -c "indata"} == 1}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color light blue}indata: ${font DroidSans:size=8.3} ${color pink}${fs_used /media/indata}${color light blue}/${fs_size /media/indata}/${color white}${fs_free /media/indata}${alignr}${color light blue}${fs_used_perc /media/indata}%${font}${else}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color dark red}indata: ${font DroidSans:size=6.4}${color red} NOT CONNECTED ${alignr}${fs_used_perc /media/indata}%${font}${endif} ${if_match ${exec ls /media | grep -c "Internal Data"} == 1}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color light blue}Internal Data: ${font DroidSans:size=8.3} ${color pink}${fs_used /media/Internal Data}${color light blue}/${fs_size /media/Internal Data}/${color white}${fs_free /media/Internal Data}${alignr}${color light blue}${fs_used_perc /media/Internal Data}%${font}${else}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color dark red}Internal Data: ${font DroidSans:size=6.4}${color red} NOT CONNECTED ${alignr}${fs_used_perc /media/Internal Data}%${font}${endif} ${if_match ${exec ls /media | grep -c "Ext Backup1"} == 1}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color light blue}Ext Backup1: ${font DroidSans:size=8.3} ${color pink}${fs_used /media/Ext Backup1}${color light blue}/${fs_size /media/Ext Backup1}/${color white}${fs_free /media/Ext Backup1}${alignr}${color light blue}${fs_used_perc /media/Ext Backup1}%${font}${else}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color dark red}Ext Backup1: ${font DroidSans:size=6.4}${color red} NOT CONNECTED ${alignr}${fs_used_perc /media/Ext Backup1}%${font}${endif} ${if_mounted /media/C1A1-1AEC}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color light blue}HTC Legend: ${font DroidSans:size=8.3} ${color pink}${fs_used /media/C1A1-1AEC}${color light blue}/${fs_size /media/C1A1-1AEC}/${color white}${fs_free /media/C1A1-1AEC}${alignr}${color light blue}${fs_used_perc /media/C1A1-1AEC}%${font}${else}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color dark red}HTC Legend: ${font DroidSans:size=6.4}${color red} NOT CONNECTED ${alignr}${font DroidSans:size=8.3}${voffset -2}${fs_used_perc /media/C1A1-1AEC}%${font}${endif} ${if_mounted /media/CORSAIR}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color light blue}Thumb Drive1: ${font DroidSans:size=8.3} ${color pink}${fs_used /media/CORSAIR}${color light blue}/${fs_size /media/CORSAIR}/${color white}${fs_free /media/CORSAIR}${alignr}${color light blue}${fs_used_perc /media/CORSAIR}%${font}${else}${voffset 5}${voffset -2}${font DroidSansFallback:size=8.3}${offset 4}${color dark red}Thumb Drive1: ${font DroidSans:size=6.4}${color red} NOT CONNECTED ${alignr}${font DroidSans:size=8.3}${voffset -2}${fs_used_perc /media/CORSAIR}%${font}${endif} ${voffset -4}${color light blue}${diskiograph 555753 AA5303} ################# ## GMAIL ## ################## ${voffset -7}${font DroidSans:bold:size=8}${color4}GMAIL${offset 8}${color8}${voffset -2}${hr 2}${font} You have ${color yellow}${texeci 60 perl ~/scripts/gmail.pl n} ${color}new email messages. ${execi 30 perl ~/scripts/gmail.pl s}
Last edited by Arminius; December 30th, 2012 at 05:57 PM.
Not sure what you mean by move down, but you have some really large values for your gaps.Code:#### ## Gap between text and screen borders. # gap_x 1050 gap_y -1000
Perhaps you can give a screen shot so we can see what is going on.
Personally I use gaps of this size:
and then move it to the proper spot usingCode:gap_x 12 gap_y 10
for exampleCode:alignment bottom_right
Who's Awesome? You're Awesome.
OK, just so you know I am using Gnome Shell, lua & conkyrc below:
Lua:
Conky RC:Code:--[[ Background by londonali1010 (2009) VinDSL Background Hack (2010-2011) This script draws a background to the Conky window. It covers the whole of the Conky window, but you can specify rounded corners, if you wish. To call this script in Conky, use (assuming you have saved this script to ~/scripts/): lua_load ~/scripts/draw_bg.lua lua_draw_hook_pre draw_bg Changelog: + v3.1 VinDSL Hack (12.01.2011) Added more shading example(s). + v3.0 VinDSL Hack (01.28.2011) Killed memory leak. + v2.4 VinDSL Hack (01.25.2011) Declared all variables in local. + v2.3 VinDSL Hack (12.31.2010) Added shading example(s). + v2.2 VinDSL Hack (12.30.2010) Cleaned up the code a bit. + v2.1 VinDSL Hack (12.24.2010) Added cairo destroy function(s). + v2.0 VinDSL Hack (12.21.2010) Added height adjustment variable. + v1.0 Original release (07.10.2009) ]] --------------START OF PARAMETERS ------------ -- Change these settings to affect your background: -- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0. local corner_r = 13 -- Set the colour and transparency (alpha) of your background (0.00 - 0.99). -- (Light Shading Example) -- local bg_colour = 0x4d4d4d -- local bg_alpha = 0.01 -- (Medium Shading Example) -- local bg_colour = 0x222222 -- local bg_alpha = 0.08 -- (Dark Shading Example) local bg_colour = 0x000000 local bg_alpha = 0.45 -- (Brown Shading Example) -- local bg_colour = 0x330000 -- local bg_alpha = 0.15 -- (Ivory Black Shading Example) -- local bg_colour = 0x292421 -- local bg_alpha = 0.05 -- (Metallic Gold Shading Example) -- local bg_colour = 0xd4af37 -- local bg_alpha = 0.01 -- (Navy Blue Shading Example) -- local bg_colour = 0x33339F -- local bg_alpha = 0.11 -- (Olive Green Shading Example) -- local bg_colour = 0x333319 -- local bg_alpha = 0.08 -- (Silver Shading Example) -- local bg_colour = 0xc0c0c0 -- local bg_alpha = 0.01 -- Tweaks the height of your background, in pixels. If you don't need to adjust the height, use 0. -- (Default Setting) -- local vindsl_hack_height = 0 local vindsl_hack_height = 0 ---------------END OF PARAMETERS ------------- require 'cairo' local cs, cr = nil local function rgb_to_r_g_b(colour,alpha) return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha end function conky_draw_bg() if conky_window == nil then return end if cs == nil then cairo_surface_destroy(cs) end if cr == nil then cairo_destroy(cr) end local w = conky_window.width local h = conky_window.height local v = vindsl_hack_height local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height) local cr = cairo_create(cs) cairo_move_to(cr,corner_r,0) cairo_line_to(cr,w-corner_r,0) cairo_curve_to(cr,w,0,w,0,w,corner_r) cairo_line_to(cr,w,h+v-corner_r) cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v) cairo_line_to(cr,corner_r,h+v) cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r) cairo_line_to(cr,0,corner_r) cairo_curve_to(cr,0,0,0,0,corner_r,0) cairo_close_path(cr) cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha)) cairo_fill(cr) cairo_surface_destroy(cs) cairo_destroy(cr) end
Code:# Use Xft? use_xft yes xftfont AvantGarde LT ExtraLight:size=8 xftalpha 0.8 text_buffer_size 2048 # Update interval in seconds update_interval 1 # This is the number of times Conky will update before quitting. # Set to zero to run forever. total_run_times 0 # Create own window instead of using desktop (required in nautilus) own_window yes own_window_transparent yes own_window_type normal own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # Minimum size of text area minimum_size 182 0 maximum_width 202 # Draw shades? draw_shades no default_color ffffff #4D4D4D # Draw outlines? draw_outline no # Draw borders around text draw_borders no # Stippled borders? stippled_borders 0 # border margins border_margin 5 draw_graph_borders no # border width border_width 0 # Text alignment, other possible values are commented #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right # Gap between borders of screen and text # same thing as passing -x at command line gap_x 25 gap_y 40 # Distric-Thin fonts # Blue Highway # Raleway # Zekton # Calibri # Engebrechtre # Opeln2001 # AvantGarde LT ExtraLight # AvantGarde LT ExtraLight # -- Lua Load -- # lua_load ~/.draw_bg.lua lua_draw_hook_pre draw_bg imlib_cache_size 0 TEXT ${alignc}${image ~/.conky/logo.png -p 44,20 160x160} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}${color #ffffff}______________________________ ${font AvantGarde LT ExtraLight:pixelsize=130}${alignc}${time %H}${font} ${font AvantGarde LT ExtraLight:pixelsize=130}${alignc}${color #FBAA35}${time %M}${font} ${voffset 30}${font AvantGarde LT ExtraLight:pixelsize=40}${alignc}${color #ffffff}${time %b %Y}${font} ${voffset 15}${font AvantGarde LT ExtraLight:pixelsize=25}${alignc}${color #ffffff}${time %A %d} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}______________________________ ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}DETAILS ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}USER: ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}${nodename} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}DISTRO: ${pre_exec cat /etc/issue.net} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}KERNEL: ${kernel} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}ARCH: $machine ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}UPTIME: $uptime ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}______________________________ ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}SYSTEM ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}CPU1: ${cpu cpu0}% | CPU2: ${cpu cpu1}% ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}CPU3: ${cpu cpu2}% | CPU4: ${cpu cpu3}% ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}RAM: ${mem} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}PROCESSES: $processes ($running_processes running) ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}______________________________ ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}TEMP ${font AvantGarde LT ExtraLight:pixelsize=10}${color #ffffff}CPU TEMP0: ${alignr}${execp sensors coretemp-isa-0000 | grep 'Core 0' | cut -c16-17} ${color #FBAA35}°C${color #ffffff} / ${color #ffffff}105${color #FBAA35} °C$color ${font AvantGarde LT ExtraLight:pixelsize=10}${color #ffffff}CPU TEMP1: ${alignr}${execp sensors coretemp-isa-0000 | grep 'Core 2' | cut -c16-17} ${color #FBAA35}°C${color #ffffff} / ${color #ffffff}105${color #FBAA35} °C$color ${font AvantGarde LT ExtraLight:pixelsize=10}${color #ffffff}MOTHERBD TEMP: ${alignr}${exec sensors it8721-isa-0a10 | grep 'temp1' | cut -c16-17} ${color #FBAA35}°C${color #ffffff} / ${color #ffffff}80${color #FBAA35} °C$color ${font AvantGarde LT ExtraLight:pixelsize=10}${color #ffffff}HD-DISK TEMP:${alignr}${exec hddtemp /dev/sda -n --unit=C}${color #FBAA35} °C${color #ffffff} / ${color #ffffff}70${color #FBAA35} °C$color ${font AvantGarde LT ExtraLight:pixelsize=10}${color #ffffff}TEMP2: ${alignr}${exec sensors it8721-isa-0a10 | grep 'temp2' | cut -c16-17} ${color #FBAA35}°C${color #ffffff} / ${color #ffffff}127${color #FBAA35} °C$color ${font AvantGarde LT ExtraLight:pixelsize=10}${color #ffffff}TEMP3: ${alignr}${exec sensors it8721-isa-0a10 | grep 'temp3' | cut -c16-17} ${color #FBAA35}°C${color #ffffff} / ${color #ffffff}127${color #FBAA35} °C$color ${font AvantGarde LT ExtraLight:pixelsize=10}${color #ffffff}FAN: ${alignr}${exec sensors it8721-isa-0a10 | grep 'fan1' | cut -c12-18}${font}${color #FBAA35} RPM${font} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}${color #ffffff}______________________________ ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}${color #ffffff}DATA ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}${color #ffffff}Dl: ${downspeed eth0} kb/s ${downspeedgraph eth0 4,80 000000 000000} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}${color #ffffff}Ul: ${upspeed eth0} kb/s ${upspeedgraph eth0 4,80 000000 000000} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}${color #ffffff}TOTAL DL ${totaldown eth0} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}${color #ffffff}TOTAL UL ${totalup eth0} ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}${color #ffffff}______________________________ ${font AvantGarde LT ExtraLight:pixelsize=10}${alignc}NOW PLAYING ${if_running audacious}${execpi 3 ~/.conky/shell-scripts/audacious-info.sh} ${image ~/.conky/img.png -p ,4 -s 112x114}${endif}
what if GS is as buggy as COMPIZ, impossible?
I'm posting relevant part only.
LUA
conkyrcCode:cairo_surface_destroy(cs) cairo_destroy(cr) return "" end
check it out.Code:# -- Lua Load -- # lua_load ~/.draw_bg.lua # lua_draw_hook_pre draw_bg imlib_cache_size 0 TEXT ${lua conky_draw_bg} ${alignc}${image ~/.conky/logo.png -p 44,20 160x160}
Last edited by dk75; December 31st, 2012 at 11:04 AM. Reason: forgot about RETURN code for LUA
Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | My Conky Pitstop corner | One4All project
Intel ® P4 Extreme Edition 3.4 (Gallatin) || DFI ® LanParty PRO875B rev B1
Crucial ® Ballistix Tracer PC4000 1GB || Mountain Mods U2-UFO Opti-1203
XFX 7600GT 560M AGP (PV-T73A-UDF3) || Corsair HX520W Modular PSU
Bookmarks