Peppermint | Linux OS Community Forum
 
It is currently Sat Aug 24, 2019 7:22 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next
Author Message
 Post subject: Re: Conky scripts
PostPosted: Fri Sep 17, 2010 1:13 am 
Offline
User avatar

Joined: Thu Jun 17, 2010 11:07 pm
Posts: 141
Location: /home
sirkit77 wrote:
O...M...G...!!! Where and how can I get both?!?

Here is the conky script:
Code:
# p0z1tr0n's Conky Config

# Conky window features
alignment top_right
background no
border_width 1
default_color white
default_outline_color white
default_shade_color black
double_buffer yes
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans:size=8
gap_x 15
gap_y 15
#minimum_width 180
maximum_width 270
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_class Conky
own_window_colour 323232
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
stippled_borders 3
update_interval 1
uppercase no
use_spacer none


TEXT
${hr}
${color lightgreen}${font DejaVu Sans:size=10}Time & Date$color${font}
${alignc 10}${color ff4444}${font Arial Black:size=14}${time %H:%M}${font}
${alignc}${color 88aaff}${time %A %d %B %Y}$color
${hr}
${color lightgreen}${font DejaVu Sans:size=10}System Information$color${font}
${color 88aaff}Hostname: $color$nodename
${color 88aaff}Kernel: $color$kernel $machine
${color 88aaff}Uptime:$color $uptime
${hr}
${color lightgreen}${font DejaVu Sans:size=10}System Resources${color}${font}
${color 88aaff}CPU Usage:$color $cpu% ${color 3399cc}${cpubar 4}
${color 88aaff}RAM Usage:$color $mem/$memmax - $memperc%
${color 3399cc}${membar 4}
${color 88aaff}Swap Usage:$color $swap/$swapmax - $swapperc%
${color 3399cc}${swapbar 4}$color
${hr}
${color lightgreen}${font DejaVu Sans:size=10}Filesystem$font
${color 88aaff}Root: ${color green}Free: $color${fs_free /} ${color 0077ff}/ ${color 00ff88}Total size: $color${fs_size /}
${color 3399cc}${fs_bar 6 /}
${color 88aaff}Home: ${color green}Free: $color${fs_free /home} ${color 0077ff}/ ${color 00ff88}Total size: $color${fs_size /home}
${color 3399cc}${fs_bar 6 /home}
${color 88aaff}Data01: ${color green}Free: $color${fs_free /media/DATA01} ${color 0077ff}/ ${color 00ff88}Total size: $color${fs_size /media/DATA01}
${color 3399cc}${fs_bar 6 /media/DATA01}$color
${color 88aaff}Data02: ${color green}Free: $color${fs_free /media/DATA02} ${color 0077ff}/ ${color 00ff88}Total size: $color${fs_size /media/DATA02}
${color 3399cc}${fs_bar 6 /media/DATA02}$color
${hr}
${color lightgreen}${font DejaVu Sans:size=10}Networking$font ${alignr}${color cyan} IP:$color ${addr ppp0}
${color green}Up:$color ${upspeed ppp0}   ${alignr}     ${color red}Down:$color ${downspeed ppp0}
${color green}${upspeedgraph ppp0 25,100}   ${color red}${alignr}${downspeedgraph ppp0 25,100}$color
${color green}Total Up:$color ${totalup ppp0}  ${alignr}${color red}Down:$color ${totaldown ppp0}
${hr}
${color lightgreen}${font DejaVu Sans:size=10}Processes Info$color$font
${alignr}${color 88aaff}Processes:$color $processes  ${color green}Running:$color $running_processes

${color ff4444}Top CPU
${color cyan}Name ${alignr} PID   CPU   MEM
${color lightgrey} ${top name 1} ${alignr} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${alignr} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${alignr} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${alignr} ${top pid 4} ${top cpu 4} ${top mem 4}

${color ff4444}Top MEM
${color cyan}Name ${alignr} PID   CPU   MEM
${color lightgrey} ${top_mem name 1} ${alignr} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color lightgrey} ${top_mem name 2} ${alignr} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color lightgrey} ${top_mem name 3} ${alignr} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${color lightgrey} ${top_mem name 4} ${alignr} ${top_mem pid 4} ${top_mem cpu 4} ${top_mem mem 4}
${hr}

