Pra quem usa o Conky, postem aqui seus ".conkyrc" com foto da tela

Iniciado por velox256, 07 de Janeiro de 2009, 09:42

tópico anterior - próximo tópico

wankiller

#360
Citação de: rruella online 31 de Julho de 2010, 02:01
wankiller o tema dos ícones qual é, por favor ?
e a propósito o conky? um espectacular principalmente a parte da meteorologia.

cara os ícones foi como o conky um pouco daqui e "dali". mas eu uso o padrão q vem no Ubuntu com algumas modificações.

Aqui tem alguma coisa q eu uso. 
http://www.4shared.com/file/P0F5BG-b/icones-skydome.html

velox256

Atenção moçada que está 'conkeando', quem estiver usando o Conky com extras como Gmail, Forecast ou outros scripts que trabalham dentro do .conkyrc, postem também onde pegaram os scripts extras ou então coloquem o conteúdo dos mesmos aqui pra moçada poder usar também, valeu? :)
Computador perereca, com disco perereca, monitor perereca e sistema super xuxu. Visitem a minha página em http://sidserra.k6.com.br ou meu blog em http://sidserra.blogspot.com.br.

Blau_Araujo




Salve!

Aqui eu estou usando 3 instâncias do conky:

.conkyrc (direita)



# Use Xft?
use_xft yes
xftfont Droid Sans Mono:size=9
xftalpha 0.8
color0 FFFFFF
color1 b85e9e

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_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 250 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 666666
default_shade_color black
#default_outline_color white
own_window_colour 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 30
gap_y 50

