Page 2039 of 2291 FirstFirst ... 1039153919391989202920372038203920402041204920892139 ... LastLast
Results 20,381 to 20,390 of 22903

Thread: Post your .conkyrc files w/ screenshots

  1. #20381
    Join Date
    Aug 2012
    Beans
    1

    Re: Post your .conkyrc files w/ screenshots

    Wish I could post a screen shot, I'm on Mint 13 Mate with Compiz and ever since I installed compiz I cant get the thing to take a screen shot. I even configured it in the compiz config editor but not better what I set the keys to I don't get a screen shot. I also cant get cube desktop to work properly.

    Edit :

    I finally just opened the screen shot app and took it. Now I'm off to try and get my compiz sorted out. I'd also like to have transparent windows for example a transparent terminal and transparent file browser.
    http://img.photobucket.com/albums/v4...Screenshot.png

    Code:
    use_xft yes
    xftfont Terminus:size=8
    xftalpha 0.8
    update_interval 1.0
    total_run_times 0
    own_window yes
    own_window_transparent yes
    own_window_argb_visual yes
    own_window_type normal
    own_window_class conky-semi
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    background no
    double_buffer yes
    minimum_size 300 200
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders yes
    default_shade_color black
    default_outline_color white
    default_bar_size 150 5
    default_gauge_size 20 20
    imlib_cache_size 0
    draw_shades no
    alignment top_right
    gap_x 5
    gap_y 35
    no_buffers yes
    uppercase no
    cpu_avg_samples 2
    override_utf8_locale no
    default_color ECEAE4
    color1 9f907d
    color2 01C400
     
     
     
    TEXT
    ${color red} Those who dare, win.
    ${font AvantGardeLTMedium:bold:size=10}${color red}Info ${color slate grey}${hr 2}${font}
    ${color1}Date                   ${alignr}${color slate grey}${time %a,}${color}${time %e %B %G}
    ${color1}Time            ${alignr}${color}${time %T}
     
     
    ${font AvantGardeLTMedium:bold:size=10}${color red}System ${color slate grey}${hr 2}${font}
    ${color1}Hostname        ${alignr}${color}${nodename}
    ${color1}${sysname}        ${alignr}${color}${kernel}-${machine}
    ${color1}CPU            ${alignr}${color}${freq_g}GHz
    ${color1}Loadaverage        ${alignr}${color}${loadavg 1} ${loadavg 2} ${loadavg 3}
    ${color1}Uptime            ${alignr}${color}${uptime}
    
     
    ${font AvantGardeLTMedium:bold:size=10}${color red}Processors ${color slate grey}${hr 2}${font}
    ${color1}Core 1        ${alignr}${color}${cpu cpu1}%  ${cpubar cpu1}
    ${color1}Core 2        ${alignr}${color}${cpu cpu2}%  ${cpubar cpu2}
    ${color1}Core 3        ${alignr}${color}${cpu cpu3}%  ${cpubar cpu2}
    ${color1}Core 4        ${alignr}${color}${cpu cpu4}%  ${cpubar cpu2}
    ${color1}Core 5        ${alignr}${color}${cpu cpu5}%  ${cpubar cpu2}
    ${color1}Core 6        ${alignr}${color}${cpu cpu6}%  ${cpubar cpu2}
     
    ${font AvantGardeLTMedium:bold:size=10}${color red}Memory ${color slate grey}${hr 2}${font}
    ${color1}Memory     ${color}${alignr}${memeasyfree} / ${memmax}
    ${color1}Currently    ${color}${alignr}${memperc}%   ${membar}
     
    ${font AvantGardeLTMedium:bold:size=10}${color red}Filesystem ${color slate grey}${hr 2}${font}
    ${color1}/        ${color}${alignc}${fs_used /} / ${fs_size /} ${color}${alignr}${fs_free_perc /} %
    ${color}${fs_bar 5,300 /}
     
    ${font AvantGardeLTMedium:bold:size=10}${color red}Networking ${color slate grey}${hr 2}${font}
    ${if_existing /proc/net/route wlan0}${color1}Ip        ${color}${alignr}${addr wlan0}
    ${color1}AP        ${color}${alignr}${wireless_essid wlan0}
    ${color1}Signal        ${color}${alignr}${wireless_link_qual_perc wlan0}${wireless_link_bar 10,100 wlan0}
    ${color1}Download    ${alignr}${color}${downspeed wlan0}${downspeedgraph wlan0 10,100}
    ${color1}Upload        ${alignr}${color}${upspeed wlan0}${upspeedgraph wlan0 10,100}
    ${color1}Total Down/Up    ${alignr}${color}${totaldown wlan0}${color1}/${color}${totalup wlan0}
    ${else}${if_existing /proc/net/route eth0}${color1}Ip        ${color}${alignr}${addr eth0}
    ${color1}Download    ${alignr}${color}${downspeed eth0}${downspeedgraph eth0 10,100}
    ${color1}Upload        ${alignr}${color}${upspeed eth0}${upspeedgraph eth0 10,100}
    ${color1}Total Down/Up    ${alignr}${color}${totaldown eth0}${color1}/${color}${totalup eth0}${endif}${endif}
     
    ${font AvantGardeLTMedium:bold:size=10}${color red}Top Processes ${color slate grey}${hr 2}${font}
    ${color1}${top name 1}     ${alignr}${color}${top cpu 1} ${top mem 1}
    ${color1}${top name 2}     ${alignr}${color}${top cpu 2} ${top mem 2}
    ${color1}${top name 3}     ${alignr}${color}${top cpu 3} ${top mem 3}
    ${color1}${top name 4}     ${alignr}${color}${top cpu 4} ${top mem 4}
    ${color1}${top name 4}     ${alignr}${color}${top cpu 5} ${top mem 5}
    ${color1}${top name 4}     ${alignr}${color}${top cpu 6} ${top mem 6}
    Last edited by joe0121; August 25th, 2012 at 03:18 PM.

  2. #20382
    Join Date
    Feb 2010
    Location
    SR11 Cockpit
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by joe0121 View Post
    Edit :

    I finally just opened the screen shot app and took it. Now I'm off to try and get my compiz sorted out. I'd also like to have transparent windows for example a transparent terminal and transparent file browser.
    Bit big, have you considered using an image hosting service?
    Like http://imgbox.com/ maybe? Saves bandwidth for those of us that don't have super speeds.

    Like this, it's a common courtesy thing found on most forums.
    Love the car!

    Nice conky though, hope you get your compiz problem figured out.

  3. #20383
    Join Date
    Aug 2012
    Beans
    1

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    Bit big, have you considered using an image hosting service?
    Like http://imgbox.com/ maybe? Saves bandwidth for those of us that don't have super speeds.

    Like this, it's a common courtesy thing found on most forums.
    Love the car!

    Nice conky though, hope you get your compiz problem figured out.
    Sorry for the size, It's hosted on photobucket. I suppose I'm spoiled most forums I post on auto shrink the image. I'll edit to just provide the direct link.

    The Aventador is an amazing Machine and IMO the only real competition for the Ferrari 458.

    Of course both are a bit out of my price range.

  4. #20384
    Join Date
    Feb 2010
    Location
    SR11 Cockpit
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by joe0121 View Post
    Sorry for the size, It's hosted on photobucket. I suppose I'm spoiled most forums I post on auto shrink the image. I'll edit to just provide the direct link.

    The Aventador is an amazing Machine and IMO the only real competition for the Ferrari 458.

    Of course both are a bit out of my price range.
    No need to apologize. Photobucket doesn't make thumbs?

    I'd bet 'your price range' + 'my price range' wouldn't reach 'their price range'. {sigh}

    A young man in a RR dealer looking at a Silver Shadow, "NICE, How much?"
    The dealer, "Son, if you have to ask, you can't afford it!"

    EDIT: I found this for you: Making Thumbnails with Photobucket - A Tutorial
    Last edited by Sector11; August 25th, 2012 at 09:27 PM.

  5. #20385
    Join Date
    Aug 2012
    Beans
    1

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    No need to apologize. Photobucket doesn't make thumbs?

    I'd bet 'your price range' + 'my price range' would reach 'their price range'. {sigh}

    A young man in a RR dealer looking at a Silver Shadow, "NICE, How much?"
    The dealer, "Son, if you have to ask, you can't afford it!"

    EDIT: I found this for you: Making Thumbnails with Photobucket - A Tutorial
    Thanks

  6. #20386
    Join Date
    Jul 2012
    Location
    Oklahoma, USA
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    This is my first day messing with Conky, I have made a little progress editing/improving a basic conkyrc file that showed most the stuff I'm interested in seeing. I had to add the CPU temp and changed from bar to graph outputs for the CPU usage. I made a tri-colored theme that seems to appear pretty well in both dark and light backgrounds.

    I use a wallpaper changer (Wallch) so I needed a scheme that shows up well against a variety of backgrounds.





    And yes, I'm a bit of a Final Fantasy fan.

    The .conkyrc code (not yet commented as I am still learning what everything does) is as follows:

    Code:
    background no
    font Ubuntu:bold:size=11
    use_xft yes
    xftalpha 0.9
    update_interval 3.0
    total_run_times 0
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    minimum_size 180 5
    maximum_width 180
    draw_shades yes
    draw_outline yes
    draw_borders no
    draw_graph_borders yes
    default_color yellow
    default_shade_color white
    default_outline_color black
    alignment top_right
    gap_x 12
    gap_y 35
    no_buffers yes
    uppercase no
    cpu_avg_samples 4
    override_utf8_locale no
    uppercase no
    
    color1 red
    color2 orange
    
    
    TEXT
    
    ${color1}                  CPU ${color}
    Temp: $alignr${exec sensors | grep 'high' | cut -c16-19} C${color}
    Speed: ${alignr}${freq} MHz
    Core 1 ${alignr}${cpu cpu1}%
    ${color2}${cpugraph cpu1 FFFF00 FF0000}${color}
    Core 2 ${alignr}${cpu cpu2}%
    ${color2}${cpugraph cpu2 FFFF00 FF0000}${color}
    ${top name 1}$alignr${top cpu 1}
    ${top name 2}$alignr${top cpu 2}
    ${top name 3}$alignr${top cpu 3}
    ${top name 4}$alignr${top cpu 4}
    ${top name 5}$alignr${top cpu 5}
    
    ${color1}                  RAM ${color}
    Total: ${alignr}$memmax
    Active: ${alignr}$mem ($memperc%)
    ${color2}${membar 4}${color}
    ${top_mem name 1}$alignr${top_mem mem 1}
    ${top_mem name 2}$alignr${top_mem mem 2}
    ${top_mem name 3}$alignr${top_mem mem 3}
    ${top_mem name 4}$alignr${top_mem mem 4}
    ${top_mem name 5}$alignr${top_mem mem 5}
    
    ${color1}            FILESYSTEM ${color}
    Root: ${alignr}${fs_used /} / ${fs_size /}
    ${color2}${fs_bar 4 /}${color}
    Home: ${alignr}${fs_used /home} / ${fs_size /home}
    ${color2}${fs_bar 4 /home}${color}
    
    ${color1}              NETWORK ${color}
    IP Address: ${alignr}${addr wlan0}
    Down: ${downspeed wlan0}/s ${alignr}${totaldown wlan0}
    ${color2}${downspeedgraph wlan0 FFFF00 FF0000}${color}
    Up: ${upspeed wlan0}/s ${alignr}${totalup wlan0}
    ${color2}${upspeedgraph wlan0 FFFF00 FF0000}$color

  7. #20387
    Join Date
    Aug 2012
    Beans
    1

    Re: Post your .conkyrc files w/ screenshots

    Petro Dawg

    I really like that top screen shot. Though I have never been a fan of the unity desktop in the new Ubuntu. One if the big reasons I went to mint.

    I am also a big fan of the simple set up. I just tried one with a lot of bells and whistles and found it to be a bit cluttered.

  8. #20388
    Join Date
    Jul 2012
    Location
    Oklahoma, USA
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by joe0121 View Post
    Petro Dawg

    I really like that top screen shot. Though I have never been a fan of the unity desktop in the new Ubuntu. One if the big reasons I went to mint.

    I am also a big fan of the simple set up. I just tried one with a lot of bells and whistles and found it to be a bit cluttered.

    Thanks. I tried to just include stuff that was actually important to my computer's performance. I also wanted to limit what I included so I could use the bold outlined text that was easy to read against many different backgrounds. To add more, I would have to make the text smaller or the box bigger which would be, as you put it, "cluttered".

    Unity was the first Linux environment I ever tried (less than a year ago) so I just got used to it. I've tried KDE and Gnome and I just like Unity better. I think its just a matter of what you are most used to and the level of customizing you want. I actually grown to like Unity2D the most, because it is extremely friendly to my laptop's resources and has nearly the same functionality as the 3D version.

    I'm just amazed that after spending most of my computing life solely on Windows, when I now use a Windows a computer (which I should be used to), I can't stand it at all. Its like trying to return to dial up internet after having experienced high speed internet.
    Last edited by Petro Dawg; August 26th, 2012 at 12:07 AM.

  9. #20389
    Join Date
    Feb 2010
    Location
    SR11 Cockpit
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Petro Dawg View Post
    I'm just amazed that after spending most of my computing life solely on Windows, when I now use a Windows a computer (which I should be used to), I can't stand it at all. Its like trying to return to dial up internet after having experienced high speed internet.
    That is a very good analogy! We have FF 7, 9, 10, 10-2 and 12. Love them!

    I have something for you and joe0121 to look at that you may find interesting.

    1. a simple conky that is generic - it's not really the goal, unless joe is interested.
    2. a background shadow that:
      • can be adjusted for darkness
      • automaticlly sizes itself to the conky window (LUA)
      • has a built-in calendar if you wish to use it (not necessary)


    EDIT: running in OpenBox with xcompmgr

    dark background . . . . . . . . complex background . . . . and light backgrounds:


    Change backgrounds when you want and don't worry about not seeing it.

    Conky:
    Code:
    # killall conky && conky -c ~/Conky/S11_Simple.conky &
    # To use #! in a conky use: ${exec echo '#!'}
    
    ###  Begin Window Settings  ##################################################
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type normal
    own_window_transparent yes
    own_window_hints undecorated,below,skip_taskbar,skip_pager
    own_window_colour gray
    own_window_class Conky
    own_window_title Simple
    
    # Use the Xdbe extension? (eliminates flicker)
    # It is highly recommended to use own window with this one
    # so double buffer won't be so big.
    double_buffer yes
    
    ### ARGB can be used for real transparency
    ### NOTE that a composite manager is required for real transparency.
    ### This option will not work as desired (in most cases) in conjunction with
    ### own_window_type normal
    # own_window_argb_visual yes
    
    ### When ARGB visuals are enabled, this use this to modify the alpha value
    ### Use: own_window_type normal
    ### Use: own_window_transparent no
    ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
    # own_window_argb_value 0
    
    minimum_size 160 0     ## width, height
    maximum_width 160       ## width, usually a good idea to equal minimum width
    
    gap_x 10 # left-right
    gap_y 15 # up-down
    
    alignment top_left
    ###################################################  End Window Settings  ###
    ###  Font Settings  #########################################################
    # Use Xft (anti-aliased font and stuff)
    use_xft yes
    xftfont CorporateMonoExtraBold:size=9
    
    # Alpha of Xft font. Must be a value at or between 1 and 0 ###
    xftalpha 1
    # Force UTF8? requires XFT ###
    override_utf8_locale yes
    
    draw_shades no
    default_shade_color black
    
    draw_outline no # amplifies text if yes
    default_outline_color black
    
    uppercase no
    ######################################################  End Font Settings  ###
    ###  Color Settings  #########################################################
    default_shade_color gray
    default_outline_color black
    
    default_color DCDCDC #220 220 220	Gainsboro
    color0 8FBC8F #143 188 143	DarkSeaGreen
    color1 778899 #119 136 153	LightSlateGray
    color2 FF8C00 #255 140   0	DarkOrange
    color3 7FFF00 #127 255   0	Chartreuse
    color4 FFA07A #255 160 122	LightSalmon
    color5 FFDEAD #255 222 173	NavajoWhite
    color6 00BFFF #  0 191 255	DeepSkyBlue
    color7 00FFFF #  0 255 255	Cyan
    color8 FFFF00 #255 255   0	Yellow
    color9 B22222 #178  34  34	FireBrick
    #####################################################  End Color Settings  ###
    ###  Borders Section  ########################################################
    draw_borders no
    # Stippled borders?
    stippled_borders 0
    # border margins
    border_inner_margin 5
    border_outer_margin 0
    # border width
    border_width 0
    # graph borders
    draw_graph_borders no #yes
    #default_graph_size 15 40
    #####################################################  End Borders Secton  ###
    ###  Miscellaneous Section  ##################################################
    # Boolean value, if true, Conky will be forked to background when started.
    background yes
    
    # Adds spaces around certain objects to stop them from moving other things
    # around, this only helps if you are using a mono font
    # Options: right, left or none
    use_spacer none
    
    # Default and Minimum size is 256 - needs more for single commands that
    # "call" a lot of text IE: bash scripts
    text_buffer_size 1028
    
    # Subtract (file system) buffers from used memory?
    no_buffers yes
    
    # change GiB to G and MiB to M
    short_units yes
    
    # Like it says, ot pads the decimals on % values
    # doesn't seem to work since v1.7.1
    pad_percents 2
    
    #   Maximum size of user text buffer, i.e. layout below TEXT line in config file
    #  (default is 16384 bytes)
    # max_user_text 16384
    
    # Desired output unit of all objects displaying a temperature. Parameters are
    # either "fahrenheit" or "celsius". The default unit is degree Celsius.
    # temperature_unit Fahrenheit
    
    ##############################################  End Miscellaneous Section  ###
    ###  LUA Settings  ###########################################################
    ## Above and After TEXT - requires a composite manager or blinks.
    ##
     lua_load ~/Conky/LUA/draw-bg.lua
    #TEXT
    #${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
    #
    ## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
    ##
    ## OR Both above TEXT (No composite manager required - no blinking!)
    #
    #lua_load ~/Conky/LUA/draw-bg.lua
    #lua_draw_hook_pre draw_bg 15 0 0 0 0 0x000000 0.3
    #TEXT
    #
    #######################################################  End LUA Settings  ###
    # The all important - How often conky refreshes.
    # If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
    update_interval 1
    
    TEXT
    ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}\
    ${lua luacal {x=12,y=20,tf="CorporateMonoExtraBold",tfs=12,tc=0xffffff,ta=1,bf="CorporateMonoExtraBold",bfs=12,bc=0xffffff,ba=1,hf="CorporateMonoExtraBold",hfs=12,hc=0x00BFFF,ha=1,sp="0",gh=22,gt=20,gv=20,sd=0,hstyle=1,tdf="CorporateMonoExtraBold",tdfs=12,tdc=0x00BFFF,tda=1}}
    
    
    
    
    
    
    
    
     ${time %T}${alignr 5}${uptime_short}
    ${color6}${hr}${color}
     ${alignc}${color6}System Info${color}
    
    ${alignc}${kernel}
     Host:${alignr 5}${nodename}
    
      RAM:${alignr 5}${mem} / ${memmax}
     Swap:${alignr 5}${swap} / ${swapmax}
     Disk:${alignr 5}${fs_used /} / ${fs_size /}
    
     CPU 1:${alignr 5}${cpu cpu1}%
     CPU 2:${alignr 5}${cpu cpu2}%
     CPU 3:${alignr 5}${cpu cpu3}%
     Average:${alignr 5}${cpu cpu0}%
    
     /Root: ${fs_size /}${alignr 5}${fs_used_perc /}%${color}
     /Home: ${fs_size /home}${alignr 5}${fs_used_perc /home}%
     /M/5 : ${fs_size /media/5}${alignr 5}${fs_used_perc /media/5}%
    
     SDA:
     Read:${alignr 5}${diskio_read /dev/sda}
     Write:${alignr 5}${diskio_write /dev/sda}
    
     NET:
     Dn: ${downspeedf eth0}${alignr 5}Up: ${upspeedf eth0}
    draw-bk.lua - with calendar
    Code:
    --[[Background originally by londonali1010 (2009)
        ability to set any size for background mrpeachy 2011
        ability to set variables for bg in conkyrc dk75
    
      the change is that if you set width and/or height to 0
      then it assumes the width and/or height of the conky window
    
    so:
    
    Above and After TEXT  (requires a composite manager or it blinks!)
    
     lua_load ~/wea_conky/draw_bg.lua
     TEXT
     ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}
    
    OR Both above TEXT (no composite manager required - no blinking!)
    
     lua_load ~/wea_conky/draw_bg.lua
     lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
     TEXT
    
    Note
    ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
      See below:        1  2 3 4 5 6        7
    
    ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
    
    covers the whole window and will change if you change the minimum_size setting
    
    1 = 20             corner_radius
    2 = 0             x_position
    3 = 0             y_position
    3 = 0             width
    5 = 0             height
    6 = 0x000000      color
    7 = 0.4           alpha
    
    ######### calendar function ##################################################
    
    then to use it, you activate the calendar function BELOW TEXT like this
    
    ${lua luacal {settings}}
    
    #${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
    #    x=x position top left
    #    y=y position top left
    #    tf=title font, eg "mono" must be in quotes
    #    tfs=title font size
    #    tc=title color
    #    ta=title alpha
    #    bf=body font, eg "mono" must be in quotes
    #    bfs=body font size
    #    bc=body color
    #    ba=body alpha
    #    hf=highlight font, eg "mono" must be in quotes
    #    hfs=highlight font size
    #    hc=highlight color
    #    ha=highlight alpha
    #    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts
    
    #    gt=gap from title to body
    #    gh=gap horizontal between columns
    #    gv=gap vertical between rows
    #    sd=start day, 0=Sun, 1=Mon
    
    #    hstyle = heading style, 0=just days, 1=date insert
    #    tdf=title date font, eg "mono" must be in quotes
    #    tdfs=title date font size
    #    tdc=title date color
    #    tda=title date alpha
    
    # test line
    -- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}
    
    
    ]]
    
    require 'cairo'
    local    cs, cr = nil
    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(r,x,y,w,h,color,alpha)
    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 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)
    w=w
    h=h
    if w=="0" then w=tonumber(conky_window.width) end
    if h=="0" then h=tonumber(conky_window.height) end
    cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
    --top left mid circle
    local xtl=x+r
    local ytl=y+r
    --top right mid circle
    local xtr=(x+r)+((w)-(2*r))
    local ytr=y+r
    --bottom right mid circle
    local xbr=(x+r)+((w)-(2*r))
    local ybr=(y+r)+((h)-(2*r))
    --bottom right mid circle
    local xbl=(x+r)
    local ybl=(y+r)+((h)-(2*r))
    -----------------------------
    cairo_move_to (cr,xtl,ytl-r)
    cairo_line_to (cr,xtr,ytr-r)
    cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
    cairo_line_to (cr,xbr+r,ybr)
    cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
    cairo_line_to (cr,xbl,ybl+r)
    cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
    cairo_line_to (cr,xtl-r,ytl)
    cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
    cairo_close_path(cr)
    cairo_fill (cr)
    ------------------------------------------------------------
    cairo_surface_destroy(cs)
    cairo_destroy(cr)
    return ""
    end
    -- ###### calendar function ##################################################
    function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
    if conky_window == nil then return end
    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)
    --############################################################################
    if caltab.x==nil then
    caltab=loadstring("return" .. caltab)()
    end
    local cal_x=caltab.x
    local cal_y=caltab.y
    local tfont=caltab.tf        or "mono"
    local tfontsize=caltab.tfs    or 12
    local tc=caltab.tc        or 0xffffff
    local ta=caltab.ta        or 1
    local bfont=caltab.bf        or "mono"
    local bfontsize=caltab.bfs    or 12
    local bc=caltab.bc        or 0xffffff
    local ba=caltab.ba        or 1
    local hfont=caltab.hf        or "mono"
    local hfontsize=caltab.hfs    or 12
    local hc=caltab.hc        or 0xff0000
    local ha=caltab.ha        or 1
    local spacer=caltab.sp        or " "
    local gaph=caltab.gh        or 20
    local gapt=caltab.gt        or 15
    local gapl=caltab.gv        or 15
    local sday=caltab.sd        or 0
    local hstyle=caltab.hstyle    or 0
    --convert colors
    --local font=string.gsub(font,"_"," ")
    local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
    --main body text color
    local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
    --highlight text color
    local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
    --############################################################################
    --calendar calcs
    local year=os.date("%G")
    local today=tonumber(os.date("%d"))
    local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
    local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
    local feb=(os.difftime(t1,t2))/(24*60*60)
    local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
    local day=tonumber(os.date("%w"))+1-sday
    local day_num = today
    local remainder=day_num % 7
    local start_day=day-(day_num % 7)
    if start_day<0 then start_day=7+start_day end
    local month=os.date("%m")
    local mdays=monthdays[tonumber(month)]
    local x=mdays+start_day
    local dnum={}
    local dnumh={}
    if mdays+start_day<36 then
    dlen=35
    plen=29
    else
    dlen=42
    plen=36
    end
    for i=1,dlen do
        if i<=start_day then
        dnum[i]="  "
        else
        dn=i-start_day
            if dn=="nil" then dn=0 end
            if dn<=9 then dn=(spacer .. dn) end
            if i>x then dn="" end
            dnum[i]=dn
            dnumh[i]=dn
            if dn==(spacer .. today) or dn==today then
            dnum[i]=""
            end
            if dn==(spacer .. today) or dn==today then
            dnumh[i]=dn
            place=i
            else dnumh[i]="  "
            end
        end
    end--for
    cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tfontsize);
    cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
    local extents=cairo_text_extents_t:create()
    tolua.takeownership(extents)
    if hstyle==0 then
        if tonumber(sday)==0 then
        dys={"SU","MO","TU","WE","TH","FR","SA"}
        else
        dys={"MO","TU","WE","TH","FR","SA","SU"}
        end
        --draw calendar titles
    elseif hstyle==1 then
        if tonumber(sday)==0 then
        dys={"SU","MO"," ","  ","  ","FR","SA"}
        cairo_text_extents(cr,"MO",extents)
        local s=extents.x_advance+gaph
        local f=gaph*5
        local tdfont=caltab.tdf        or "mono"
        local tdfontsize=caltab.tdfs    or 12
        local tdc=caltab.tdc        or 0xffffff
        local tda=caltab.tda        or 1
        cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
        cairo_set_font_size (cr, tdfontsize);
        local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
        cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
        local insert=os.date("%b %y")
        cairo_text_extents(cr,insert,extents)
        local w=extents.x_advance
        cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
        cairo_show_text (cr,insert)
        cairo_stroke (cr)
        else
        dys={"MO","TU"," ","  ","  ","SA","SU"}
        cairo_text_extents(cr,"TU",extents)
        local s=extents.x_advance+gaph
        local f=gaph*5
        local tdfont=caltab.tdf        or "mono"
        local tdfontsize=caltab.tdfs    or 12
        local tdc=caltab.tdc        or 0xffffff
        local tda=caltab.tda        or 1
        cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
        cairo_set_font_size (cr, tdfontsize);
        local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
        cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
        local insert=os.date("%b %y")
        cairo_text_extents(cr,insert,extents)
        local w=extents.x_advance
        cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
        cairo_show_text (cr,insert)
        cairo_stroke (cr)
        end
    end
    --draw calendar titles
    for i=1,7 do
    cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tfontsize);
    cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
    cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
    cairo_show_text (cr, dys[i])
    cairo_stroke (cr)
    end
    --draw calendar body
    cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, bfontsize);
    cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
    for i=1,plen,7 do
    local fn=i
        for i=fn,fn+6 do
        cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
        cairo_show_text (cr, dnum[i])
        cairo_stroke (cr)
        end
    end
    --highlight
    cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, hfontsize);
    cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
    for i=1,plen,7 do
    local fn=i
        for i=fn,fn+6 do
        cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
        cairo_show_text (cr, dnumh[i])
        cairo_stroke (cr)
        end
    end
    --############################################################################
    caltab=nil
    dlen=nil
    plen=nil
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    return ""
    end-- end main function#######################################################
    Last edited by Sector11; August 26th, 2012 at 01:36 AM.

  10. #20390
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    @Petro Dawg
    i made this conky a while ago


    http://thepeachyblog.blogspot.com/20...antsy-vii.html

    the code is long and probably riddled with cruft
    Last edited by mrpeachy; August 26th, 2012 at 01:48 AM.

Page 2039 of 2291 FirstFirst ... 1039153919391989202920372038203920402041204920892139 ... 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
  •