You have to edit the gap_x and gap_y to match the conky to the wallpaper according to your desktop resolution.

And for the wallpaper, you can get it from here:
http://picasaweb.google.com/104081870887447125418/MyAlbum#
Happy conkying sir,
Cheers.

_________________
Linux User #527336
Motorbike, Openbox, and Coffee Addict.
Twitter: http://twitter.com/muzieca_zone


Top
 Profile  
 
 

 Post subject: Re: Conky scripts
PostPosted: Fri Sep 24, 2010 8:06 pm 
Offline
User avatar

Joined: Thu Jun 17, 2010 11:07 pm
Posts: 141
Location: /home
Conky ring. Found it somewhere on Arch Linux Forum. Modifying it a little bit.
Image
here is the conky script:
Code:
# — Conky settings — #
#background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 1024
imlib_cache_size 0

# — Window specifications — #

own_window yes
#own_window_type override#
own_window_type normal
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

minimum_size 200 800
maximum_width 800

alignment top_right
gap_x 15
gap_y 15

# — Graphics settings — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# — Text settings — #
use_xft yes
xftfont Droid Sans:size=10
xftalpha 0.5

uppercase no

default_color 3E3E3E
color1 D23000

# — Lua Load — #
lua_load ~/.conky/brush_rings.lua
lua_draw_hook_pre clock_rings

TEXT
${voffset 8}${color 3399FF}${font Droid Sans:size=16}${time %A}${font}${voffset -8}${alignr 50}${color FFFFFF}${font Droid Sans:size=32}${time %e}${font}
${color FFFFFF}${voffset -30}${color 3399FF}${font Droid Sans:size=18}${time %b}${font}${voffset -3} ${color FFFFFF}${font Droid Sans:size=20}${time %Y}${font}${color 3399FF}${hr}
${voffset 140}${font Droid Sans:size=10}${alignr}muzieca${font}
${font Droid Sans:size=12}${color FFFFFF}${alignr}${acpitemp}°C${font}
${color 3399FF}${voffset 6}${sysname}${alignr}${kernel} ${machine}
Uptime:$alignr${color FFFFFF}$uptime_short
${color FFFFFF}${goto 25}${voffset 35}${cpu cpu0}%
${color 3399FF}${goto 25}CPU
${color FFFFFF}${goto 50}${voffset 23}${memperc}%
${color 3399FF}${goto 50}RAM
${color FFFFFF}${goto 75}${voffset 23}${swapperc}%
${color 3399FF}${goto 75}SWAP
${color FFFFFF}${goto 100}${voffset 23}${fs_used_perc /}%
${color 3399FF}${goto 100}Disk
${color FFFFFF}${goto 100}${voffset 25}${upspeed ppp0}
${color FFFFFF}${goto 100}${voffset 0}${downspeed ppp0}
${color 3399FF}${goto 45}${color 3399FF}Total up:${color FFFFFF}${totalup ppp0}
${color 3399FF}${goto 45}${color 3399FF}Total Down:${color FFFFFF}${totaldown ppp0}
${color FFFFFF}${goto 45}${voffset 35}${fs_used_perc /media/DATA01}%
${color 3399FF}${goto 35}Data01
${color FFFFFF}${goto 140}${voffset -33}${fs_used_perc /media/DATA02}%
${color 3399FF}${goto 130}Data02

#       ${voffset 5}${color}${font Droid Sans:size=17}&${font}${color slate grey} MusicPlayer:
#       ${color e0e0e0}${font Droid Sans:size=9}${exec rhythmbox-client --no-start --print-playing-format %tt} -
#       ${exec rhythmbox-client --no-start --print-playing-format %aa}  ${color adadad}#${font Droid Sans:size=8}

and this is the lua script:
Code:
--[[
Clock Rings by londonali1010 (2009) , mod by arpinux

This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.

IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.

To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
    lua_load ~/scripts/clock_rings.lua
    lua_draw_hook_pre clock_rings
   
Changelog:
+ v1.0 -- Original release (30.09.2009)
]]