# 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
${color #5eb877}${font Distro:size=16}system information...${font}${color}

AMD Athlon(tm) II Dual-Core M300
Ubuntu Studio 10.04 LTS - Lucid Lynx
Kernel: ${kernel}

${font StyleBats:size=16}A${font} CPU1: ${freq_g 1}GHz ${alignr}${cpu cpu1}% ${cpubar cpu1 8,80}
${font StyleBats:size=16}A${font} CPU2: ${freq_g 2}GHz ${alignr}${cpu cpu2}% ${cpubar cpu2 8,80}
${font StyleBats:size=16}A${font} Average load:${alignr}${loadavg}
${font StyleBats:size=16}A${font} Running processes:${alignr}$running_processes/$processes

${font StyleBats:size=16}g${font} RAM: ${mem} of ${memmax} ${alignr}($memperc%)
${font StyleBats:size=16}j${font} SWAP: ${swap} of ${swapmax} ${alignr}($swapperc%)

${font StyleBats:size=16}P${font} Uptime: ${alignr}${uptime}
${font StyleBats:size=16}U${font} Battery: ${alignr}${battery} ${battery_percent}%

${color #5eb877}${font Distro:size=16}internet...${font}${color}

${voffset 4}${font PizzaDude Bullets:size=14}O${font} Up:  ${alignr}${upspeed ppp0} ${upspeedgraph ppp0 8,80}
${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down: ${alignr}${downspeed ppp0} ${downspeedgraph ppp0 8,80}
${voffset 4}${font PizzaDude Bullets:size=14}N${font} Upload: ${alignr}${totalup ppp0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font} Download: ${alignr}${totaldown ppp0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font} Ip Local: ${alignr}${addr ppp0}

${color #5eb877}${font Distro:size=16}wireless...${font}${color}

${font StyleBats:size=16}q${font} Up: ${alignr}${upspeed wlan0} ${upspeedgraph wlan0 8,80}
${font StyleBats:size=16}q${font} Down: ${alignr}${downspeed wlan0} ${downspeedgraph wlan0 8,80}
${font StyleBats:size=16}q${font} Upload: ${alignr}${totalup wlan0}
${font StyleBats:size=16}q${font} Download: ${alignr}${totaldown wlan0}
${font StyleBats:size=16}q${font} Ip Local: ${alignr}${addr wlan0}

${color #5eb877}${font Distro:size=16}hard disk...${font}${color}

${voffset 4}${font Pie charts for maps:size=14}7${font} ${voffset -5}Used: ${fs_used /} of ${fs_size /}${alignr}(${fs_used_perc /}%)
${voffset 4}${font Pie charts for maps:size=14}7${font} ${voffset -5}Free: ${fs_free /} of ${fs_size /}${alignr}(${fs_free_perc /}%)

${color #5eb877}${font Distro:size=16}top processes...${font}${color}

${font StyleBats:size=16}A${font} ${top name 1}$alignc${top pid 1}$alignr${top cpu 1}%
${font StyleBats:size=16}A${font} ${top name 2}$alignc${top pid 2}$alignr${top cpu 2}%
${font StyleBats:size=16}A${font} ${top name 3}$alignc${top pid 3}$alignr${top cpu 3}%
${font StyleBats:size=16}A${font} ${top name 4}$alignc${top pid 4}$alignr${top cpu 4}%

${color #5eb877}${font Distro:size=16}top memory...${font}${color}

${font StyleBats:size=16}g${font} ${top_mem name 1}$alignc${top_mem pid 1}$alignr${top_mem mem 1}%
${font StyleBats:size=16}g${font} ${top_mem name 2}$alignc${top_mem pid 2}$alignr${top_mem mem 2}%
${font StyleBats:size=16}g${font} ${top_mem name 3}$alignc${top_mem pid 3}$alignr${top_mem mem 3}%
${font StyleBats:size=16}g${font} ${top_mem name 4}$alignc${top_mem pid 4}$alignr${top_mem mem 4}%




.conkyrc-cal (centro)



# Use Xft?
use_xft yes
xftfont Droid Sans Mono:size=11
xftalpha 0.8
color0 FFFFFF
color1 FCAF3E

text_buffer_size 2048

# Update interval in seconds
update_interval 60

# 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_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 500 0
#maximum_width 500

# 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 666666
default_shade_color black
#default_outline_color white
own_window_colour 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 675
gap_y 400

# 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
${color #5d71b7}${font Distro:size=24}$alignc${time %A, %e de %B de %G}${font}


${color #b8a45e}${execi 60 cal -3}
${color #b85e9e}${font Distro:size=48}$alignc${time %H:%Mh}${font}${color}




.conkyrc-todo (esquerda)



# Use Xft?
use_xft yes
xftfont Droid Sans Mono:size=9
xftalpha 0.8
color0 FFFFFF
color1 b85e9e

text_buffer_size 2048

# Update interval in seconds
update_interval 2

# 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_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 250 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 666666
default_shade_color black
#default_outline_color white
own_window_colour 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 30
gap_y 50

# 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
${color #5eb877}${font Distro:size=16}todo list...${font}${color}

${execi 60 cat ~/todo.txt }

${color #5eb877}${font Distro:size=16}agenda...${font}${color}

${execi 60 cat ~/agenda.txt }




Como vocês podem ver, a "agenda" e o "todo list" nada mais são do que arquivos ".txt" que eu faço o conky abrir.

Abraços!
Convite confraternização: Mora perto de Osasco e está afim de curtir um blues? Então me encontre toda quinta à partir das 21h no Jegue's Bar. Bons papos, cerveja gelada e o som eletrizante do Trio Macomba Blues. A entrada é franca! Rua Tenente Avelar Pires de Azevedo,341 - Centro - Osasco/SP


niquelnausea


Blau_Araujo

Valeu pessoal!

Eu fiz uma nova versão com as cores e o logo oficiais .do Ubuntu. O papel de parede (wide) fui eu mesmo que fiz e, quem quiser, pode baixar daqui.




A nova paleta oficial do Ubuntu para mudar nas configurações do conky, pode ser baixada aqui.

Abração!
Convite confraternização: Mora perto de Osasco e está afim de curtir um blues? Então me encontre toda quinta à partir das 21h no Jegue's Bar. Bons papos, cerveja gelada e o som eletrizante do Trio Macomba Blues. A entrada é franca! Rua Tenente Avelar Pires de Azevedo,341 - Centro - Osasco/SP

niquelnausea

Alguém sabe a diferença entre os comandos "top_mem mem 1" e "top mem 1"?

bred81

Citação de: niquelnausea online 22 de Agosto de 2010, 12:49
Alguém sabe a diferença entre os comandos "top_mem mem 1" e "top mem 1"?
Aproveitando a sua pergunta, existe algum tipo de manual ensinando a programar em "conky"? (Sei lá qual a linguagem do conky).
É que eu tava querendo alterar uns que eu tenho aqui, mas não sei os parâmetros das funções...

Até também é bom perguntar, como eu uso vários scripts ao mesmo tempo? Chamo-os no .conkyrc?
O que o Mario foi fazer no pscicólogo?
- Ele estava passando por uma fase difícil...

irtigor

Teste, ainda falta lapidar:


conky_rings (horizontal)

# — Conky settings — #
background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers no

text_buffer_size 2048
imlib_cache_size 0

# — Window specifications — #

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

border_inner_margin 0
border_outer_margin 0

minimum_size 1000 220
maximum_width 1800

alignment tl
gap_x 0
gap_y 830

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

# — Text settings — #
use_xft yes
xftfont Aller Display:size=24
xftalpha 0.8

uppercase no

default_color 3D3D3D

# — Lua Load — #
lua_load $HOME/.conky/rings.lua
lua_draw_hook_pre ring_stats

TEXT
${voffset 10}${font D3 Blockism:size=60}${goto 1530}${color 0081FF}${time %I}${color}.${color 236AAF}${time %M}${font}${color}
${goto 225}${voffset -20}${kernel}${goto 146}${voffset +34}${color grey50}${hr 2}${goto 640}${voffset 3}${color 3D3D3D}${font Guifx v2 Transports:size=22}&${goto 680}${voffset -12}${color 009F11}${font Guifx v2 Transports:size=18}/${voffset -2}${font Aller Display:size=14}${downspeed eth0}${goto 780}Hoje: ${exec vnstat -i eth0 | awk '/today/ {print $2" "$3}'} Na semana: ${exec vnstat -w -i eth0 | awk '/current week/ {print $3" "$4}'} No mês: ${exec vnstat -m | awk 'NR == 6 {print $3" "$4}'}${color}${font}${goto 680}${color BF262D}${voffset 10}${font Guifx v2 Transports:size=18}?${font Aller Display:size=14}${upspeed eth0}${goto 780}Hoje: ${exec vnstat -i eth0 | awk '/today/ {print $5" "$6}'} Na semana: ${exec vnstat -w -i eth0 | awk '/current week/ {print $6" "$7}'} No mês: ${exec vnstat -m | awk 'NR == 6 {print $6" "$7}'}${color}${voffset +20}${goto 280}${font kudasai:size=24:bold}${color 0081FF}${time %A}, ${color 236AAF}${time %d }${color 002B56}${time %B }${color grey95}${goto 1000}${voffset 40}${font Aller inside:size=10:italic}Sistema: ${exec lsb_release -d -s} ${exec lsb_release -c -s} ${exec awk 'NR == 5 {printf"%s %s %s %s %s %s \n" ,$4,$5,$6,$7,$ 8,$9}' /proc/cpuinfo} | Tempo ligado: ${uptime_short}${voffset -190}${goto 226}${color 0081FF}${font Droid Sans:size=10:bold}${voffset 95}RAM ${memperc}%${color 236AAF} / ${fs_used_perc /}% ${color 002B56} ~ ${fs_used_perc /home}% ${color ad2f55}SWAP ${swapperc}%${color ffffff} CPU0 - ${cpu cpu0}%${goto 500} CPU1 - ${cpu cpu1}%

rings.lua

--[[
Ring Meters by londonali1010 (2009) mod by irtigor

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 129 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 ~/.conky/rings.lua):
lua_load ~/.conky/rings.lua
lua_draw_hook_pre ring_stats
]]

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=0xffffff,
-- "bg_alpha" is the alpha value of the base ring.
bg_alpha=0,
-- "fg_colour" is the colour of the indicator part of the ring.
fg_colour=0xffffff,
-- "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=132, y=120,
-- "radius" is the radius of the ring.
radius=87,
-- "thickness" is the thickness of the ring, centred around the radius.
thickness=15,
-- "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=0xffffff,
bg_alpha=0,
fg_colour=0xffffff,
fg_alpha=0.8,
x=132, y=120,
radius=70,
thickness=15,
angle=-90
},
{
name='memperc',
arg='',
max=100,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0x0081FF,
fg_alpha=0.5,
x=132, y=120,
radius=20,
thickness=10,
angle=90
},
{
name='fs_used_perc',
arg='/',
max=100,
bg_colour=0xffffff,
bg_alpha=0,
fg_colour=0x236AAF,
fg_alpha=0.4,
x=132, y=120,
radius=32,
thickness=8,
angle=90
},
{
name='fs_used_perc',
arg='/home',
max=100,
bg_colour=0xffffff,
bg_alpha=0,
fg_colour=0x002B56,
fg_alpha=0.6,
x=132, y=120,
radius=44,
thickness=12,
angle=90
},
{
name='swapperc',
arg='',
max=100,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0xad2f55,
fg_alpha=0.6,
x=132, y=120,
radius=56,
thickness=5,
angle=90
},
{
name='time',
arg='%u',--The day of the week as a decimal, range 1 to 7, Monday being 1
max=7,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0x0081FF,
fg_alpha=0.9,
x=250, y=160,
radius=6,
thickness=4,
angle=-90
},
{
name='time',
arg='%d',--The day of the month as a decimal number (range 01 to 31)
max=31,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0x236AAF,
fg_alpha=0.8,
x=250, y=160,
radius=12,
thickness=4,
angle=0
},
{
name='time',
arg='%m',--The month as a decimal number (range 01 to 12)
max=12,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0x002B56,
fg_alpha=0.8,
x=250, y=160,
radius=18,
thickness=4,
angle=90
},
{
name='time',
arg='%I',--The hour as a decimal number using a 12-hour clock (range 01 to 12)
max=12,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0x0081FF,
fg_alpha=0.8,
x=1480, y=37,
radius=22,
thickness=7,
angle=0
},
{
name='time',
arg='%M',--The minute as a decimal number (range 00 to 59)
max=60,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0x236AAF,
fg_alpha=0.9,
x=1480, y=37,
radius=15,
thickness=5,
angle=0
},
{
name='time',
arg='%S',--The second as a decimal number (range 00 to 60)
max=60,
bg_colour=0xffffff,
bg_alpha=0.1,
fg_colour=0xffffff,
fg_alpha=0.6,
x=1480, y=37,
radius=10,
thickness=3,
angle=0
},
}

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

clock_r=40

-- "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=1480
clock_y=37

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(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 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.7,0.7,0.7,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_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

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)
-- 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
draw_clock_hands(cr,clock_x,clock_y)
end

Conky vertical

# — Conky settings — #
background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers no

text_buffer_size 2048
imlib_cache_size 0

# — Window specifications — #

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

border_inner_margin 0
border_outer_margin 0

minimum_size 300 730
maximum_width 1800

alignment tl
gap_x 0
gap_y 100

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

# — Text settings — #
use_xft yes
xftalpha 0.8

uppercase no

default_color ffffff

# — Lua Load — #
lua_load $HOME/.conky/vertical_rings.lua
lua_draw_hook_pre top

TEXT
${font kudasai:size=15:bold}${voffset 90}${goto 8}CPU: ${hwmon 0 temp 1}°C
${voffset 130}${goto 100}HD: ${hddtemp /dev/sda}°C
${voffset 140}${goto 8}Leitura: ${diskio_read}
${voffset 130}${goto 100}Escrita: ${diskio_write}

"Vertical" rings
--[[
Based on "Ring Meters" by londonali1010 (2009), mod by irtigor

To call this script in Conky, use the following (assuming that you save this script to ~/.conky/vertical_rings.lua):
lua_load ~/.conky/vertical_rings.lua
    lua_draw_hook_pre top

]]
table = {
{
max=50, -- max>=100
bg_colour=0xffffff,
bg_alpha=0,
fg_colour=0xad2f55,
fg_alpha=0.8,
x=132, y=580,
radius=80,
thickness=6,
angle=180
},
{
max=50, -- max>=100
bg_colour=0xffffff,
bg_alpha=0,
fg_colour=0xad2f55,
fg_alpha=0.8,
x=132, y=420,
radius=80,
thickness=6,
angle=0
},
{
max=50, -- max>=100
bg_colour=0xffffff,
bg_alpha=0,
fg_colour=0xad2f55,
fg_alpha=0.8,
x=132, y=260,
radius=80,
thickness=6,
angle=180
},
{
max=50, -- max>=100
bg_colour=0xffffff,
bg_alpha=0,
fg_colour=0xad2f55,
fg_alpha=0.8,
x=132, y=100,
radius=80,
thickness=6,
angle=0
},
}
-- Use these settings to define the origin and extent of your clock.

clock_r=40

-- "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=120
clock_y=120

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_circles(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, t=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['angle'], pt['max']/100
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_top()
local function setup_circles(pt)
draw_circles(pt)
end

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)
-- 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(table) do
setup_circles(table[i])
end
end
end


Citação de: bred81 online 22 de Agosto de 2010, 13:07
Citação de: niquelnausea online 22 de Agosto de 2010, 12:49
Alguém sabe a diferença entre os comandos "top_mem mem 1" e "top mem 1"?
Aproveitando a sua pergunta, existe algum tipo de manual ensinando a programar em "conky"? (Sei lá qual a linguagem do conky).
É que eu tava querendo alterar uns que eu tenho aqui, mas não sei os parâmetros das funções...

Até também é bom perguntar, como eu uso vários scripts ao mesmo tempo? Chamo-os no .conkyrc?

A documentação oficial é bem completa, acessa o site para dar uma olhada nos objetos e, claro, o man conky. Sobre a "linguagem" ela é bem rudimentar, é mais marcação mesmo, só que tem um suporte "interno" com lib cairo em lua e você também pode executar programas (o que deixa o "poder" quase ilimitado).

Cláudio Novais

Olá irtigor,
Por acaso tenho em lista uns artigos a falar de algumas partes dos seus conkys, nomeadamente os relógios! Gostei muito da sua área de trabalho, está de parabéns!!
Abraço

irtigor

Citação de: Cláudio Novais online 22 de Agosto de 2010, 21:41
Olá irtigor,
Por acaso tenho em lista uns artigos a falar de algumas partes dos seus conkys, nomeadamente os relógios! Gostei muito da sua área de trabalho, está de parabéns!!
Abraço
Valeu, mas só "relógios" ou algo mais amplo sobre o uso da lib cairo com conky/lua? Eu ainda estou apanhando dessa lib e linguagem, mas com o tempo vou melhorando.

Blau_Araujo

Citação de: irtigor online 23 de Agosto de 2010, 18:10
Citação de: Cláudio Novais online 22 de Agosto de 2010, 21:41
Olá irtigor,
Por acaso tenho em lista uns artigos a falar de algumas partes dos seus conkys, nomeadamente os relógios! Gostei muito da sua área de trabalho, está de parabéns!!
Abraço
Valeu, mas só "relógios" ou algo mais amplo sobre o uso da lib cairo com conky/lua? Eu ainda estou apanhando dessa lib e linguagem, mas com o tempo vou melhorando.

Aqui é uma ótima fonte também: http://conky.sourceforge.net/documentation.html

Abração!
Convite confraternização: Mora perto de Osasco e está afim de curtir um blues? Então me encontre toda quinta à partir das 21h no Jegue's Bar. Bons papos, cerveja gelada e o som eletrizante do Trio Macomba Blues. A entrada é franca! Rua Tenente Avelar Pires de Azevedo,341 - Centro - Osasco/SP

irtigor

Citação de: Blau_Araujo online 23 de Agosto de 2010, 18:18
Aqui é uma ótima fonte também: http://conky.sourceforge.net/documentation.html
Se fosse sobre conky normal... a parte de lua é só a API (tenho que pegar o jeito com o material do lua.org) e sobre o cairo só tem uns exemplos no wiki.

bred81

Citação de: irtigor online 23 de Agosto de 2010, 18:25
Citação de: Blau_Araujo online 23 de Agosto de 2010, 18:18
Aqui é uma ótima fonte também: http://conky.sourceforge.net/documentation.html
Se fosse sobre conky normal... a parte de lua é só a API (tenho que pegar o jeito com o material do lua.org) e sobre o cairo só tem uns exemplos no wiki.
Com lua eu me viro. Tava interessado na documentação do conky. Quero fazer um pra mim. Quando tiver tempo, e se der certo, posto aqui!
O que o Mario foi fazer no pscicólogo?
- Ele estava passando por uma fase difícil...

Andreson Goveia

Citação de: rjbgbo online 31 de Maio de 2010, 15:27
Conky preto, versão lucid lynx



Uploaded with ImageShack.us


# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=8
xftalpha 0.8
color0 FFFFFF
color1 FCAF3E

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_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 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_margin 5

# border width
border_width 1

# Default colors and also border colors
default_color black
#default_shade_color black
#default_outline_color white
own_window_colour 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 7
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 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
DATA E HORA ${hr 2}
${voffset -12}${goto 28}${font Arial Black:size=46}${color}${time %H}${color}${font}${voffset -36}${font Liberation Sans:style=Bold:size=13}${color}${time :%M}${time :%S}${color}${font}
${voffset -2}${goto 112}${font Liberation Sans:style=Bold:size=12}${color}${time %A}${color}${font}
${goto 112}${time %d %b %Y}

CALENDÁRIO ${hr 2}
${font DejaVu Sans Mono:size=9}${execi 60  cal | awk 'NR>1' | sed -e 's/   /    /g' -e 's/[^ ] /& /g' -e 's/..*/  & /' -e 's/ \('`date | awk '{print $3}'`'\) /\['`date | awk '{print $3}'`'\]/'}

SISTEMA ${hr 2}
${voffset 2}${font OpenLogos:size=16}u${font}   Kernel:  ${alignr}${kernel}
${font StyleBats:size=16}q${font}   Ligado: ${alignr}${uptime}
${font Pie charts for maps:size=16}L${font} Root: ${fs_used /}/${fs_size /} ${alignr}${fs_bar 7,55 /}
${font Pie charts for maps:size=16}L${font} Home: ${fs_used /home}/${fs_size /home} ${alignr}${fs_bar 7,50 /home}

${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'}
${font StyleBats:size=16}A${font}   CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
${font StyleBats:size=16}A${font}   CPU2: ${cpu cpu2}% ${alignr}${cpubar cpu2 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}

CONSUMO DE MEMÓRIA:
${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}

REDE ${hr 2}
${if_existing /proc/net/route wlan0}
${voffset -6}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed wlan0} kb/s ${alignr}${upspeedgraph wlan0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed wlan0} kb/s ${alignr}${downspeedgraph wlan0 8,60 F57900 FCAF3E}
${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}   Sinal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Ip Local: ${alignr}${addr wlan0}
${else}${if_existing /proc/net/route eth0}
${voffset -6}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed eth0} kb/s ${alignr}${upspeedgraph eth0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed eth0} kb/s ${alignr}${downspeedgraph eth0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Upload: ${alignr}${totalup eth0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Download: ${alignr}${totaldown eth0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Ip Local: ${alignr}${addr eth0}
${endif}${else}${if_existing /proc/net/route eth1}
${voffset -6}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed eth1} kb/s ${alignr}${upspeedgraph eth1 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed eth1} kb/s ${alignr}${downspeedgraph eth1 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Upload: ${alignr}${totalup eth1}
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Download: ${alignr}${totaldown eth1}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Ip Local: ${alignr}${addr eth1}
${endif}${else}
${voffset -6}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed ppp0} kb/s ${alignr}${upspeedgraph ppp0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed ppp0} kb/s ${alignr}${downspeedgraph ppp0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Upload: ${alignr}${totalup ppp0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Download: ${alignr}${totaldown ppp0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Ip Local: ${alignr}${addr ppp0}
${endif}


Cara gostei muito do seu .conkyrc, porém aqui não aparece os icones somente as letras

por exemplo
Aqui
${voffset -6}${font PizzaDude Bullets:size=14}O${font}   Up: ${upspeed ppp0} kb/s ${alignr}${upspeedgraph ppp0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}U${font}   Down: ${downspeed ppp0} kb/s ${alignr}${downspeedgraph ppp0 8,60 F57900 FCAF3E}
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Upload: ${alignr}${totalup ppp0}
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Download: ${alignr}${totaldown ppp0}
${voffset 4}${font PizzaDude Bullets:size=14}a${font}   Ip Local: ${alignr}${addr ppp0}

só aparece (digo da parte dos icones o resto está ok.)

O
U
N
T
a