@Eggbanjo
excuse me you could post the file clock.lua?
Yuor conky is very good
@Eggbanjo
excuse me you could post the file clock.lua?
Yuor conky is very good
This is what I made last night.
conkymain
conky-bottom-panelCode:#Background background yes # Use Xft? use_xft yes xftfont DejaVu Sans:size=10 xftalpha .1 text_buffer_size 2048 # Update interval in seconds update_interval 0.5 # This is the number of times Conky will update before quitting. # Set to zero to run forever. total_run_times 0 # Create own window instead of using desktop (required in nautilus) own_window yes own_window_type override own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # Reduce flicker double_buffer yes # Minimum size of text area minimum_size 500 0 maximum_width 250 # 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 3 # Border width border_width 1 # 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 8 gap_y 35 # 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 1 # 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 # Colors default_color ffffff #white default_outline_color dark blue color1 008FCC #blue color2 b2b2b2 #grey1 color3 0000ff #deep blue color4 00ff00 #green color5 ffff00 #yellow color6 ff0000 #red color7 0086C3 #another blue color8 DF0066 #Debian red color9 565656 #grey2 color CCCCCC # # stuff after 'TEXT' will be formatted on screen TEXT ${color7}${font :size=14}$sysname${color} ${color8}$kernel${font}${color} ${voffset -1}$hr ${color2}${font DejaVu Sans Mono:bold:size=12}${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color7}'"$DJS"'${color2}'" "/} ${color white}$hr${color} ${color7}${font StyleBats:size=18}A${color}${font} CPU $alignr ${cpu cpuperc}% ${color9}${cpubar cpu}${color} ${color #0086C3}${font PizzaDude Bullets:size=16}N${color}${font} ${color white}Highest CPU Usage ${color de0b0b}${top name 1}${alignc}${top cpu 1}${alignc} ${color white}${top name 2}${alignc}${top cpu 2}${alignc} ${top name 3}${alignc}${top cpu 3}${alignc} ${top name 4}${alignc}${top cpu 4}${alignc} ${top name 5}${alignc}${top cpu 5}${alignc} ${voffset -10}${color #0086C3}${font PizzaDude Bullets:size=16}J${color}${font} Memory $alignc $mem/$memmax $alignr $memperc% ${color9}$membar${color} ${color #0086C3}${font PizzaDude Bullets:size=16}O${color}${font} Highest Memory Usage ${color de0b0b}${top_mem name 1}${alignc}${top_mem mem 1}${alignc} ${color white}${top_mem name 2}${alignc}${top_mem mem 2}${alignc} ${top_mem name 3}${alignc}${top_mem mem 3}${alignc} ${top_mem name 4}${alignc}${top_mem mem 4}${alignc} ${top_mem name 5}${alignc}${top_mem mem 5}${alignc} ${color7}${font PizzaDude Bullets:size=18}m${color}${font} Drives ${voffset 3}${color7}Cinema${color} ${alignc} ${fs_used /media/Cinema}/${fs_size /media/Cinema} ${color #888888}${alignr}${color #CCCCCC} ${fs_free_perc /media/Cinema}% ${color #888888}free ${color9}${fs_bar /media/Cinema}${color} ${voffset 5}${color7}Music${color} ${alignc} ${fs_used /media/Music}/${fs_size /media/Music} ${color #888888}${alignr}${color #CCCCCC} ${fs_free_perc /media/Music}% ${color #888888}free ${color9}${fs_bar /media/Music}${color} ${voffset 5}${color7}Docs${color} ${alignc} ${fs_used /media/Docs}/${fs_size /media/Docs} ${color #888888}${alignr}${color #CCCCCC} ${fs_free_perc /media/Docs}% ${color #888888}free ${color9}${fs_bar /media/Docs}${color} ${voffset 5}${if_mounted /media/CHHOKANU}${color7}USB${color} ${fs_used /media/CHHOKANU}/${fs_size /media/CHHOKANU} ${color #888888}${alignr}${color #CCCCCC} ${fs_free_perc /media/CHHOKANU}% ${color #888888}free ${color9}${fs_bar /media/CHHOKANU}${color}${endif} ${color7}${font StyleBats:size=18}O${color}${font} Internet ${color7}${font PizzaDude Bullets:size=16}v${color}${font} Up $alignr ${upspeed eth0} ${color7}${font PizzaDude Bullets:size=16}r${color}${font} Down $alignr ${downspeed eth0} ${color7}${font PizzaDude Bullets:size=16}M${color}${font} Total Up${alignr}${totalup eth0} ${voffset 3}${upspeedgraph eth0 15,250 668ABF 9AB7DC} ${voffset 3}${color #0086C3}${font PizzaDude Bullets:size=16}S${color}${font} Total Down ${alignr}${totaldown eth0} ${voffset 3}${downspeedgraph eth0 15,250 668ABF 9AB7DC}
I was trying to make conky-bottom-panel a panel so that it always remains visible just as the GNOME bottom panel would do (Conky settings description gave me this idea that it is possible). But it wouldn't.Code:## Conky background yes out_to_console no update_interval 0.5 ## Text uppercase no override_utf8_locale yes use_xft yes xftfont Liberation Mono:size=10 ## Window own_window yes own_window_class Conky own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager own_window_type override ## Graphics double_buffer yes draw_borders no draw_graph_borders no draw_shades no draw_outline no ## Layout alignment bottom_left gap_x 5 gap_y 5 maximum_width 1280 minimum_size 1280 # Colors default_color ffffff #white #default_outline_color dark blue color1 008FCC #blue color2 b2b2b2 #grey color3 0000ff #deep blue color4 00ff00 #green color5 ffff00 #yellow color6 ff0000 #red color7 0086C3 #another blue color8 DF0066 #Debian red # stuff after 'TEXT' will be formatted on screen TEXT ${font openlogos:size=20}${color8}J ${font}${voffset -12}${font Space Age:size=15}Oracle${voffset}${font}${color} ${voffset -5}|${voffset} ${voffset -1}${color7}${font :style=bold}Uptime${color}${font} $uptime ${voffset -2}|${voffset} ${voffset -1}${color7}${font :style=bold}/${color}${font} ${fs_free /} free of ${fs_size /}${voffset} ${voffset -3}| ${color7}${font :style=bold}/home${color}${font} ${fs_free /home} free of ${fs_size /home}${voffset} ${voffset -4}${font Radio Space:size=15}${time %H:%M:%S}Maximised windows get over it. Don't know if it's possible at all.
BTW, does the bottom-panel conky seem to anyone to be tilting a little on the right? It is, I believe. But can't get it straight.
Another point I mentioned once in an earlier post: DS-Terminal font doesn't work in Conky. It works in Writer, so there's no problem in its set-up. I've seen this font in someone's screenshot, so it obviously works. A Dingbat called wmdrama1 also doesn't work. Is there anything like Conky can't load all the fonts? I don't believe so, though.
Anyways, thanks everyone for this huge thing about Conky.
Linux systems are like LEGOs :
they are infinitely customizable
and limited only by a user's imagination.
Code: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='time', -- "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='%I', -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100. max=12, -- "bg_colour" is the colour of the base ring. bg_colour=0x000000, -- "bg_alpha" is the alpha value of the base ring. bg_alpha=0.2, -- "fg_colour" is the colour of the indicator part of the ring. fg_colour=0x000000, -- "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=150, y=110, -- "radius" is the radius of the ring. radius=67, -- "thickness" is the thickness of the ring, centred around the radius. thickness=0, -- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative. start_angle=0, -- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger than start_angle. end_angle=360 }, { name='cpu', arg='cpu0', max=100, ring="on", bg_colour=0xffffff, bg_alpha=0.2, fg_colour=0xffffff, fg_alpha=0.8, x=150, y=110, radius=70, thickness=25, start_angle=0, end_angle=180 }, { name='cpu', arg='cpu1', max=100, ring="on", bg_colour=0xffffff, bg_alpha=0.2, fg_colour=0xffffff, fg_alpha=0.8, x=150, y=110, radius=70, thickness=25, start_angle=180, end_angle=360 }, { name='memperc', arg='', max=100, ring="on", bg_colour=0xffffff, bg_alpha=0.2, fg_colour=0xffffff, fg_alpha=0.8, x=150, y=110, radius=25, thickness=20, start_angle=0, end_angle=360 }, } -- 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=150 clock_y=110 -- Colour & alpha of the clock hands hour_colour=0xCD0000 minute_colour=0xCD0000 second_colour=0xCD0000 clock_alpha=0.9 -- Do you want to show the seconds hand? show_seconds=false 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,4) cairo_set_source_rgba(cr,rgb_to_r_g_b(hour_colour,clock_alpha)) 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,2) cairo_set_source_rgba(cr,rgb_to_r_g_b(minute_colour,clock_alpha)) cairo_stroke(cr) -- Draw seconds hand if show_seconds then xs=xc+1.1*clock_r*math.sin(secs_arc) ys=yc-1.1*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_set_source_rgba(cr,rgb_to_r_g_b(second_colour,clock_alpha)) 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
Xubuntu 9.10Dual Core 2.4 Watercooled 16gb CfCard2x Freenas 2.5 cpu holding 2tbs
|| 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'
Tho you could go on and check if it's "smaller" than -10 and then -100 and include these as part of the statement.
(if x<10 or x>-10)0(endif)(if x<100 or x>-100)0(endif)x%
Really, I have this kind of stuff everywhere on my .conkyrc
This is, obviously, for positive and negative natural numbers and 0. Decimals is a bit more elaborate.
Laptop: i3 330M 2.13GHz; 2x 4GB 1066MHz; Radeon 5650 1GB @ 675/1020MHz; Crucial M4 256GB SSD; Ubuntu 12.04 x64 and Windows 7 x64.
Ubuntu #8076 / Linux #429448
|| 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'
Bookmarks