settings_table = {
    {
            name='time',
            arg='%I',
            max=12,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=0.4,
            x=100, y=150,
            radius=50,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
    {
            name='time',
            arg='%M',
            max=60,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=0.4,
            x=100, y=150,
            radius=56,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
        {
            name='time',
            arg='%S',
            max=60,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=0.6,
            x=100, y=150,
            radius=62,
            thickness=5,
            start_angle=0,
            end_angle=360
        },
        {
            name='time',
            arg='%d',
            max=31,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=0.8,
            x=100, y=150,
            radius=70,
            thickness=5,
            start_angle=-90,
            end_angle=90
    },
        {
            name='time',
            arg='%m',
            max=12,
            bg_colour=0xffffff,
            bg_alpha=0.1,
            fg_colour=0x3399cc,
            fg_alpha=1,
            x=100, y=150,
            radius=76,
            thickness=5,
            start_angle=-90,
            end_angle=90
        },
    {
            name='cpu',
            arg='cpu0',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffff00,
            fg_alpha=0.4,
            x=55, y=310,
            radius=25,
            thickness=5,
            start_angle=-90,
            end_angle=180
    },
    {
            name='memperc',
            arg='',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x33ccff,
            fg_alpha=0.8,
            x=80, y=365,
            radius=25,
            thickness=5,
            start_angle=-90,
            end_angle=180
    },
    {
            name='swapperc',
            arg='',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x33ccff,
            fg_alpha=0.8,
            x=105, y=423,
            radius=25,
            thickness=5,
            start_angle=-90,
            end_angle=180
    },
    {
            name='fs_used_perc',
            arg='/',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x3399cc,
            fg_alpha=0.3,
            x=130, y=480,
            radius=25,
            thickness=5,
            start_angle=-90,
            end_angle=180
    },
    {
            name='upspeedf',
            arg='ppp0',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffff33,
            fg_alpha=0.3,
            x=155, y=540,
            radius=25,
            thickness=4,
            start_angle=-90,
            end_angle=180
    },
    {
            name='downspeedf',
            arg='ppp0',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffff44,
            fg_alpha=0.3,
            x=155, y=540,
            radius=20,
            thickness=4,
            start_angle=-90,
            end_angle=180
    },
    {
            name='fs_used_perc',
            arg='/media/DATA01',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0x3399cc,
            fg_alpha=0.8,
            x=55, y=670,
            radius=35,
            thickness=7,
            start_angle=-90,
            end_angle=150
    },
    {
            name='fs_used_perc',
            arg='/media/DATA02',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xff4444,
            fg_alpha=0.8,
            x=150, y=670,
            radius=35,
            thickness=7,
            start_angle=-90,
            end_angle=150
    },
}

-- Use these settings to define the origin and extent of your clock.

clock_r=65

-- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.

clock_x=100
clock_y=150

show_seconds=true

require 'cairo'

function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function draw_ring(cr,t,pt)
    local w,h=conky_window.width,conky_window.height
   
    local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

    local angle_0=sa*(2*math.pi/360)-math.pi/2
    local angle_f=ea*(2*math.pi/360)-math.pi/2
    local t_arc=t*(angle_f-angle_0)

    -- Draw background ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    cairo_set_line_width(cr,ring_w)
    cairo_stroke(cr)
   
    -- Draw indicator ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    cairo_stroke(cr)       
end

function draw_clock_hands(cr,xc,yc)
    local secs,mins,hours,secs_arc,mins_arc,hours_arc
    local xh,yh,xm,ym,xs,ys
   
    secs=os.date("%S")   
    mins=os.date("%M")
    hours=os.date("%I")
       
    secs_arc=(2*math.pi/60)*secs
    mins_arc=(2*math.pi/60)*mins+secs_arc/60
    hours_arc=(2*math.pi/12)*hours+mins_arc/12
       
    -- Draw hour hand
   
    xh=xc+0.7*clock_r*math.sin(hours_arc)
    yh=yc-0.7*clock_r*math.cos(hours_arc)
    cairo_move_to(cr,xc,yc)
    cairo_line_to(cr,xh,yh)
   
    cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
    cairo_set_line_width(cr,5)
    cairo_set_source_rgba(cr,0.2,0.6,1,0.4)
    cairo_stroke(cr)
   
    -- Draw minute hand
   
    xm=xc+clock_r*math.sin(mins_arc)
    ym=yc-clock_r*math.cos(mins_arc)
    cairo_move_to(cr,xc,yc)
    cairo_line_to(cr,xm,ym)
   
    cairo_set_line_width(cr,3)
    cairo_stroke(cr)
   
    -- Draw seconds hand
   
    if show_seconds then
        xs=xc+clock_r*math.sin(secs_arc)
        ys=yc-clock_r*math.cos(secs_arc)
        cairo_move_to(cr,xc,yc)
        cairo_line_to(cr,xs,ys)
   
        cairo_set_line_width(cr,1)
        cairo_stroke(cr)
    end
end

function conky_clock_rings()
    local function setup_rings(cr,pt)
        local str=''
        local value=0
       
        str=string.format('${%s %s}',pt['name'],pt['arg'])
        str=conky_parse(str)
       
        value=tonumber(str)
        pct=value/pt['max']
       
        draw_ring(cr,pct,pt)
    end
   
    -- Check that Conky has been running for at least 5s

    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)   
   
    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)
   
    if update_num>5 then
        for i in pairs(settings_table) do
            setup_rings(cr,settings_table[i])
        end
    end
   
    draw_clock_hands(cr,clock_x,clock_y)
