- Home
- Welcome
- Bienvenido
- Benvenuto
- Bienvenue
- Gallery
- 2009
- By: Bruce
- By: Uncertain
- By: steelcap
- By: Crinos512
- By: Jameshardy88
- By: Delvien
- By: londonali1010
- By: dmillerct
- By: Scarf
- By: Craig Watson
- By: AoSteve
- By: micheal.h4lios
- By: deegan
- By: arpinux
- By: Sarai the Geek
- By: puma303
- By: LostDakota
- BY: aymara
- By: searchOne
- By: 5BallJuggler
- By: proxess
- By: Hanna
- By: Proto
- By: mrpeachy
- By: miegiel
- 2010
- 2009
A while back I grabbed a set of files and an image from searchOne to put up here. I still have them, but they will come second.
What you are looking at is his latest conky using londonali1010’s scripts for rings. Oh and the trick to get a $hr “type line” on part of the width of his conky. Beautiful work searchOne!
The conky file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | background no use_xft yes xftfont terminus:size=8 xftalpha 0.2 update_interval 1 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 own_window_class conky double_buffer yes no_buffers yes cpu_avg_samples 2 net_avg_samples 2 use_spacer none draw_shades no draw_outline no draw_borders no draw_graph_borders no default_color white alignment tl uppercase no text_buffer_size 2048 imlib_cache_size 0 minimum_size 1330 10 gap_y 10 # — Lua Load — # lua_load ~/conky/lua/rings.lua lua_draw_hook_pre ring_stats TEXT ${voffset 55}${goto 480}${diskiograph 50,300 FFFF00 FF0000 -t}${voffset -110} ${voffset 98}${goto 173}${color 1E90FF}${cpubar cpu5 2,1015}${color} ${voffset -40}${goto 240}${font Zekton:size=14}CrunchBang \#! 9.04.01${font Zekton:size=10}${voffset 1} ${voffset 10}${goto 240}Conky ${conky_version} ${goto 480}Kernel: ${kernel} ${goto 240}${exec whoami} @ $nodename $machine ${goto 480}Uptime: ${uptime} ${goto 240}Desktop: ${desktop_number} - ${desktop}${goto 480}CPU Temp: ${acpitemp}${offset -2} °C ${goto 240}HDD Temp: ${hddtemp /dev/sda}${offset -2} °C ${goto 480}Grafik Temp: ${nvidia temp}${offset -2} °C${if_existing /proc/net/route wlan0}${goto 700}WLAN: ${addrs wlan0}${endif}${if_existing /proc/net/route eth0}${goto 700}LAN: ${addrs eth0}${endif} ${goto 240}${font Zekton:Bold:size=10}Name top${goto 370}time${goto 450}cpu${goto 500}mem${goto 600}${font Zekton:Bold:size=10}Name top-io${goto 730}time${goto 820}mem${font Zekton:size=8} ${color red}${goto 240}${top name 1} ${goto 370}${top time 1}${goto 450}${top cpu 1}${goto 500}${top mem 1} ${goto 600}${top_io 1}${top_io name 1}${goto 730}${top_io time 1}${goto 820}${top_io mem 1} ${color}${goto 940}${execi 99999 cat /proc/cpuinfo | grep "model name" -m1 | cut -d":" -f2 | cut -d" " -f2-} ${goto 240}${top name 2} ${goto 370}${top time 2}${goto 450}${top cpu 2}${goto 500}${top mem 2}${color} ${top_io 2} ${goto 600}${top_io name 2}${goto 730}${top_io time 2}${goto 820}${top_io mem 2} ${goto 940}${execpi 3600 /home/search/conkynv.sh} ${goto 240}${top name 3} ${goto 370}${top time 3}${goto 450}${top cpu 3}${goto 500}${top mem 3}${color} ${top_io 3} ${goto 600}${top_io name 3}${goto 730}${top_io time 3}${goto 820}${top_io mem 3} ${if_existing /proc/net/route wlan0}${voffset -210}${goto 810}${font DTPDingbats:size=18}${color green}C${font Zekton:size=12}${downspeed wlan0}${color} ${voffset -15}${goto 810}${font DTPDingbats:size=18}${color red}D${font Zekton:size=12}${upspeed wlan0}${color}${endif} ${if_existing /proc/net/route eth0}${voffset -210}${goto 810}${font DTPDingbats:size=18}${color green}C${font Zekton:size=12}${downspeed wlan0}${color} ${voffset -15}${goto 810}${font DTPDingbats:size=18}${color red}D${font Zekton:size=12}${upspeed wlan0}${color}${endif} ${font} ${voffset -130} ${goto 90}${color 1E90FF}RAM: ${memperc}% ${goto 90}${color FF0000}CPU-1: ${cpu cpu0}% ${goto 90}${color FF0000}CPU-2: ${cpu cpu1}% ${goto 90}${color FFFF00}BAT: ${battery_percent BAT0}% ${goto 90}${color 00FF00}Disk: ${fs_used_perc /}%${color} ${voffset -45}${goto 1210}${font Zekton:size=10}${time %H:%M:%S} ${voffset -80}${color CDCD00}${goto 1010}${font Zekton:Bold:size=10}${time %A} ${goto 930}${font Zekton:size=16}${time %_d %B %Y}${color} ${font LiberationMono:Bold:size=10} ${voffset -10}${execpi 60 DJS=`date +%_d`; cal -m | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${goto 930} /' | sed /" $DJS "/s/" $DJS "/" "'${color orange}'"$DJS"'${color}'" "/} ${voffset -300} |
and rings.lua
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | --[[ Ring Meters by londonali1010 (2009) This script draws percentage meters as rings. It is fully customisable; all options are described in the 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/rings.lua lua_draw_hook_pre ring_stats Changelog: + v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009) + v1.0 -- Original release (28.09.2009) ]] settings_table = { { -- Edit this table to customise your rings. -- You can create more rings simply by adding more elements to settings_table. -- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'. name='cpu', -- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''. arg='cpu0', -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100. max=100, -- "bg_colour" is the colour of the base ring. bg_colour=0xCDCDC1, -- "bg_alpha" is the alpha value of the base ring. bg_alpha=0.5, -- "fg_colour" is the colour of the indicator part of the ring. fg_colour=0xFF0000, -- "fg_alpha" is the alpha value of the indicator part of the ring. fg_alpha=0.8, -- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window. x=120, y=120, -- "radius" is the radius of the ring. radius=81, -- "thickness" is the thickness of the ring, centred around the radius. thickness=10, -- "angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative. angle=90 }, { name='cpu', arg='cpu1', max=100, bg_colour=0xCDCDC1, bg_alpha=0.5, fg_colour=0xFF0000, fg_alpha=0.5, x=120, y=120, radius=93, thickness=10, angle=90 }, { name='memperc', arg='', max=100, bg_colour=0xffffff, bg_alpha=0.2, fg_colour=0x1E90FF, fg_alpha=0.5, x=120, y=120, radius=102.5, thickness=5, angle=90 }, { name='fs_used_perc', arg='/', max=100, bg_colour=0xffffff, bg_alpha=0.1, fg_colour=0x00FF00, fg_alpha=0.5, x=120, y=120, radius=58, thickness=10, angle=90 }, { name='battery_percent', arg='BAT0', max=100, bg_colour=0xffffff, bg_alpha=0.2, fg_colour=0xFFFF00, fg_alpha=1, x=120, y=120, radius=70, thickness=10, angle=90 }, { name='time', arg='+%S', max=60, bg_colour=0xE3E3E3, bg_alpha=0.1, fg_colour=0xFFFF00, fg_alpha=0.7, x=1235, y=120, radius=70, thickness=4, angle=0 }, { name='time', arg='+%M', max=60, bg_colour=0xE3E3E3, bg_alpha=0.1, fg_colour=0x00CD00, fg_alpha=0.7, x=1235, y=120, radius=64, thickness=7, angle=0 }, { name='time', arg='+%H', max=24, bg_colour=0xE3E3E3, bg_alpha=0.1, fg_colour=0xffffff, fg_alpha=0.7, x=1235, y=120, radius=52, thickness=14, angle=0 }, } 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(t, pt) if conky_window==nil then return end local w,h=conky_window.width,conky_window.height local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual,w,h) cr=cairo_create(cs) local xc,yc,ring_r,ring_w,angle=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['angle'] local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha'] local angle_0=angle*(2*math.pi/360)-math.pi/2 local t_arc=t*2*math.pi -- Draw background ring cairo_arc(cr,xc,yc,ring_r,0,2*math.pi) 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) cairo_destroy(cr) cr = nil end function conky_cairo_cleanup() cairo_surface_destroy(cs) cs = nil end function conky_ring_stats() local function setup_rings(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(pct,pt) end -- Check that Conky has been running for at least 5s local updates=conky_parse('${updates}') update_num=tonumber(updates) if update_num>5 then for i in pairs(settings_table) do setup_rings(settings_table[i]) end end end |
Man do I ever need to upgrade MY conky now.
I have to say this one more time: That is one beautiful piece of work searchOne!
