Page 1267 of 2310 FirstFirst ... 2677671167121712571265126612671268126912771317136717672267 ... LastLast
Results 12,661 to 12,670 of 23097

Thread: Post your .conkyrc files w/ screenshots

  1. #12661
    Join Date
    Aug 2009
    Location
    East of Atlantic
    Beans
    81
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Excedio View Post
    Yea... I should probably stay out of here. I have no clue obviously
    Hi, Conky is not always where you expect it !
    Here is another capture, it is a conky for cpu, wifi speed and signal and so on :

    Enjoy and stay with us !

  2. #12662
    Join Date
    Oct 2009
    Beans
    10

    Re: Post your .conkyrc files w/ screenshots

    Hi all, I was wondering if someone could help me out with a couple of little problems I've been having.

    My first question is how do I stop Conky from drawing the border outline of the entire window? Also, I attempted to change the vertical gap to 11 in order to bring the entire block of text down one unit, which works when I manually start conky in an xterm window, but reverts back to a value of 10 if I set conky to start up on log-in. Why is this happening?

    Here's my code, and attached is a screen-shot of conky on my desktop:

    Code:
    # A comprehensive conky script, configured for use on
    # Ubuntu / Debian Gnome, without the need for any external scripts.
    #
    # Based on conky-jc and the default .conkyrc.
    # INCLUDES:
    # - tail of /var/log/messages 
    # - netstat connections to your computer
    #
    
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_hints undecorated,below,skip_taskbar
    background no
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # fiddle with window
    use_spacer yes
    use_xft yes
    
    # Update interval in seconds
    update_interval 3.0
    
    # Minimum size of text area
    minimum_size 400 5
    
    # Draw shades?
    draw_shades yes 
    
    # Text stuff
    draw_outline no # amplifies text if yes
    draw_borders no
    
    uppercase no # set to yes if you want all text to be in uppercase
    
    # Stippled borders?
    stippled_borders 8
    
    # border margins
    border_margin 4
    
    # border width
    border_width 1
    
    # Default colors and also border colors, grey90 == #e5e5e5
    default_color white
    default_shade_color black
    default_outline_color white
    
    own_window_colour black 
    own_window_transparent yes
    
    # 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
    gap_x 11
    gap_y 10
    
    # stuff after 'TEXT' will be formatted on screen
    
    override_utf8_locale no
    xftfont Terminus:size=8
    xftalpha 0.8
    
    TEXT
    
    ${offset 240}${color slate grey}${time %a, } ${color }${time %e %B %G}
    ${offset 240}${color slate grey}${time %Z,    }${color }${time %H:%M:%S}
    ${offset 240}${color slate grey}UpTime: ${color }$uptime
    ${offset 240}${color slate grey}Kern:${color }$kernel
    ${offset 240}${color slate grey}CPU:${color } $cpu% ${acpitemp}C
    ${offset 240}${cpugraph 20,130 000000 ffffff}
    ${offset 240}${color slate grey}Load: ${color }$loadavg
    ${offset 240}${color slate grey}Processes: ${color }$processes  
    ${offset 240}${color slate grey}Running:   ${color }$running_processes
    
    ${offset 240}${color slate grey}Highest CPU:
    ${offset 240}${color #ddaa00} ${top name 1}${top_mem cpu 1}
    ${offset 240}${color lightgrey} ${top name 2}${top cpu 2}
    ${offset 240}${color lightgrey} ${top name 3}${top cpu 3}
    ${offset 240}${color lightgrey} ${top name 4}${top cpu 4}
    
    ${offset 240}${color slate grey}Highest MEM:
    ${offset 240}${color #ddaa00} ${top_mem name 1}${top_mem mem 1}
    ${offset 240}${color lightgrey} ${top_mem name 2}${top_mem mem 2}
    ${offset 240}${color lightgrey} ${top_mem name 3}${top_mem mem 3}
    ${offset 240}${color lightgrey} ${top_mem name 4}${top_mem mem 4}
    
    ${offset 240}${color slate grey}MEM:  ${color } $memperc% $mem/$memmax
    ${offset 240}${membar 3,100}
    ${offset 240}${color slate grey}SWAP: ${color }$swapperc% $swap/$swapmax
    ${offset 240}${swapbar 3,100}
    
    ${offset 240}${color slate grey}ROOT:    ${color }${fs_free /}/${fs_size /}
    ${offset 240}${fs_bar 3,100 /}
    ${offset 240}${color slate grey}HOME:  ${color }${fs_free /home}/${fs_size /home}
    ${offset 240}${fs_bar 3,100 /home}
    
    ${offset 240}${color slate grey}NET: 
    ${offset 240}${color}Up: ${color }${upspeed eth1} k/s
    ${offset 240}${upspeedgraph eth1 20,130 000000 ffffff}
    ${offset 240}${color}Down: ${color }${downspeed eth1}k/s${color}
    ${offset 240}${downspeedgraph eth1 20,130 000000 ffffff}
    Attached Images Attached Images

  3. #12663
    Join Date
    Jul 2008
    Location
    Connecticut, U.S.
    Beans
    106
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Dr. Guitar View Post
    Hi all, I was wondering if someone could help me out with a couple of little problems I've been having.

    My first question is how do I stop Conky from drawing the border outline of the entire window? Also, I attempted to change the vertical gap to 11 in order to bring the entire block of text down one unit, which works when I manually start conky in an xterm window, but reverts back to a value of 10 if I set conky to start up on log-in. Why is this happening?

    Here's my code, and attached is a screen-shot of conky on my desktop:

    Code:
    # A comprehensive conky script, configured for use on
    # Ubuntu / Debian Gnome, without the need for any external scripts.
    #
    # Based on conky-jc and the default .conkyrc.
    # INCLUDES:
    # - tail of /var/log/messages 
    # - netstat connections to your computer
    #
    
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_hints undecorated,below,skip_taskbar
    background no
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # fiddle with window
    use_spacer yes
    use_xft yes
    
    # Update interval in seconds
    update_interval 3.0
    
    # Minimum size of text area
    minimum_size 400 5
    
    # Draw shades?
    draw_shades yes 
    
    # Text stuff
    draw_outline no # amplifies text if yes
    draw_borders no
    
    uppercase no # set to yes if you want all text to be in uppercase
    
    # Stippled borders?
    stippled_borders 8
    
    # border margins
    border_margin 4
    
    # border width
    border_width 1
    
    # Default colors and also border colors, grey90 == #e5e5e5
    default_color white
    default_shade_color black
    default_outline_color white
    
    own_window_colour black 
    own_window_transparent yes
    
    # 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
    gap_x 11
    gap_y 10
    
    # stuff after 'TEXT' will be formatted on screen
    
    override_utf8_locale no
    xftfont Terminus:size=8
    xftalpha 0.8
    
    TEXT
    
    ${offset 240}${color slate grey}${time %a, } ${color }${time %e %B %G}
    ${offset 240}${color slate grey}${time %Z,    }${color }${time %H:%M:%S}
    ${offset 240}${color slate grey}UpTime: ${color }$uptime
    ${offset 240}${color slate grey}Kern:${color }$kernel
    ${offset 240}${color slate grey}CPU:${color } $cpu% ${acpitemp}C
    ${offset 240}${cpugraph 20,130 000000 ffffff}
    ${offset 240}${color slate grey}Load: ${color }$loadavg
    ${offset 240}${color slate grey}Processes: ${color }$processes  
    ${offset 240}${color slate grey}Running:   ${color }$running_processes
    
    ${offset 240}${color slate grey}Highest CPU:
    ${offset 240}${color #ddaa00} ${top name 1}${top_mem cpu 1}
    ${offset 240}${color lightgrey} ${top name 2}${top cpu 2}
    ${offset 240}${color lightgrey} ${top name 3}${top cpu 3}
    ${offset 240}${color lightgrey} ${top name 4}${top cpu 4}
    
    ${offset 240}${color slate grey}Highest MEM:
    ${offset 240}${color #ddaa00} ${top_mem name 1}${top_mem mem 1}
    ${offset 240}${color lightgrey} ${top_mem name 2}${top_mem mem 2}
    ${offset 240}${color lightgrey} ${top_mem name 3}${top_mem mem 3}
    ${offset 240}${color lightgrey} ${top_mem name 4}${top_mem mem 4}
    
    ${offset 240}${color slate grey}MEM:  ${color } $memperc% $mem/$memmax
    ${offset 240}${membar 3,100}
    ${offset 240}${color slate grey}SWAP: ${color }$swapperc% $swap/$swapmax
    ${offset 240}${swapbar 3,100}
    
    ${offset 240}${color slate grey}ROOT:    ${color }${fs_free /}/${fs_size /}
    ${offset 240}${fs_bar 3,100 /}
    ${offset 240}${color slate grey}HOME:  ${color }${fs_free /home}/${fs_size /home}
    ${offset 240}${fs_bar 3,100 /home}
    
    ${offset 240}${color slate grey}NET: 
    ${offset 240}${color}Up: ${color }${upspeed eth1} k/s
    ${offset 240}${upspeedgraph eth1 20,130 000000 ffffff}
    ${offset 240}${color}Down: ${color }${downspeed eth1}k/s${color}
    ${offset 240}${downspeedgraph eth1 20,130 000000 ffffff}
    Are you using compiz? if so, that could be where the border is coming from. Check out this link with instructions to remove it:

    http://conky.linux-hardcore.com/?page_id=3744
    Registered Ubuntu User #29430

  4. #12664
    Join Date
    Jan 2009
    Location
    Italy
    Beans
    12
    Distro
    Ubuntu 10.04 Lucid Lynx

    adding time connected time.

    My conky config is simple, as I like to have the desktop as clear as possible.

    Code:
    update_interval 1
    total_run_times 0
    double_buffer yes
    text_buffer_size 1024
    
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    minimum_size 90 0
    maximum_width 90
    
    default_color white
    draw_shades no
    
    color0 white
    color1 FCAF3E
    color2 white
    
    alignment top_right
    gap_x 5
    gap_y 334
    
    no_buffers no
    net_avg_samples 2
    
    override_utf8_locale yes
    
    TEXT
    # ${texeci 1000 feh --bg-scale "/home/majestic/Imágenes/w_bosque_211.jpg"}
    ${color}${font StyleBats:size=16}${font}${color}   CPU1: ${color}${cpu cpu1}%${color} 
         ${color}${cpubar cpu1 8,60}${color}
    ${color}${font StyleBats:size=16}${font}${color}   CPU2: ${color}${cpu cpu2}%${color} 
         ${color}${cpubar cpu2 8,60}${color}
    ${color}${font StyleBats:size=16}${font}${color}   RAM: ${color}$memperc%${color} 
         ${color}${membar 8,60}${color}
    ${color}${font StyleBats:size=16}${font}${color}   SWAP: ${color}$swapperc%${color} 
         ${color}${swapbar 8,60}${color}
    ${color}${font StyleBats:size=16}${font}${color}Tiempo encendido: 
      ${color}${uptime}${color}
    
    # red: ppp0 para la llave usb, ra0 para el wifi, eth0 para el cable
       ${color}Red:
        Down:${color} ${downspeed ppp0} ${color}
       ${color}${downspeedgraph ppp0 32,72 000000}    
        Up:${color} ${upspeed ppp0} 
       ${color}${upspeedgraph ppp0 32,72 000000}  
        wifi:${color} ${downspeed wlan0} ${color}
       ${color}${downspeedgraph wlan0 32,72 000000}    
      ${color}Address: 
      ${color}${addr ppp0}${alignr}
    Usually I'm using a mobile connection (pppo) and I would like to add the connected time (because I have a 150 hour/month limit.
    For me would be fine just see the time I've been connected per connection, but if could be possible to add also the total time would be awesome.

    Sorry if I've not formated the post correctly, I tried to
    Thank you in advance for your time.
    Attached Images Attached Images
    Last edited by FERdeBOER; May 17th, 2010 at 07:28 PM. Reason: adding code

  5. #12665
    Join Date
    Mar 2010
    Beans
    122
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Dr. Guitar View Post
    My first question is how do I stop Conky from drawing the border outline of the entire window?
    Had the exact same problem.
    Try this:
    http://ubuntuforums.org/showthread.p...t=conky+border

    If it's still drawing the border after you starup, you probably have to do this too:
    http://ubuntuforums.org/showpost.php...49&postcount=4

    Cheers
    Last edited by Random_Dude; May 17th, 2010 at 09:44 PM.


  6. #12666
    Join Date
    Feb 2007
    Location
    Rio de Janeiro, Brazil
    Beans
    12
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    I am Brazilian and I'm using Google Translate.
    My conky has a problem, after changing from white to black, the display of the calendar is getting well.



    Conkyrc file for the calendar is.

    CALENDÁRIO ${hr 2}
    ${font DejaVu Sansixelsize=10}${alignc}${execi 60 date +"%B %Y" | tr "[:lower:]" "[:upper:]"}${font Snap.se:size=8 }
    ${font DejaVu Sans Mono:size=10}${execpi 60 cal | sed '1d' | sed '3d' | sed '2d' | sed '2d' | sed '2d' | sed '2d' | sed 's/^/${alignc} /'}
    ${font DejaVu Sans Mono:size=10}${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${color 000000}${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color1}'"$DJS"'${color0}'" "/}
    Thanks

  7. #12667
    Join Date
    Feb 2008
    Location
    I'm lost ... HELP!
    Beans
    1,014
    Distro
    Xubuntu

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by rjbgbo View Post
    I am Brazilian and I'm using Google Translate.
    My conky has a problem, after changing from white to black, the display of the calendar is getting well.



    Conkyrc file for the calendar is.



    Thanks
    I guess it is the red stuff you want to change (eu supor que é o material que vermelho você quer mudar).

    Code:
    CALENDÁRIO ${hr 2}
    ${font DejaVu Sansixelsize=10}${alignc}${execi 60 date +"%B %Y" | tr "[:lower:]" "[:upper:]"}${font Snap.se:size=8 }
    ${font DejaVu Sans Mono:size=10}${execpi 60 cal | sed '1d' | sed '3d' | sed '2d' | sed '2d' | sed '2d' | sed '2d' | sed 's/^/${alignc} /'}
    ${font DejaVu Sans Mono:size=10}${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${color 000000}${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color1}'"$DJS"'${color0}'" "/}
    Last edited by miegiel; May 17th, 2010 at 11:48 PM.

  8. #12668
    Join Date
    Feb 2007
    Location
    Rio de Janeiro, Brazil
    Beans
    12
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by miegiel View Post
    I guess it is the red stuff you want to change (eu supor que é o material que vermelho você quer mudar).

    Code:
    CALENDÁRIO ${hr 2}
    ${font DejaVu Sansixelsize=10}${alignc}${execi 60 date +"%B %Y" | tr "[:lower:]" "[:upper:]"}${font Snap.se:size=8 }
    ${font DejaVu Sans Mono:size=10}${execpi 60 cal | sed '1d' | sed '3d' | sed '2d' | sed '2d' | sed '2d' | sed '2d' | sed 's/^/${alignc} /'}
    ${font DejaVu Sans Mono:size=10}${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${color 000000}${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color1}'"$DJS"'${color0}'" "/}
    yes, the numbers that appeared in white
    thanks.

  9. #12669
    Join Date
    Jul 2007
    Location
    The U. S. of A.
    Beans
    163
    Distro
    Kubuntu Development Release

    Re: Post your .conkyrc files w/ screenshots

    Hey guys, can you call a lua script from inside a lua script???
    || Kubuntu x86_64 (12.10 Dev.) || KDE 4.9.00 ||
    || Dell Inspiron 570 || 8GB PC3-10600 DDR3 RAM || AMD Phenom II X4 820 @ 2.8Ghz ||
    || Razer Lachesis Gaming Mouse || Logitech G15 Gaming Keyboard ||
    Conky: ... no such configuration: 'normal'

  10. #12670
    Join Date
    Jul 2005
    Location
    The Netherlands
    Beans
    209
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Crinos512 View Post
    Hey guys, can you call a lua script from inside a lua script???
    Yes you can. Example:

    main.lua
    Code:
    --[[
    	Proxess' Lua Library
    		All credit goes to the CCCC, who's "usernames" I'll mention as soon as I write them down!
    		==> Londonali2010; arpinux; mobilediesel; dmillerct; Bruce M; yk1000; Crinos512;
    		
    	Library Capabilities:
    	  Centralized control - Create various main-like scripts for various Conkys, no repeated functions.
    	  Panels (ex-Background) - Gradient background with as many colours as desired. Multiple panels.
    	  Rings - Rings where values can be negative. Work clockwise, counter-clockwise and from a centre point.
    	  Text - Renders any text to any angle. Possible to make values display zeros.
    	 		ex.: (4% as 004% or -4ºC as -04ºC).
    ]]
    require 'cairo'
    
    package.path = "/home/proxess/.conkygui/scripts/?.lua"
    require 'panel'
    require 'ring'
    require 'text'
    require 'wave'
    require 'cup'
    
    
    function conky_pre()
    	if conky_window == nil then return end
    	
    	local cairo_struct = cairo_xlib_surface_create(conky_window.display,conky_window.drawable,
    				conky_window.visual, conky_window.width,conky_window.height)
    	
    	--cairo_render = cairo_create(cairo_struct)
    	--wave(cairo_render)
    	--cairo_destroy(cairo_render)
    	
    	
    	
    	
    	--Panel
    	cairo_render = cairo_create(cairo_struct)
    	
    	--Fade Panel
    	fade_struct = {{grad_c = 0x000000, grad_a = 0.7, grad_stop = 0.0},
    			{grad_c = 0x000000, grad_a = 0.15, grad_stop = 0.6},
    			{grad_c = 0x000000, grad_a = 0.0, grad_stop = 1.0}}
    	fade_line = {from_x = conky_window.width-5, from_y = conky_window.height/2, to_x = conky_window.width, to_y = conky_window.height/2}
    	panel(cairo_render, conky_window.width-5, 0, conky_window.width, conky_window.height, 0, 0, 0, 0, fade_struct, fade_line)
    	
    	-- Full Panel
    	full_struct = {grad_c = 0x242320, grad_a = 0.7}
    	panel(cairo_render, 0, 0, conky_window.width-5, conky_window.height, 0, 0, 0, 0, full_struct, null)
    	
    	-- Destroy Render
    	cairo_destroy(cairo_render)
    	
    end
    
    
    function conky_post()
    	if conky_window == nil then return end
    	
    	local cairo_struct = cairo_xlib_surface_create(conky_window.display,conky_window.drawable,
    				conky_window.visual, conky_window.width,conky_window.height)
    
    	
    	-- Text
    	cairo_render = cairo_create(cairo_struct)
    	
    	--CPU
    	text(cairo_render, 'time', '', '', '', 12, 18, 'Sans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 16, 0xFFFFFF, 1.0, 0, false, 0)
    	
    	-- Destroy Render
    	cairo_destroy(cairo_render)
    end
    
    --[[
    Available Scripts:
    
    cup(cairo_render, conky_var, conky_arg, var_val_min, var_val_max,
    		tl_x, tl_y, height, t_width, b_width, 
    		liquid_struct, liquid_grad_line, cup_struct, cup_grad_line, 
    		colour_coding, 
    		warning, warning_struct, warning_grad_line, 
    		danger, danger_struct, danger_grad_line)
    
    ring(cairo_render, 
    		conky_var, conky_arg, var_val_min, var_val_max, pos_x, pos_y, 
    		ring_radius, ring_thickness, ring_angle_start, ring_angle_end, 
    		background_c, background_a, foreground_c, foreground_a, 
    		ring_dir, colour_coding, coding_direction, 
    		warning, warning_bgc, warning_bga, warning_fgc, warning_fga,
    		danger, danger_bgc, danger_bga, danger_fgc, danger_fga)
    
    gradient_struct = {grad_c = <COLOUR>, grad_a = <ALPHA>}
    gradient_struct = {{grad_c = <COLOUR>, grad_a = <ALPHA>, grad_stop = <GRADIENT STOP>}, ...}
    gradient_line = {from_x = <...>, from_y = <...>, to_x = <...>, to_y = <.text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0016 --datatype=DW -w', '', ':', 1092, 8, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0x000000, 1.0, 0, false, 3)
    	cairo_destroy(cairo_render)
    	cairo_render = cairo_create(cairo_struct)..>}
    panel(cairo_render, tl_x, tl_y, br_x, br_y, radius_tl, radius_tr, radius_bl, radius_br, gradient_struct, gradient_line)
    
    
    text(cairo_render, 
    		conky_var, conky_arg, prefix_text, suffix_text, pos_x, pos_y, font_name, 
    		font_slant, font_weight, font_size, font_c, font_a, font_angle, num_is, num_chars)
    font_slant:
    CAIRO_FONT_SLANT_NORMAL: Upright font style
    CAIRO_FONT_SLANT_ITALIC: Italic font style
    CAIRO_FONT_SLANT_OBLIQUE: Oblique font style
    font_weight:
    CAIRO_FONT_WEIGHT_NORMAL: Normal font weight
    CAIRO_FONT_WEIGHT_BOLD: Bold font weight
    
    
    
    
    
    
    
    
    
    
    
    cup_struct = {{grad_c = 0xFFFFFF, grad_a = 0.0, grad_stop = 0.0},
    			{grad_c = 0xAAAAFF, grad_a = 0.2, grad_stop = 0.6},
    			{grad_c = 0xAAAAFF, grad_a = 0.3, grad_stop = 0.7},
    			{grad_c = 0xAAAAFF, grad_a = 0.2, grad_stop = 0.8},
    			{grad_c = 0xFFFFFF, grad_a = 0.1, grad_stop = 1.0}}
    	cup_grad_line = {from_x = 4, from_y = 570, to_x = conky_window.width-8, to_y = 620}
    	liquid_struct = {{grad_c = 0x7777FF, grad_a = 0.6, grad_stop = 0.0},
    			{grad_c = 0x7777FF, grad_a = 0.3, grad_stop = 1.0}}
    	liquid_grad_line = {from_x = 4, from_y = 570, to_x = conky_window.width-8, to_y = 620}
    	cup(cairo_render, 'memperc', '', 0, 100,
    		4, 570, 50, conky_window.width-12, conky_window.width-20, 
    		cup_struct, cup_grad_line, liquid_struct, liquid_grad_line, 
    		false, 
    		70, liquid_struct, liquid_grad_line, 
    		90, liquid_struct, liquid_grad_line)
    	
    	
    	-- Memory
    	--ring(cairo_render, 
    	--	'memperc', '', 0, 100, 24, 600, 
    	--	20, 4, -180, 180, 
    	--	0xFFFFFF, 0.2, 0xFFFFFF, 0.6, 
    	--	2, true, true, 
    	--	70, 0xFF0000, 0.2, 0xFF8800, 0.7,
    	--	90, 0xFF0000, 0.2, 0xFF0000, 0.9)
    	
    	-- Core 1
    	ring(cairo_render, 
    		'cpu', 'cpu1', 0, 100, 24, 650, 
    		20, 4, -180, 180, 
    		0xFFFFFF, 0.2, 0xFFFFFF, 0.6, 
    		0, true, true, 
    		70, 0xFF0000, 0.2, 0xFF8800, 0.7,
    		90, 0xFF0000, 0.2, 0xFF0000, 0.9)
    	
    	-- Core 2
    	ring(cairo_render, 
    		'cpu', 'cpu2', 0, 100, 24, 700, 
    		20, 4, -180, 180, 
    		0xFFFFFF, 0.2, 0xFFFFFF, 0.6, 
    		1, true, true, 
    		70, 0xFF0000, 0.2, 0xFF8800, 0.7,
    		90, 0xFF0000, 0.2, 0xFF0000, 0.9)
    	
    	-- Destroy Render
    	cairo_destroy(cairo_render)
    
    
    	
    	
    	
    	
    
    	
    	-- Text
    	cairo_render = cairo_create(cairo_struct)
            text(cairo_render,
                    'time', '%a', '', '', 1161, 31, 'FreeMono',
                    CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 14, 0xFFFFFF, 1.0, -1.5707964, false, 0)
            cairo_destroy(cairo_render)
    	
    	
    	--Lisbon
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0016 --datatype=CN', '', '', 1010, 30, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, -1.5707964, false, 0)
    	cairo_destroy(cairo_render)
    	--Today
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0016 --datatype=DW -w', '', ':', 1110, 8, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, false, 0)
    	cairo_destroy(cairo_render)
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0016 --datatype=HT --hideunits --hidedegreesymbol', '', '°C', 1110, 16, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, true, 2)
    	cairo_destroy(cairo_render)
    	--Tomorrow
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0016 --datatype=DW -w --startday=1', '', ':', 1110, 24, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, false, 0)
    	cairo_destroy(cairo_render)
    	cairo_render = cairo_create(cairo_struct)
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0016 --datatype=HT --hideunits --hidedegreesymbol --startday=1', '', '°C', 1110, 32, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, true, 2)
    	cairo_destroy(cairo_render)
    
    	
    	--Funchal
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0014 --datatype=CN', '', '', 870, 32, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, -1.5707964, false, 0)
    	cairo_destroy(cairo_render)
    	--Today
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0014 --datatype=DW -w', '', ':', 970, 8, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, false, 0)
    	cairo_destroy(cairo_render)
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0014 --datatype=HT --hideunits --hidedegreesymbol', '', '°C', 970, 16, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, true, 2)
    	cairo_destroy(cairo_render)
    	--Tomorrow
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0014 --datatype=DW -w --startday=1', '', ':', 970, 24, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, false, 0)
    	cairo_destroy(cairo_render)
    	cairo_render = cairo_create(cairo_struct)
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=POXX0014 --datatype=HT --hideunits --hidedegreesymbol --startday=1', '', '°C', 970, 32, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, true, 2)
    	cairo_destroy(cairo_render)
    
    	
    	--Osaka
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=JAXX0071 --datatype=CN', '', '', 730, 28, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, -1.5707964, false, 0)
    	cairo_destroy(cairo_render)
    	--Today
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=JAXX0071 --datatype=DW -w', '', ':', 830, 8, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, false, 0)
    	cairo_destroy(cairo_render)
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=JAXX0071 --datatype=HT --hideunits --hidedegreesymbol', '', '°C', 830, 16, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, true, 2)
    	cairo_destroy(cairo_render)
    	--Tomorrow
    	cairo_render = cairo_create(cairo_struct)	
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=JAXX0071 --datatype=DW -w --startday=1', '', ':', 830, 24, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, false, 0)
    	cairo_destroy(cairo_render)
    	cairo_render = cairo_create(cairo_struct)
    	text(cairo_render, 
    		'execi 600', 'conkyForecast --location=JAXX0071 --datatype=HT --hideunits --hidedegreesymbol --startday=1', '', '°C', 830, 32, 'FreeSans', 
    		CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 8, 0xFFFFFF, 1.0, 0, true, 2)
    	cairo_destroy(cairo_render)
    ]]
    panel.lua
    Code:
    require 'cairo'
    
    package.path = "/home/proxess/.conkygui/scripts/?.lua"
    require 'paint'
    
    function panel(cairo_render, tl_x, tl_y, br_x, br_y, radius_tl, radius_tr, radius_bl, radius_br, gradient_struct, gradient_line)
     	
     	--Towards Top Right
    	cairo_move_to(cairo_render, tl_x+radius_tl, tl_y)
    	cairo_line_to(cairo_render, br_x-radius_tr, tl_y)
    	cairo_curve_to(cairo_render, br_x, tl_y, br_x, tl_y, br_x, tl_y+radius_tr)
    	
    	-- Towards Bottom Right
    	cairo_line_to(cairo_render, br_x, br_y-radius_br)
    	cairo_curve_to(cairo_render, br_x, br_y, br_x, br_y, br_x-radius_br, br_y)
    	
    	-- Towards Bottom Left
    	cairo_line_to(cairo_render, tl_x+radius_bl, br_y)
    	cairo_curve_to(cairo_render, tl_x, br_y, tl_x, br_y, tl_x, br_y-radius_bl)
    	
    	-- Towards Top Left
    	cairo_line_to(cairo_render, tl_x,tl_y+radius_tl)
    	cairo_curve_to(cairo_render, tl_x, tl_y, tl_x, tl_y, tl_x+radius_tl, tl_y)
    	cairo_close_path(cairo_render)
    	
    	-- Paint
    	paint(cairo_render, gradient_struct, gradient_line)
    end
    paint.lua
    Code:
    require 'cairo'
    
    package.path = "/home/proxess/.conkygui/scripts/?.lua"
    require 'rgb_to_r_g_b'
    
    function paint(cairo_render, gradient_struct, gradient_line)
    	if #(gradient_struct) > 1 then
    		local gradient = cairo_pattern_create_linear(gradient_line['from_x'], gradient_line['from_y'],
    								 gradient_line['to_x'], gradient_line['to_y'])
    		for i in pairs(gradient_struct) do
    			gradient_fill(gradient, gradient_struct[i])
    		end
    		
    		cairo_set_source(cairo_render, gradient)
    	else
    		cairo_set_source_rgba(cairo_render, 
    			rgb_to_r_g_b(gradient_struct['grad_c'], gradient_struct['grad_a']))
    	end
    	
    	cairo_fill(cairo_render)
    end
    
    function gradient_fill(gradient, struct)
    	cairo_pattern_add_color_stop_rgba(gradient, struct['grad_stop'], 
    				rgb_to_r_g_b(struct['grad_c'], struct['grad_a']))
    end
    rgb_to_r_g_b.lua
    Code:
    function rgb_to_r_g_b(colour,alpha)
    	return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
    etc etc etc etc etc...

    EDIT: Remember, default libraries come before your own libraries. You'll need full paths for your library, if I'm not mistaken. This is part of my progressively developing conky lua library.

    EEdit: Also, make sure you don't have functions with the same name. It won't work. Lua functions don't work like Java. Trust me, I've tried.
    Last edited by proxess; May 18th, 2010 at 04:56 PM.
    Laptop: i7 4800MQ 2.7GHz (~3.7GHz); 2x 4GB Kingston HyperX Genesis 1600MHz; Nvidia 780M 4GB; Crucial M4 256GB SSD; Ubuntu 14.04 LTS x64 and Windows 8.1 x64.
    Ubuntu #8076 / Linux #429448

Page 1267 of 2310 FirstFirst ... 2677671167121712571265126612671268126912771317136717672267 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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