end

the method is just the same as my previous post.
cheers.

_________________
Linux User #527336
Motorbike, Openbox, and Coffee Addict.
Twitter: http://twitter.com/muzieca_zone


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Sun Oct 03, 2010 11:57 am 
Offline
User avatar

Joined: Thu Jun 17, 2010 11:07 pm
Posts: 141
Location: /home
I love having Transformers logo in conky. :lol:
Image
This fonts are needed for the script.
http://www.dafont.com/robofan-symbol.font
http://www.dafont.com/style-bats.font
http://www.dafont.com/pizzadude-bullets.font
http://www.fontspace.com/curtis-clark/pie-charts-for-maps
And here is the script:
Code:
# Use Xft?
use_xft yes
xftfont DejaVu Sans: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 200 0
#maximum_width 200

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_margin 5

# border width
border_width 1

# Default colors and also border colors
default_color grey
#default_shade_color black
#default_outline_color grey
own_window_colour grey

# 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 15
gap_y 15

# Subtract file system buffers from used memory?
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

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none

TEXT
SYSTEM ${hr 2}

${alignc 35}${font Robofan Symbols:size=50}b${font}
${voffset 2}${font StyleBats:size=16}i${font}   Kernel:  ${alignr}${kernel}
${font StyleBats:size=16}A${font}   CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
${font StyleBats:size=16}g${font}   RAM: $memperc% ${alignr}${membar 8,60}
${font StyleBats:size=16}j${font}   SWAP: $swapperc% ${alignr}${swapbar 8,60}
${font StyleBats:size=16}q${font}   Uptime: ${alignr}${uptime}

DATE ${hr 2}
${alignc 17}${font Arial Black:size=16}${time %H:%M}${font}
${alignc}${time %A %d %B %Y}

HD ${hr 2}
${voffset 4}${font Pie charts for maps:size=14}7${font}   ${voffset -5}Root:
${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
${font Pie charts for maps:size=14}7${font}   ${voffset -5}Home:
${voffset 4}${fs_used /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}
${font Pie charts for maps:size=14}8${font}   ${voffset -5}DATA01:
${voffset 4}${fs_used /media/DATA01}/${fs_size /media/DATA01} ${alignr}${fs_bar 8,60 /media/DATA01}
${font Pie charts for maps:size=14}8${font}   ${voffset -5}DATA02:
${voffset 4}${fs_used /media/DATA02}/${fs_size /media/DATA01} ${alignr}${fs_bar 8,60 /media/DATA02}

NETWORK ${hr 2}
${voffset 4}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed wlan0} kb/s ${alignr}${upspeedgraph ppp0 8,60 BEBEBE BEBEBE}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed wlan0} kb/s ${alignr}${downspeedgraph ppp0 8,60 BEBEBE BEBEBE}
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Upload: ${alignr}${totalup wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Download: ${alignr}${totaldown wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Local Ip: ${alignr}${addr ppp0}

PROCESSES ${hr 2}
NAME $alignr PID    CPU
${top name 1} $alignr ${top pid 1} ${top cpu 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3}
${top name 4} $alignr ${top pid 4} ${top cpu 4}
${top name 5} $alignr ${top pid 5} ${top cpu 5}
${top name 6} $alignr ${top pid 5} ${top cpu 6}
${top name 7} $alignr ${top pid 5} ${top cpu 7}

Cheers.

_________________
Linux User #527336
Motorbike, Openbox, and Coffee Addict.
Twitter: http://twitter.com/muzieca_zone


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Thu Jan 06, 2011 1:33 am 
Offline

Joined: Wed Jan 05, 2011 11:31 pm
Posts: 2
I guess I'm a bit late to the party.

Image

Code:
#***************************************************************************************************************************
#
# Special thanks to the #! conky thread for all the information and ideas for how to format my first conky script.
# URL: http://crunchbanglinux.org/forums/topic/59/my-conky-config/
#
#***************************************************************************************************************************
# In order for the Weather part of this script to work you'll need to install conky forecast.
# Information on how to do this is located at:
# http://ubuntuforums.org/showthread.php?t=869328.
#
# Also necessary are a few fonts. A great place for first timers to look (or if you just want to install the fonts) is:
# http://gnome-look.org/content/show.php?content=121237 
#***************************************************************************************************************************
# Good Luck!
#    Sincerely,
#      MrCleanWithHair
#***************************************************************************************************************************
# The Script starts.....now
#
#
# Use Xft?
use_xft yes
xftfont OFL Sorts Mill Goudy: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 override
own_window_class conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
background no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
minimum_size 180 0
#maximum_width 200

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 5

# border width
border_width 1

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white
own_window_colour white
color1 white

# 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 10
gap_y 5

# Subtract file system buffers from used memory?
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

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none

#
# After "TEXT" we begin the specific output of conky.
#

TEXT
#******************************************************************************************************************
# This is the power module of the output. It contains Kernel, Battery, and Uptime.
#******************************************************************************************************************
${hr 2}
${font Goudy Bookletter 1911:style=Bold}POWER${font}
${hr 2}
#${voffset 2}${font StyleBats:size=16}i${font}   Kernel:  ${alignr}${kernel}
${font Webdings:size=16}~${font}  Battery: ${battery_percent BAT0}% ${alignr}${battery_bar 8,60 BAT0}
${font StyleBats:size=16}q${font}   Uptime: ${alignr}${uptime}
${hr 2}
#****************************************************************************************************************************
#
#****************************************************************************************************************************
# This is the networking module of the output. It contains Up and Down speed, Up and Down data totals, signal strength, and
# local IP address.
#****************************************************************************************************************************
${font Goudy Bookletter 1911:style=Bold}WIRELESS${font}
${hr 2}
${voffset 4}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed wlan0} ${alignr}${upspeedgraph wlan0 8,60 000000 000000}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed wlan0} ${alignr}${downspeedgraph wlan0 8,60 000000 000000}
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Upload: ${alignr}${totalup wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Download: ${alignr}${totaldown wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}Z${font}   Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Local Ip: ${alignr}${addr wlan0}
${hr 2}
#****************************************************************************************************************************
#
#****************************************************************************************************************************
# This is the thermodynamics module of the output. It contains internal temperature.
#****************************************************************************************************************************
${font Goudy Bookletter 1911:style=Bold}TEMPS${font}
${hr 2}
${font StyleBats:size=16}l${font}  Temperature: ${alignr}${acpitemp}C
${hr 2}
#****************************************************************************************************************************
#
#****************************************************************************************************************************
# This is the HD module of the output. It contains information on the hard drives.
# I feel like most of my commenting is kind of stupid. Why am I wasting my time?
#****************************************************************************************************************************
${font Goudy Bookletter 1911:style=Bold}HDz${font}
${hr 2}
${font Pie charts for maps:size=14}7${font}   ${voffset -5}Home:
${voffset 4}${fs_used /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}
${hr 2}
#****************************************************************************************************************************
#
#****************************************************************************************************************************
# This is the "Brains" module of the output. It contains information about CPU load, ram and swap usage and top processes.
#****************************************************************************************************************************
${font Goudy Bookletter 1911:style=Bold}Brains${font}
${hr 2}
${font StyleBats:size=16}A${font}   CPU: ${cpu cpu0}% ${alignr}${cpubar cpu0 8,60}
${font StyleBats:size=16}g${font}   RAM: $memperc% ${alignr}${membar 8,60}
${font StyleBats:size=16}j${font}   SWAP: $swapperc% ${alignr}${swapbar 8,60}
${hr 2}
NAME $alignr PID    CPU
${top name 1} $alignr ${top pid 1} ${top cpu 1}
${top name 2} $alignr ${top pid 2} ${top cpu 2}
${top name 3} $alignr ${top pid 3} ${top cpu 3}
${hr 2}
#****************************************************************************************************************************
#
#****************************************************************************************************************************
# This is the weather module. It contains information about the weather pulled from weather(dot)com. Make sure you have the
# location code for YOUR location. See http://ubuntuforums.org/showthread.php?t=869328 for more help configuring this part of
# the script. Another great reference is: http://gnome-look.org/content/show.php?content=121237. If you don't want to deal
# with setting up the weather comment it out or delete it. No hard feelings.
#****************************************************************************************************************************
${font Goudy Bookletter 1911:style=Bold}WEATHER${font}
${hr 2}
Location: ${alignr}${execi 3600 conkyForecast --location=USMD0010 --datatype=CN}
Conditions: ${alignr}${execi 3600 conkyForecast --location=USMD0010 --datatype=CC}
Temp: ${alignr}${execi 3600 conkyForecast --location=USMD0010 --datatype=HT}
Extended Forecast:
${font ConkyWeather:size=40}${execi 3600 conkyForecast --startday=1 --endday=3 --location=USMD0010 --datatype=WF}${font}
${alignc}${execi 3600 conkyForecast --location=USMD0010 --startday=1 --endday=3 --spaces=15 --datatype=HT}
${execi 3600 conkyForecast --location=USMD0010 --startday=1 --endday=3 --spaces=5 --datatype=DW}
${hr 2}
#****************************************************************************************************************************




Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Thu Jan 06, 2011 10:26 am 
Offline
User avatar

Joined: Tue May 25, 2010 9:00 am
Posts: 744
Location: Atlanta Ga
Never too late. This is an ongoing thread. I should really get back to messing with conky, I haven't even touched it in months.

_________________
Peppermint Forums Moderator
Asus Eee PC | Pmint2 | Win XP | Arch (Fluxbox)
Toshiba Sat. P15 | Testing Machine
Custom AMD Desktop | Pmint2 64-bit | Win 7
My Site | Google+| Facebook | Twitter: @eng1nerd


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Thu Jan 06, 2011 2:36 pm 
Offline
User avatar

Joined: Tue Jan 04, 2011 10:50 am
Posts: 889
Very nice layout and nicely commented script to boot MrClean
Bet it goes great with what I believe is tint2
well done


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Tue Apr 05, 2011 1:04 am 
Offline

Joined: Wed Jan 05, 2011 11:31 pm
Posts: 2
Thanks for the thanks about the comments. When I was looking for conky scripts I liked I couldn't help but notice that none of them were commented...which makes it really hard to figure out what is going on.


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Sun May 22, 2011 6:25 pm 
Offline
User avatar

Joined: Wed Aug 18, 2010 12:29 pm
Posts: 58
I haven't played with Conky since I left Crunchbang... but those folks take it to another level.

_________________
You know, if you were *really* going to starve, you'd be justified in writing proprietary software. ~ rms


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Mon May 30, 2011 2:26 am 
Offline
User avatar

Joined: Thu Jun 17, 2010 11:07 pm
Posts: 141
Location: /home
I'm posting this one on Crunchbang forum, and i guess i'll post it here too. :D
Image
conkyrc:
Code:
# — Conky settings — #
#background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 1024
imlib_cache_size 0

# — Window specifications — #

own_window yes
#own_window_type override#
own_window_type normal
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

minimum_size 800 800
maximum_width 800

alignment top_middle
gap_x 1
gap_y 50

# — Graphics settings — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# — Text settings — #
use_xft yes
xftfont Terminus:size=9
xftalpha 0.5

uppercase no

default_color 3E3E3E
color1 D23000

# — Lua Load — #
lua_load ~/.conky/muzi_rings.lua
lua_draw_hook_pre clock_rings

TEXT

${color FFFFFF}${goto 295}${voffset 450}${cpu cpu0}%
${color 3399FF}${goto 290}CPU
${color FFFFFF}${goto 495}${voffset -22}${memperc}%
${color 3399FF}${goto 495}RAM
${color FFFFFF}${goto 390}${voffset -230}${fs_used_perc /home}%
${color 3399FF}${goto 388}Home
${color FFFFFF}${goto 390}${voffset 235}${fs_used_perc /}%
${color 3399FF}${goto 388}Root
${color FFFFFF}${goto 292}${voffset -235}${upspeed ppp0}
${color 3399FF}${goto 293}Up
${color FFFFFF}${goto 495}${voffset -23}${downspeed ppp0}
${color 3399FF}${goto 495}Down
${color FFFFFF}${goto 211}${voffset 56}${fs_used_perc /mnt/DATA01}%
${color 3399FF}${goto 203}Data01
${color FFFFFF}${goto 571}${voffset -24}${fs_used_perc /mnt/DATA02}%
${color 3399FF}${goto 563}Data02

#       ${voffset 5}${color}${font Terminus:size=17}&${font}${color slate grey} MusicPlayer:
#       ${color e0e0e0}${font Terminus:size=9}${exec rhythmbox-client --no-start --print-playing-format %tt} -
#       ${exec rhythmbox-client --no-start --print-playing-format %aa}  ${color adadad}#${font Terminus:size=8}


muzi_rings.lua:
Code:
--[[
Clock Rings by londonali1010 (2009) , mod by arpinux
Modified by muzieca
This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.

IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.

To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
   lua_load ~/scripts/clock_rings.lua
   lua_draw_hook_pre clock_rings
   
Changelog:
+ v1.0 -- Original release (30.09.2009)
]]

settings_table = {
   {
           name='time',
           arg='%S',
           max=60,
           bg_colour=0xffffff,
           bg_alpha=0.1,
           fg_colour=0x3399cc,
           fg_alpha=0.4,
           x=400, y=400,
           radius=56,
           thickness=5,
           start_angle=0,
           end_angle=360
       },
       {
           name='time',
           arg='%M.%S',
           max=60,
           bg_colour=0xffffff,
           bg_alpha=0.1,
           fg_colour=0x3399cc,
           fg_alpha=0.6,
           x=400, y=400,
           radius=62,
           thickness=5,
           start_angle=0,
           end_angle=360
       },
       {
           name='time',
           arg='%d',
           max=31,
           bg_colour=0xffffff,
           bg_alpha=0.1,
           fg_colour=0x3399cc,
           fg_alpha=0.8,
           x=400, y=400,
           radius=70,
           thickness=5,
           start_angle=10,
           end_angle=170
   },
       {
           name='time',
           arg='%m',
           max=12,
           bg_colour=0xffffff,
           bg_alpha=0.1,
           fg_colour=0x3399cc,
           fg_alpha=1,
           x=400, y=400,
           radius=70,
           thickness=5,
           start_angle=190,
           end_angle=350
       },
   {
           name='cpu',
           arg='cpu0',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0xffff00,
           fg_alpha=0.4,
           x=370, y=400,
           radius=80,
           thickness=10,
           start_angle=-160,
           end_angle=-100
   },
   {
           name='memperc',
           arg='',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0x33ccff,
           fg_alpha=0.8,
           x=430, y=400,
           radius=80,
           thickness=10,
           start_angle=100,
           end_angle=160
   },
   {
           name='fs_used_perc',
           arg='/home',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0x33ee55,
           fg_alpha=0.8,
           x=400, y=470,
           radius=170,
           thickness=25,
           start_angle=-20,
           end_angle=20
   },
   {
           name='fs_used_perc',
           arg='/',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0x3399cc,
           fg_alpha=0.8,
           x=400, y=330,
           radius=170,
           thickness=25,
           start_angle=160,
           end_angle=200
   },
   {
           name='upspeedf',
           arg='ppp0',
           max=70,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0xffff33,
           fg_alpha=0.3,
           x=370, y=400,
           radius=80,
           thickness=10,
           start_angle=-80,
           end_angle=-20
   },
   {
           name='downspeedf',
           arg='ppp0',
           max=70,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0xccff33,
           fg_alpha=0.3,
           x=430, y=400,
           radius=80,
           thickness=10,
           start_angle=20,
           end_angle=80
   },
   {
           name='fs_used_perc',
           arg='/mnt/DATA01',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0x3399cc,
           fg_alpha=0.8,
           x=380, y=400,
           radius=200,
           thickness=30,
           start_angle=220,
           end_angle=320
   },
   {
           name='fs_used_perc',
           arg='/mnt/DATA02',
           max=100,
           bg_colour=0xffffff,
           bg_alpha=0.2,
           fg_colour=0xff4444,
           fg_alpha=0.8,
           x=420, y=400,
           radius=200,
           thickness=30,
           start_angle=40,
           end_angle=140
   },
}



require 'cairo'

function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function draw_ring(cr,t,pt)
    local w,h=conky_window.width,conky_window.height
   
    local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

    local angle_0=sa*(2*math.pi/360)-math.pi/2
    local angle_f=ea*(2*math.pi/360)-math.pi/2
    local t_arc=t*(angle_f-angle_0)

    -- Draw background ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    cairo_set_line_width(cr,ring_w)
    cairo_stroke(cr)
   
    -- Draw indicator ring

    cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    cairo_stroke(cr)       
end

function conky_clock_rings()
    local function setup_rings(cr,pt)
        local str=''
        local value=0
       
        str=string.format('${%s %s}',pt['name'],pt['arg'])
        str=conky_parse(str)
       
        value=tonumber(str)
        pct=value/pt['max']
       
        draw_ring(cr,pct,pt)
    end
   
    -- Check that Conky has been running for at least 5s

    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)   
   
    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)
   
    if update_num>5 then
        for i in pairs(settings_table) do
            setup_rings(cr,settings_table[i])
        end
    end
end

_________________
Linux User #527336
Motorbike, Openbox, and Coffee Addict.
Twitter: http://twitter.com/muzieca_zone


Top
 Profile  
 
 Post subject: Re: Conky scripts
PostPosted: Sat Jul 23, 2011 2:20 am 
Offline

Joined: Sat Jul 23, 2011 2:02 am
Posts: 2
Aging Technogeek wrote:
Here's my .conkyrc.

Code:
background yes
font Snap.se:size=8
xftfont Snap.se:size=8
use_xft yes
xftalpha 0.1
update_interval 1.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
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders no
minimum_size 206 5
maximum_width 206
default_color ffffff
default_shade_color 000000
default_outline_color 000000
alignment top_right
gap_x 6
gap_y 55
no_buffers yes
cpu_avg_samples 2
override_utf8_locale no
uppercase no # set to yes if you want all text to be in uppercase
use_spacer no

TEXT
${font LCD:style=Bold:pixelsize=40}${alignc}${time %H:%M:%S}${font Snap.se:size=8}

${font Aerial:style=Bold:pixelsize=14}SYSTEM${font Snap.se:size=10} ${hr 1 }

Hostname: $alignr$nodename
Kernel: $alignr$kernel
Uptime: $alignr$uptime
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg


CPU       ${alignc} ${freq}MHz / ${acpitemp}C ${alignr}(${cpu cpu1}%)
${cpubar 4 cpu1}
${cpugraph cccccc ffffff}

RAM ${alignr}$mem / $memmax ($memperc%)
${membar 4}

SWAP ${alignr}$swap / $swapmax ($swapperc%)
${swapbar 4}

Highest CPU $alignr CPU% MEM%
${hr 1}
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}

Highest MEM $alignr CPU% MEM%
${hr 1}
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}



${font Aerial:style=Bold:pixelsize=14}FILESYSTEM ${font Snap.se:size=10}${hr 1}

Root: ${alignr}${fs_free /} / ${fs_size /}
${fs_bar 4 /}

Home: ${alignr}${fs_free /home} / ${fs_size /home}
${fs_bar 4 /home}

#Data: ${alignr}${fs_free /media/Data} / ${fs_size /media/Data}
${fs_bar 4 /media/Data}



${font Aerial:style=Bold:pixelsize=14}NETWORK eth0 ${font Snap.se:size=10}${hr 1}

Down ${downspeed eth0} k/s ${alignr}Up ${upspeed eth0} k/s
${downspeedgraph eth0 25,107 cccccc ffffff} ${alignr}${upspeedgraph eth0 25,107 cccccc ffffff}
Total ${totaldown eth0} ${alignr}Total ${totalup eth0}


and screenshots

Image

close up (same conky from my Mint install)

Image



I know this over a year old but was wondering. What do the numbers beside Load represent? Says 0.92 0.47 etc.

I am thinking it should be obvious, but it has me stumped. (Not that hard to do).

Very cool layout, thanx for sharing it.

Have a good one,
geo


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Powered by php B.B. © 2000, 2002, 2005, 2007 php B.B. Group
Template made by DEVPPL