› Foros › PC › Software libre
Relasix escribió:[...]
${exec comando_de_consola_para_mostrar_nombre | head -cX} #Donde X = cantidad de caracteres a mostrar desde el primero
ashitaka escribió:Muy buenas, a ver si alguien me sabe decir si es posible con conkyEmail sacar SÓLO los correos nuevos sin leer de hotmail o, en su defecto, si hay algún script que lo haga (tengo uno para Gmail que funciona a las mil maravillas).
Saludos!
weskern escribió:Me faltan fuentes y el script de la ip.
podeis decirme donde conseguirlos y donde ponerlos? Gracias
Kaitos escribió:OM3G4 escribió:¿Alguien me pasa el ip.sh?
Aquí tienes#!/bin/bash
# eigene öffentliche ip anzeigen
wget http://checkip.dyndns.org/ -q -O - |
grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'
${execi 1 /ruta_del_archivo/ip.sh}
${font openlogos:size=20}${color #62DBDF}$alignc B
${voffset -50}
${voffset -8}${font Martin Vogel's Symbols:size=19}B${font} Gmail: ${alignr}${font DejaVu Sans:style=Bold:size=8}${execi 600 conkyEmail --servertype=IMAP --servername=imap.googlemail.com --username=xxxx@gmail.com --password=xxxx --ssl}${font} Nuevo(s) email(s)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#background yes
alignment tr
gap_x 20
gap_y 50
minimum_size 300 550
maximum_width 300
draw_shades no
draw_outline no
stippled_borders 0
border_inner_margin 5
border_width 0
font 5x7
font arial
use_xft yes
xftfont arial:size=8
xftalpha 0.8
update_interval 3
total_run_times 0
cpu_avg_samples 2
net_avg_samples 2
double_buffer yes
use_spacer none
default_color white
default_outline_color white
short_units yes
lua_load ~/scripts/conky/conkycairo.lua
lua_draw_hook_pre cairo
TEXT
${exec feh --bg-scale /home/samuel/imagenes/fondos/2010/atra.jpg}
require 'cairo'
--[[ CONFIG ]]
color = { 0x00000015, --1 black 0.10a
0x00000066, --2 black 0.40a
0xffffff66, --3 white 0.40a
0xffffff80, --4 white 0.50a
0xffffff70, --5 white 0.30a
0x00000000, --6 black 0.00a (no color)
0x0000000f, --7 black 0.05a
0x00000022, --8 black 0.14a
0x0000000c, --9 black 0.02a
0xffffff9a, --10 white
0x00000033, --11
0xc8c8c8c0, --12 grey >a
0xc8c8c860, --13 grey <a
0xa8c859c0, --14 green >a
0xa8c85960, --15 green <a
}
--[[ background ]]
bg = { color = color[1],
arch = "/home/samuel/scripts/conky/archlinux.png",
img_x = 16,
img_y = 16 }
bg.img = cairo_image_surface_create_from_png(bg.arch)
--[[ cpu graph ]]
FREQS = { 800, 1400, 1900, 2600 }
MAX_FREQ = 2600
CORES = 3
cpu = { rotation = 0.7,
x = 70,
y = 160,
r = 50, -- radius
offset = 30, -- degrees
bg_color = color[2],
border_color = color[2],
border_width = 1,
circles_color = color[1],
circles_width = 1,
usage_color = color[5],
usage_border_color = color[4],
usage_border_width = 1,
separator_color = color[1],
separator_width = 1,
text_font = "Verdana",
text_color = color[2],
text_size = 12,
angle = {} }
for i=1, CORES, 1 do
cpu.angle[i] = math.rad(360/CORES*(i-1)+cpu.offset)
end
cpu.text_offset = (cpu.angle[2] - cpu.angle[1]) / 2
--[[ top cpu ]]
top = { n = 4, -- lines
x = 150,
y = 115,
w = 145,
h = 17, -- height per line
text_font = "Verdana",
text_color = color[2],
text_size = 12,
name_xoffset = 5,
cpu_xoffset = -40,
text_yoffset = -4,
bg_color = color[7],
bg_padding = 5,
bg_round = 8 }
--[[ load ]]
load = { x = 145,
y = 192,
w = 105,
h = 20,
r = 6,
bg_color = color[7],
text_font = "Verdana",
text_color = color[2],
text_size = 12,
text_xoffset = 6,
text_yoffset = 15 }
--[[ cpu temp ]]
cputemp = { x = 254,
y = 192,
w = 45,
h = 20,
r = 6,
bg_color = color[7],
text_font = "Verdana",
text_color = color[2],
text_size = 12,
text_xoffset = 6,
text_yoffset = 15 }
--[[ uptime ]]
uptime = { x = 220,
y = 90,
font = "Verdana",
size = 12,
color = color[2] }
--[[ bars (ram, swap, fs) ]]
bar = { { x = 32,
y = 250,
w = 260,
dx = 12,
dy = 12,
bg = color[11],
border_color = color[2],
border_width = 1,
bar_color = color[10],
font = "Verdana",
font_size = 10,
font_color = color[2],
text = "RAM",
text_part = '${mem}',
text_total = '${memmax}',
percent = '${memperc}' },
{ x = 32,
y = 265,
w = 260,
dx = 12,
dy = 12,
bg = color[11],
border_color = color[2],
border_width = 1,
bar_color = color[10],
font = "Verdana",
font_size = 10,
font_color = color[2],
text = "SWAP",
text_part = '${swap}',
text_total = '${swapmax}',
percent = '${swapperc}' },
{ x = 32,
y = 285,
w = 260,
dx = 12,
dy = 12,
bg = color[11],
border_color = color[2],
border_width = 1,
bar_color = color[10],
font = "Verdana",
font_size = 10,
font_color = color[2],
text = "/boot",
text_part = '${fs_used /boot}',
text_total = '${fs_size /boot}',
percent = '${fs_used_perc /boot}' },
{ x = 32,
y = 300,
w = 260,
dx = 12,
dy = 12,
bg = color[11],
border_color = color[2],
border_width = 1,
bar_color = color[10],
font = "Verdana",
font_size = 10,
font_color = color[2],
text = "/",
text_part = '${fs_used /}',
text_total = '${fs_size /}',
percent = '${fs_used_perc /}' },
{ x = 32,
y = 315,
w = 260,
dx = 12,
dy = 12,
bg = color[11],
border_color = color[2],
border_width = 1,
bar_color = color[10],
font = "Verdana",
font_size = 10,
font_color = color[2],
text = "/home",
text_part = '${fs_used /home}',
text_total = '${fs_size /home}',
percent = '${fs_used_perc /home}' },
{ x = 32,
y = 330,
w = 260,
dx = 12,
dy = 12,
bg = color[11],
border_color = color[2],
border_width = 1,
bar_color = color[10],
font = "Verdana",
font_size = 10,
font_color = color[2],
text = "/mnt/ramfs",
text_part = '${fs_used /mnt/ramfs}',
text_total = '${fs_size /mnt/ramfs}',
percent = '${fs_used_perc /mnt/ramfs}' },
{ x = 32,
y = 345,
w = 260,
dx = 12,
dy = 12,
bg = color[11],
border_color = color[2],
border_width = 1,
bar_color = color[10],
font = "Verdana",
font_size = 10,
font_color = color[2],
text = "/mnt/win",
text_part = '${fs_used /mnt/win}',
text_total = '${fs_size /mnt/win}',
percent = '${fs_used_perc /mnt/win}' },
{ x = 32,
y = 360,
w = 260,
dx = 12,
dy = 12,
bg = color[11],
border_color = color[2],
border_width = 1,
bar_color = color[10],
font = "Verdana",
font_size = 10,
font_color = color[2],
text = "/mnt/inter",
text_part = '${fs_used /mnt/inter}',
text_total = '${fs_size /mnt/inter}',
percent = '${fs_used_perc /mnt/inter}' },
}
net = { interface = "eth0",
x = 20,
y = 390,
w = 270,
h = 150,
r = 8,
padding = 8,
bg = color[2],
rule_color = color[3],
rule_width = 0.5,
graph_width = 2,
up_color = color[12],
up_bg_color = color[13],
down_color = color[14],
down_bg_color = color[15],
top_speed = 1100,
rules = { 250, 500, 750, 1000 },
samples = 180,
index = 1,
up = {},
down = {},
key = { x = 0,
y = 0,
w = 62,
h = 27,
r = 5,
bgcolor = color[2],
font = "Verdana",
font_size = 10,
font_color = color[13],
padding = 3 },
}
net.gx = net.x+net.padding
net.gy = net.y+net.h-net.padding
net.gw = net.w-2*net.padding
net.gh = net.h-2*net.padding
for i=1, net.samples, 1 do
net.up[i] = 0
net.down[i] = 0
end
--[[ FUNCTIONS ]]
function rgba(color)
-- (0x)rrggbbaa -> r, g, b, a | 0.0 < r, g, b, a < 1.0
local r = (color - (color % 0x1000000)) / 0x1000000 / 255
color = color % 0x1000000
local g = (color - (color % 0x10000)) / 0x10000 / 255
color = color % 0x10000
local b = (color - (color % 0x100)) / 0x100 / 255
local a = color % 0x100 / 255
return r, g, b, a
end
function rounded_rectangle(cr, x1, y1, x2, y2, r)
cairo_move_to(cr, x2-r, y1)
cairo_arc(cr, x2-r, y1+r, r, 3*math.pi/2, 2*math.pi) -- top right
cairo_line_to(cr, x2, y2-r) -- right
cairo_arc(cr, x2-r, y2-r, r, 0, math.pi/2) -- bottom right
cairo_line_to(cr, x1+r, y2) -- bottom
cairo_arc(cr, x1+r, y2-r, r, math.pi/2, math.pi) -- bottom left
cairo_line_to(cr, x1, y1+r) -- left
cairo_arc(cr, x1+r, y1+r, r, math.pi, 3*math.pi/2) -- top left
cairo_close_path(cr) -- top
end
function leaned_bar(cr, x, y, w, dx, dy)
cairo_move_to(cr, x, y)
cairo_line_to(cr, x+w, y)
cairo_line_to(cr, x+w-dx, y+dy)
cairo_line_to(cr, x-dx, y+dy)
cairo_close_path(cr)
end
function background(cr, w, h)
cairo_set_source_rgba(cr, rgba(bg.color))
cairo_rectangle(cr, 0,0, w,h) -- bg
cairo_fill_preserve(cr)
cairo_set_source_surface(cr, bg.img, bg.img_x, bg.img_y) -- img
cairo_fill(cr)
end
function _uptime(cr)
cairo_select_font_face(cr, uptime.font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size(cr, uptime.size)
cairo_set_source_rgba(cr, rgba(uptime.color))
cairo_move_to(cr, uptime.x, uptime.y)
cairo_show_text(cr, conky_parse('${uptime}'))
cairo_stroke(cr)
end
function cpu_graph(cr)
-- rotation --
for i=1, #cpu.angle, 1 do
cpu.angle[i] = (cpu.angle[i] + math.rad(cpu.rotation)) % (2*math.pi)
end
-- data --
cpu.data = {}
for i = 1, CORES, 1 do
cpu.data[i] = { freq = tonumber(conky_parse('${freq '..i..'}')),
cpu = tonumber(conky_parse('${cpu cpu'..i..'}')) }
cpu.data[i]["real"] = cpu.data[i]["cpu"] * cpu.data[i]["freq"] / MAX_FREQ
end
-- background --
cairo_arc(cr, cpu.x, cpu.y, cpu.r, 0, 2*math.pi)
cairo_set_line_width(cr, cpu.border_width)
cairo_set_source_rgba(cr, rgba(cpu.bg_color))
cairo_stroke_preserve(cr)
cairo_set_source_rgba(cr, rgba(cpu.border_color))
cairo_fill(cr)
-- freqs limits --
cairo_set_line_width(cr, cpu.circles_width)
cairo_set_source_rgba(cr, rgba(cpu.circles_color))
for i = 1, #FREQS-1, 1 do
cairo_arc(cr, cpu.x, cpu.y, cpu.r*FREQS[i]/MAX_FREQ, 0, 2*math.pi)
cairo_stroke(cr)
end
-- cpu usage --
cairo_set_line_width(cr, cpu.usage_border_width)
for i=1, CORES, 1 do
cairo_arc(cr, cpu.x, cpu.y, cpu.data[i]["real"]*cpu.r/100, cpu.angle[i], cpu.angle[i%3+1])
cairo_set_source_rgba(cr, rgba(cpu.usage_border_color)) -- border
cairo_stroke_preserve(cr)
cairo_line_to(cr, cpu.x, cpu.y)
cairo_set_source_rgba(cr, rgba(cpu.usage_color)) -- fill
cairo_fill(cr)
end
-- separators --
cairo_set_line_width(cr, cpu.separator_width)
cairo_set_source_rgba(cr, rgba(cpu.separator_color))
for i=1, CORES, 1 do
cairo_move_to(cr, cpu.x, cpu.y)
cairo_line_to(cr, cpu.x+cpu.r*math.cos(cpu.angle[i]), cpu.y+cpu.r*math.sin(cpu.angle[i]))
cairo_stroke(cr)
end
-- text --
cairo_set_source_rgba(cr, rgba(cpu.text_color))
cairo_select_font_face(cr, cpu.text_font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD)
cairo_set_font_size(cr, cpu.text_size)
local aux_cos
local aux_sin
for i=1, CORES, 1 do
aux_cos = math.cos(cpu.angle[i]+cpu.text_offset)
aux_sin = math.sin(cpu.angle[i]+cpu.text_offset)
cairo_move_to(cr, cpu.x + cpu.r*aux_cos + 10*aux_cos - cpu.text_size / 2,
cpu.y + cpu.r*aux_sin + 10*aux_sin + cpu.text_size / 4)
cairo_show_text(cr, string.format("%.0f", cpu.data[i]["real"]))
end
end
function top_cpu(cr)
-- bg --
rounded_rectangle(cr, top.x-top.bg_padding, top.y-top.bg_padding,
top.x+top.w+top.bg_padding, top.y+top.h*top.n+top.bg_padding, top.bg_round)
cairo_set_source_rgba(cr, rgba(top.bg_color))
cairo_fill(cr)
-- text --
cairo_select_font_face(cr, top.text_font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size(cr, top.text_size)
for i=1, top.n, 1 do
cairo_move_to(cr, top.x+top.name_xoffset, top.y+i*top.h+top.text_yoffset) -- name
cairo_set_source_rgba(cr, rgba(top.text_color))
cairo_show_text(cr, conky_parse('${top name '..i..'}'))
cairo_move_to(cr, top.x+top.w+top.cpu_xoffset, top.y+i*top.h+top.text_yoffset) -- cpu
cairo_show_text(cr, conky_parse('${top cpu '..i..'}'))
end
end
function loadavg(cr)
-- bg --
rounded_rectangle(cr, load.x, load.y, load.x+load.w, load.y+load.h, load.r)
cairo_set_source_rgba(cr, rgba(load.bg_color))
cairo_fill(cr)
-- text --
cairo_select_font_face(cr, load.text_font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size(cr, load.text_size)
cairo_set_source_rgba(cr, rgba(load.text_color))
cairo_move_to(cr, load.x+load.text_xoffset, load.y+load.text_yoffset)
cairo_show_text(cr, conky_parse('${loadavg}'))
end
function cpu_temp(cr)
-- bg --
rounded_rectangle(cr, cputemp.x, cputemp.y, cputemp.x+cputemp.w, cputemp.y+cputemp.h, cputemp.r)
cairo_set_source_rgba(cr, rgba(cputemp.bg_color))
cairo_fill(cr)
-- text
cairo_select_font_face(cr, cputemp.text_font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size(cr, cputemp.text_size)
cairo_set_source_rgba(cr, rgba(cputemp.text_color))
cairo_move_to(cr, cputemp.x+cputemp.text_xoffset, cputemp.y+cputemp.text_yoffset)
cairo_show_text(cr, conky_parse('${hwmon temp 1}').."ºC")
end
function bars(cr)
for i=1, #bar, 1 do
-- bg --
leaned_bar(cr, bar[i].x, bar[i].y, bar[i].w, bar[i].dx, bar[i].dy)
cairo_set_line_width(cr, bar[i].border_width)
cairo_set_source_rgba(cr, rgba(bar[i].border_color))
cairo_stroke_preserve(cr)
cairo_set_source_rgba(cr, rgba(bar[i].bg))
cairo_fill(cr)
-- bar --
leaned_bar(cr, bar[i].x, bar[i].y, bar[i].w*conky_parse(bar[i].percent)/100, bar[i].dx, bar[i].dy)
cairo_set_source_rgba(cr, rgba(bar[i].bar_color))
cairo_fill(cr)
-- text --
cairo_select_font_face(cr, bar[i].font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size(cr, bar[i].font_size)
cairo_set_source_rgba(cr, rgba(bar[i].font_color))
cairo_move_to(cr, bar[i].x, bar[i].y+bar[i].dy-2)
cairo_show_text(cr, bar[i].text)
cairo_move_to(cr, bar[i].x+bar[i].w-100, bar[i].y+bar[i].dy-2) -- 100 arbitrario
cairo_show_text(cr, conky_parse(bar[i].text_part).." / "..conky_parse(bar[i].text_total))
end
end
function network(cr)
-- data --
local up = tonumber(conky_parse('${upspeedf '..net.interface..'}'))
local down = tonumber(conky_parse('${downspeedf '..net.interface..'}'))
net.up[net.index] = up
net.down[net.index] = down
net.index = ((net.index) % net.samples) +1
-- bg --
rounded_rectangle(cr, net.x, net.y, net.x+net.w, net.y+net.h, net.r)
cairo_set_source_rgba(cr, rgba(net.bg))
cairo_fill(cr)
-- rules --
cairo_set_line_width(cr,net.rule_width)
cairo_set_source_rgba(cr, rgba(net.rule_color))
cairo_move_to(cr, net.gx, net.gy)
cairo_rel_line_to(cr, net.gw, 0)
cairo_stroke_preserve(cr)
cairo_stroke(cr)
for i=1, #net.rules, 1 do
cairo_move_to(cr, net.gx, net.gy - net.rules[i]*net.gh/net.top_speed)
cairo_rel_line_to(cr, net.gw, 0)
cairo_stroke(cr)
end
-- up graph --
cairo_set_line_width(cr, net.graph_width)
cairo_set_source_rgba(cr, rgba(net.up_color))
cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
cairo_move_to(cr, net.gx, net.gy - net.up[((1+net.index-2) % net.samples)+1]*net.gh/net.top_speed)
for i=2, #net.up, 1 do
cairo_line_to(cr, net.gx + net.gw/#net.up*i, net.gy - net.up[((i+net.index-2) % net.samples)+1]*net.gh/net.top_speed)
end
cairo_stroke_preserve(cr)
cairo_set_source_rgba(cr, rgba(net.up_bg_color))
cairo_line_to(cr, net.gx+net.gw, net.gy)
cairo_line_to(cr, net.gx, net.gy)
cairo_close_path(cr)
cairo_fill(cr)
-- down graph --
cairo_set_line_width(cr, net.graph_width)
cairo_set_source_rgba(cr, rgba(net.down_color))
cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
cairo_move_to(cr, net.gx, net.gy - net.down[((1+net.index-2) % net.samples)+1]*net.gh/net.top_speed)
for i=2, #net.up, 1 do
cairo_line_to(cr, net.gx + net.gw/#net.down*i, net.gy - net.down[((i+net.index-2) % net.samples)+1]*net.gh/net.top_speed)
end
cairo_stroke_preserve(cr)
cairo_set_source_rgba(cr, rgba(net.down_bg_color))
cairo_line_to(cr, net.gx+net.gw, net.gy)
cairo_line_to(cr, net.gx, net.gy)
cairo_close_path(cr)
cairo_fill(cr)
-- key --
cairo_set_source_rgba(cr, rgba(net.key.bgcolor))
rounded_rectangle(cr, net.gx+net.key.x, net.gy-net.gh+net.key.y, net.gx+net.key.x+net.key.w, net.gy-net.gh+net.key.y+net.key.h, net.key.r)
cairo_fill(cr)
cairo_select_font_face(cr, net.key.font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size(cr, net.key.font_size)
cairo_set_source_rgba(cr, rgba(net.key.font_color))
cairo_move_to(cr, net.gx+net.key.x+net.key.padding, net.gy-net.gh+net.key.y+net.key.font_size)
cairo_show_text(cr, "D: "..down)
cairo_move_to(cr, net.gx+net.key.x+net.key.padding, net.gy-net.gh+net.key.y+net.key.font_size*2+net.key.padding)
cairo_show_text(cr, "U: "..up)
end
function conky_cairo()
local w = conky_window.width
local h = conky_window.height
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
conky_window.visual, w, h)
cr = cairo_create(cs)
background(cr, w, h)
_uptime(cr)
cpu_graph(cr)
top_cpu(cr)
loadavg(cr)
cpu_temp(cr)
bars(cr)
network(cr)
end
Sargento BoB escribió:alguien sabe por que no me deja poner 2 conkys a la vez? uno es asi de general y el otro es un calendario con la fecha solo. el general esta situado a la izq. y el calendario a la derecha, asi que cosa de superposicion no es. lo que hago es poner un script bash asi;
#!/bin/bash
conky -c /home/pablo/.conky/.conky_fecha &
conky -c /home/pablo/.conky/.conky_general
lo tengo tambien metido en autostart.sh
pero solo se me ejecuta uno bueno, en realidad creo que se ejecutan los dos, pero uno debe de estar invisible o algo porque cuando abres una ventana o algo se ve asi durante medio segundo
k0br4 escribió:Prueba a hacer 2 scritps, uno para cada conky.
Creo qque es por que cuando tu ejecutas conky -c se queda abierto hasta que cierras el bash, no se si me explico, y cuando cierras el bash se va.
Pruebalo con 2 scripts y comentas
Radja escribió:@Sargento BoB
Has probado a poner las dos lineas que llaman a los conkys tal cual en el autostart.sh? Asegurate de que acaban en &
En el extrasísimo caso de que uno pise al otro aunque estén al otro lado de la pantalla; si no te van, cambia el orden.
Sargento BoB escribió:@viejozorro, prueba con datafont. por cierto, mas que iconos son letras que se parecen a iconos *(a no ser que te refieras a lua) hay unos hay una fuente con letras como [iconos] que se llama pizza bundle o algo asi
viejozorro escribió:Bien, como hago ahora para poner los datos del sensors en el conky? y también los datos del hddtemp?
amuchamu escribió:viejozorro escribió:Bien, como hago ahora para poner los datos del sensors en el conky? y también los datos del hddtemp?
http://conky.sourceforge.net/variables.html
En concreto, hwmon y hddtemp
TEMPERATURAS ${hr 2}
${font Weather:style=Bold:size=14}y ${font}Procesador: ${alignr}${hwmon 1 temp 1} / ${alignr}${hwmon 1 temp 3} C
${font Weather:style=Bold:size=14}y ${font}Disco duro: ${alignr}${execi 20 hddtemp /dev/sda | cut -c28-32}
viejozorro escribió:amuchamu escribió:viejozorro escribió:Bien, como hago ahora para poner los datos del sensors en el conky? y también los datos del hddtemp?
http://conky.sourceforge.net/variables.html
En concreto, hwmon y hddtemp
Si si, la web esa ya lo conocía.
Tengo esto, pero nada sigue si ir:TEMPERATURAS ${hr 2}
${font Weather:style=Bold:size=14}y ${font}Procesador: ${alignr}${hwmon 1 temp 1} / ${alignr}${hwmon 1 temp 3} C
${font Weather:style=Bold:size=14}y ${font}Disco duro: ${alignr}${execi 20 hddtemp /dev/sda | cut -c28-32}
${font Weather:style=Bold:size=14}y ${font}Procesador: ${alignr}${hwmon 0 temp 1} ºC
${font Weather:style=Bold:size=14}y ${font}Placa nai: ${alignr}${hwmon 0 temp 2} ºC
${font weather:size=28}x ${font}HDD ${execi 1 ~/.scripts/hddmonit.sh}°C
${font Weather:style=Bold:size=14}y ${font}Disco duro: ${alignr}${hddtemp /dev/sda }
connect: Connection refused
localhost [127.0.0.1] 7634 (?) : Connection refused
localhost [127.0.0.1] 7634 (?) : Connection refused
localhost [127.0.0.1] 7634 (?) : Connection refused
localhost [127.0.0.1] 7634 (?) : Connection refused
localhost [127.0.0.1] 7634 (?) : Connection refused
localhost [127.0.0.1] 7634 (?) : Connection refused
localhost [127.0.0.1] 7634 (?) : Connection refused
localhost [127.0.0.1] 7634 (?) : Connection refused
localhost [127.0.0.1] 7634 (?) : Connection refused
amuchamu escribió:Tienes que tener el demonio hddtemp funcionando, y lo tienes apagado o en otro puerto distinto al 7634.
${font Weather:style=Bold:size=14}y ${font}Disco duro: ${alignr}${execi 20 ~/.scripts/hddmonit.sh} ºC
# 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 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 white
#default_shade_color black
#default_outline_color white
own_window_colour white
# Text alignment, other possible values are commented
#alignment top_right
alignment top_left
#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 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
${color 0041e7}${font OpenLogos:size=70}B${font}${color white}
${color f68915}SISTEMA ${hr 2}${color}
${voffset 2}${font OpenLogos:size=18}A${font} Kernel: ${alignr}${kernel}
${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}
${font Webdings:size=16}~${font} Batería: ${battery_percent BAT0}% ${alignr}${battery_bar 8,60 BAT0}
${font StyleBats:size=16}q${font} Actividad: ${alignr}${uptime}
${color f68915}FECHA ${hr 2}${color}
${alignc 35}${color 0041e7}${font Arial Black:size=26}${time %H:%M}${font}
${alignc}${time %A %d %Y}${color white}
${color f68915}HD ${hr 2}${color}
${voffset 4}${font Pie charts for maps:size=14}7${font} ${voffset -5}Root disponibles:
${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
${font Pie charts for maps:size=14}7${font} ${voffset -5}Home disponibles:
${voffset 4}${fs_free /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}
${color f68915}RED ${hr 2}${color}
${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 f68915 f68915}
${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down: ${downspeed wlan0} kb/s ${alignr}${downspeedgraph wlan0 8,60 f68915 f68915}
${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} Señal: ${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}
${voffset 4}${font PizzaDude Bullets:size=14}b${font} Ip Pública: ${alignr}${execi 1 /home/ttorrecus/MyLinux/Conky/bin/ip.sh}
${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 f68915 f68915}
${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down: ${downspeed eth0} kb/s ${alignr}${downspeedgraph eth0 8,60 f68915 f68915}
${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}
${voffset 4}${font PizzaDude Bullets:size=14}b${font} Ip Pública: ${alignr}${execi 1 /home/ttorrecus/MyLinux/Conky/bin/ip.sh}
${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 f68915 f68915}
${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down: ${downspeed eth1} kb/s ${alignr}${downspeedgraph eth1 8,60 f68915 f68915}
${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}
${voffset 4}${font PizzaDude Bullets:size=14}b${font} Ip Pública: ${alignr}${execi 1 /home/ttorrecus/MyLinux/Conky/bin/ip.sh}
${endif}${else}
${font PizzaDude Bullets:size=14}4${font} Red No disponible
${endif}
${color f68915}Cond. ATMOSFERICAS ${hr 2}${color}
${execi 300 /home/ttorrecus/MyLinux/Conky/bin/weather.sh "NAM|MX|MX015|Ciudad+Ju%E1rez"}
${else}
${font PizzaDude Bullets:size=14}4${font} Tiempo No disponible
${endif}
${color f68915}PACMAN ${hr 2}${color}
${execp paconky /home/ttorrecus/MyLinux/Conky/bin/repos.paconky}
${execp paconky /home/ttorrecus/MyLinux/Conky/bin/aur.paconky}
${voffset 900}
#${execi 30 /home/ttorrecus/MyLinux/Conky/bin/list_upgradable.pl}
${exec feh --bg-scale "`grep 'wallpaper=' ~/.kde4/share/config/plasma-desktop-appletsrc | tail --lines=1 | sed 's/wallpaper=//'`"}
#!/bin/sh
#AccuWeather (r) RSS weather tool for conky
#
#USAGE: weather.sh <locationcode>
#
#(c) Michael Seiler 2007
METRIC=1 #Should be 0 or 1; 0 for F, 1 for C
if [ -z $1 ]; then
echo
echo "USAGE: weather.sh <locationcode>"
echo
exit 0;
fi
#curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print "$1"; }'
out=`curl --connect-timeout 30 -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print "$1"; }'`
#echo $out
cond=`echo $out | cut -d':' -f 1`
temp=`echo $out | cut -d':' -f 2`
case "$cond" in
'Fog')
echo -e "Brumoso\c"
;;
'Snow')
echo -e "Nevado\c"
;;
'Cloudy')
echo -e "Nublado\c"
;;
'Partly Cloudy')
echo -e "Parcialmente Nublado\c"
;;
'Sunny')
echo -e "Soleado\c"
;;
'Mostly Sunny')
echo -e "Mayormente Soleado\c"
;;
'Partly Sunny')
echo -e "Parcialmente Soleado\c"
;;
'T-Storms')
echo -e "Tormentas\c"
;;
'Rain')
echo -e "Lluvias\c"
;;
'Clear')
echo -e "Despejado\c"
;;
*)
echo -e $cond'\c'
esac
echo : $temp
#!/bin/sh
# save resources by querying the db once, reuse the output
pacman -Qu | wc -l
numofup=`echo "$output" | grep Targets | sed 's/Targets (\([0-9]*\).*/\1/' `
if [ -n "$numofup" ]; then
sizeofup=`echo "$output" | grep "Actualizaciones Instaladas" \
| cut -d ':' -f 2 \
| sed 's/^ *//'`
# pacman -Qu wont tell us how much to dl, skipping this one
#dlsize=`echo "$output" | grep "Tamaño de la Descarga" \
# | cut -d ':' -f 2 \
# | sed 's/^ *//'`
echo "\${color}""$numofup Nuevos Paquetes Disponibles"
#echo -e "\${alignr}\${color}($dlsize / $sizeofup)"
#echo -e "\t \${color0}" "dl/inst" "\${alignr}\${color}$dlsize / $sizeofup"
echo -e "\${color}Install Size:" "\${alignr}\${color}$sizeofup"
else
echo "\${color}""Sistema Actualizado"
fi
#!/bin/bash
# eigene öffentliche ip anzeigen
wget http://checkip.dyndns.org/ -q -O - |
grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'
Hammett escribió:Estoy intentando que mi conky me informe cuando me llegan emails a mis cuentas de hotmail y de gmail. Con la de gmail no he tenido problemas, a la primera me ha funcionado, pero con la de hotmail no me aclaro. ¿Alguien que lo tenga funcionando me podría poner cómo tiene esa línea? Tengo instalado el conkymail ese, el plugin escrito en python, vaya.
Muchas gracias.
PS: Por cierto, conocéis esto? http://conkygui.sourceforge.net/
Hammett escribió:PS: Por cierto, conocéis esto? http://conkygui.sourceforge.net/
nu_kru escribió:Hammett escribió:Estoy intentando que mi conky me informe cuando me llegan emails a mis cuentas de hotmail y de gmail. Con la de gmail no he tenido problemas, a la primera me ha funcionado, pero con la de hotmail no me aclaro. ¿Alguien que lo tenga funcionando me podría poner cómo tiene esa línea? Tengo instalado el conkymail ese, el plugin escrito en python, vaya.
Muchas gracias.
PS: Por cierto, conocéis esto? http://conkygui.sourceforge.net/
yo ya no lo tengo puesto, pero cuando lo tenia, era simplemente modificar el script de gmail, para que usase el servidor pop de hotmail.
Saludos.
${pop3_unseen <server> <usuario> <password>}${font} Nuevo(s) mensaje(s)
AUDACIOUS ${hr 2}${font monospace:size=9}
${execpi 10 COVER=`audtool2 current-song-filename | cut -c8- | sed 's/\%20/ /g' | sed 's/\%C3\%BA/ú/g' | sed 's/\(.*\)\/.*$/\1\/cover.jpg/'`; if [ ! -f "$COVER" ]; then COVER="$HOME/.scripts/nocover.jpg"; fi; cp -f "$COVER" "/tmp/conky_cover.jpg";}
${image /tmp/conky_cover.jpg -p 10,255 -s 100x100 -n}
${voffset 11}${goto 125}${if_running audacious2}${scroll 37 5 $audacious_title - ${execi 3 audtool2 current-song-tuple-data artist} (${execi 3 audtool2 current-song-tuple-data album}) }${else}NONE${endif}
${voffset 5}${goto 125}${font Zekton:size=9}NOW: ${audacious_status}${alignr}${audacious_position} / ${audacious_length}${font}
${voffset 5}${goto 125}${color 777777}${audacious_bar 8,258}${color}${font}
${execpi 10 COVER=`audtool2 current-song-filename | cut -c8- | ascii2uni -a J -q | sed 's/\(.*\)\/.*$/\1\/cover.jpg/'`; if [ ! -f "$COVER" ]; then COVER="$HOME/.scripts/nocover.jpg"; fi; cp -f "$COVER" "/tmp/conky_cover.jpg";}
# conky configuration
# set to yes if you want tormo to be forked in the background
background yes
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
# Use Xft?
use_xft yes
# Print everything to stdout?
# out_to_console no
# MPD host/port
#mpd_host localhost
# mpd_port 6600
# Print everything to console?
# out_to_console no
# Xft font when Xft is enabled
xftfont Nimbus Sans L Regular Consensed:size=8
# Text alpha when using Xft
xftalpha 0.8
# mail spool
#mail_spool $MAIL
# 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 no
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 180 0
#Maximum size of conky
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
#stippled_borders 8
# border margins
border_margin 5
# border width
border_width 1
# Default colors and also border colors
default_color b5f9ff
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 35
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
# mldonkey_hostname Hostname for mldonkey stuff, defaults to localhost
# mldonkey_port Mldonkey port, 4001 default
# mldonkey_login Mldonkey login, default none
# mldonkey_password Mldonkey password, default none
# boinc (seti) dir
# seti_dir /opt/seti
# Possible variables to be used:
#
# Variable Arguments Description
# addr (interface) IP address for an interface
# acpiacadapter ACPI ac adapter state.
# acpifan ACPI fan state
# acpitemp ACPI temperature.
# adt746xcpu CPU temperature from therm_adt746x
# adt746xfan Fan speed from therm_adt746x
# alignr (num) Right-justify text, with space of N
# alignc Align text to centre
# battery (num) Remaining capasity in ACPI or APM
# battery. ACPI battery number can be
# given as argument (default is BAT0).
# buffers Amount of memory buffered
# cached Amount of memory cached
# color (color) Change drawing color to color
# cpu CPU usage in percents
# cpubar (height) Bar that shows CPU usage, height is
# bar's height in pixels
# cpugraph (height),(width) (gradient colour 1) (gradient colour 2)
# CPU usage graph
# downspeed net Download speed in kilobytes
# downspeedf net Download speed in kilobytes with one
# decimal
# downspeedgraph net (height),(width) (gradient colour 1) (gradient colour 2)
# Download speed graph
# exec shell command Executes a shell command and displays
# the output in conky. warning: this
# takes a lot more resources than other
# variables. I'd recommend coding wanted
# behaviour in C and posting a patch :-).
# execbar shell command Same as exec, except if the first value
# return is a value between 0-100, it
# will use that number for a bar.
# The size for the bar is currently fixed,
# but that may change in the future.
# execgraph shell command Same as execbar, but graphs values
# execi interval, shell Same as exec but with specific interval.
# command Interval can't be less than
# update_interval in configuration.
# fs_bar (height), (fs) Bar that shows how much space is used on
# a file system. height is the height in
# pixels. fs is any file on that file
# system.
# fs_free (fs) Free space on a file system available
# for users.
# fs_free_perc (fs) Free percentage of space on a file
# system available for users.
# fs_size (fs) File system size
# fs_used (fs) File system used space
# hr (height) Horizontal line, height is the height in
# pixels
# i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev
# may be omitted if you have only one I2C
# device. type is either in (or vol)
# meaning voltage, fan meaning fan or
# temp/tempf (first in C, second in F)
# meaning temperature. n is number of the
# sensor. See /sys/bus/i2c/devices/ on
# your local computer.
# if_running (process) if PROCESS is running, display
# everything if_running and the matching $endif
# if_existing (file) if FILE exists, display everything between
# if_existing and the matching $endif
# if_mounted (mountpoint) if MOUNTPOINT is mounted, display everything between
# if_mounted and the matching $endif
# else Text to show if any of the above are not true
# kernel Kernel version
# linkstatus (interface) Get the link status for wireless connections
# loadavg (1), (2), (3) System load average, 1 is for past 1
# minute, 2 for past 5 minutes and 3 for
# past 15 minutes.
# machine Machine, i686 for example
# mails Mail count in mail spool. You can use
# program like fetchmail to get mails from
# some server using your favourite
# protocol. See also new_mails.
# mem Amount of memory in use
# membar (height) Bar that shows amount of memory in use
# memmax Total amount of memory
# memperc Percentage of memory in use
#
# metar_ob_time
# metar_temp
# metar_tempf Temp in F
# metar_windchill
# metar_dew_point There are a bunch of these
# metar_rh and they are self-explanatory
# metar_windspeed
# metar_winddir
# metar_swinddir
# metar_cloud
# metar_u2d_time
# ml_upload_counter total session upload in mb
# ml_download_counter total session download in mb
# ml_nshared_files number of shared files
# ml_shared_counter total session shared in mb, buggy
# in some mldonkey versions
# ml_tcp_upload_rate tcp upload rate in kb/s
# ml_tcp_download_rate tcp download rate in kb/s
# ml_udp_upload_rate udp upload rate in kb/s
# ml_udp_download_rate udp download rate in kb/s
# ml_ndownloaded_files number of completed files
# ml_ndownloading_files number of downloading files
#
# mpd_artist Artist in current MPD song
# (must be enabled at compile)
# mpd_album Album in current MPD song
# mpd_bar (height) Bar of mpd's progress
# mpd_bitrate Bitrate of current song
# mpd_status Playing, stopped, et cetera.
# mpd_title Title of current MPD song
# mpd_vol MPD's volume
# mpd_elapsed Song's elapsed time
# mpd_length Song's length
# mpd_percent Percent of song's progress
# new_mails Unread mail count in mail spool.
# nodename Hostname
# outlinecolor (color) Change outline color
# pre_exec shell command Executes a shell command one time before
# conky displays anything and puts output
# as text.
# processes Total processes (sleeping and running)
# running_processes Running processes (not sleeping),
# requires Linux 2.6
# shadecolor (color) Change shading color
# stippled_hr (space), Stippled (dashed) horizontal line
# (height)
# swapbar (height) Bar that shows amount of swap in use
# swap Amount of swap in use
# swapmax Total amount of swap
# swapperc Percentage of swap in use
# sysname System name, Linux for example
# offset pixels Move text over by N pixels
# tail logfile, lines (interval)
# Displays last N lines of supplied text
# text file. If interval is not supplied,
# Conky assumes 2x Conky's interval.
# Max of 30 lines.
# Max of 30 lines can be displayed.
# time (format) Local time, see man strftime to get more
# information about format
# totaldown net Total download, overflows at 4 GB on
# Linux with 32-bit arch and there doesn't
# seem to be a way to know how many times
# it has already done that before conky
# has started.
# top type, num This takes arguments in the form:
# top <name> <number>
# Basically, processes are ranked from
# highest to lowest in terms of cpu
# usage, which is what <num> represents.
# The types are: "name", "pid", "cpu", and
# "mem".
# There can be a max of 10 processes listed.
# top_mem type, num Same as top, except sorted by mem usage
# instead of cpu
# totalup net Total upload, this one too, may overflow
# updates Number of updates (for debugging)
# upspeed net Upload speed in kilobytes
# upspeedf net Upload speed in kilobytes with one
# decimal
# upspeedgraph net (height),(width) (gradient colour 1) (gradient colour 2)
# Upload speed graph
# uptime Uptime
# uptime_short Uptime in a shorter format
#
# seti_prog Seti@home current progress
# seti_progbar (height) Seti@home current progress bar
# seti_credit Seti@hoome total user credit
# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument
# stuff after 'TEXT' will be formatted on screen
#${color E52121}MUSIC ${hr 2}${color}
#Music Player: ${alignr} ${exec audtool version}
#Status: ${alignr}${exec audtool playback-status}
#${exec audtool current-song} ${alignr}${exec audtool current-song-length}
TEXT
${color 48a9d9}${font openlogos-archupdate:size=40}B ${font}${color} ${font size=12}${color 858585}Arch${color}${color 48a9d9}Linux${color}${font}
${color 48a9d9}SYSTEM ${hr 2}${color}
Host: ${alignr}${nodename}
Kernel: ${alignr}${kernel}
CPU: ${cpu cpu}% ${alignr}${cpubar 8,60 cpu}
RAM: $memperc% ${alignr}${membar 8,60}
Swap: $swapperc% ${alignr}${swapbar 8,60}
uptime: ${alignr}${uptime}
${color 48a9d9}NETWORK ${hr 2}${color}
Up: ${upspeed eth0} kb/s ${alignr}${upspeedgraph 8,60 66FF33 FF3333}
Down: ${downspeed eth0} kb/s ${alignr}${downspeedgraph 8,60 66FF33 FF3333}
${color 48a9d9}DATE ${hr 2}${color}
${alignc 35}${font Trebuchet MS:size=26}${time %H:%M}${font}
${alignc}${time %a %d %b %Y}
${color 48a9d9}TIEMPO ${hr 2}${color}
${font Weather:size=50}${execi 3600 python ~/.conky.py --location=CIXX0020 --datatype=WF}${font}
${alignr 50}${voffset -55}${font Weather:size=35}y${font} ${voffset -26}${font Trebuchet MS:size=23}${execi 3600 python ~/.conky.py --location=CIXX0020 --datatype=HT}$font
Salida del Sol: ${execi 3600 python ~/.conky.py --location=CIXX0020 --datatype=SR}
Puesta de Sol: ${execi 3600 python ~/.conky.py --location=CIXX0020 --datatype=SS}
${color 48a9d9}HD ${hr 2}${color}
Home:
${fs_used /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}
Windows:
${if_mounted /mnt/wintendo}${fs_used /mnt/wintendo}/${fs_size /mnt/wintendo} ${alignr}${fs_bar 8,60 /mnt/wintendo}
Multimedia:
${if_mounted /mnt/windows}${fs_used /mnt/windows}/${fs_size /mnt/windows} ${alignr}${fs_bar 8,60 /mnt/windows)
Radja escribió:@Luckas92
Si le quitas el gap_y 50 (o lo pones a 0) se te va abajo del todo?
Y no necesitas tener toda la explicación de los parámetros en el archivo de configuración, toda esa info está en la página de man de conky y en la web
total_run_times 0
use_xft yes
xftfont Liberation Sans:size=8
update_interval 1
total_run_times 0
double_buffer yes
no_buffers yes
text_buffer_size 1024
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
minimum_size 185 0
maximum_width 185
default_color white
draw_shades no
color0 white
color1 FCAF3E
color2 white
alignment top_right
gap_x 25
gap_y 50
no_buffers no
net_avg_samples 2
override_utf8_locale yes
/usr/local/bin/conky_start: line 1: !/bin/bash: No such file or directory
Conky: statfs '/media/FAE4D425E4D3E1C5': No such file or directory
Conky: desktop window (1e000aa) is subwindow of root window (ac)
Conky: window type - override
Conky: drawing to created window (0x4000001)
Conky: drawing to double buffer
Conky: statfs '/media/FAE4D425E4D3E1C5': No such file or directory
Conky: desktop window (1e000aa) is subwindow of root window (ac)
Conky: window type - override
Conky: drawing to created window (0x4200001)
Conky: drawing to double buffer
Conky: statfs '/media/FAE4D425E4D3E1C5': No such file or directory
Conky: statfs '/media/FAE4D425E4D3E1C5': No such file or directory
^CConky: received SIGINT or SIGTERM to terminate. bye!
Conky: received SIGINT or SIGTERM to terminate. bye!
background yes
use_xft yes
#xftfont Bitstream Vera Sans Mono:size=9:bold
xftfont Bitstream Vera Sans Mono:size=9
xftalpha 1.0
text_buffer_size 2048
update_interval 1
total_run_times 0
own_window yes
own_window_type override
#own_window_argb_visual yes
#own_window_argb_value 10
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_colour 262523
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
#border_margin 5
border_width 1
minimum_size 318 500
maximum_width 318
default_color black
default_shade_color 000000
default_outline_color 000000
alignment top_left
gap_x 20
gap_y 10
no_buffers yes
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
uppercase no # set to yes if you want all text to be in uppercase
use_spacer right
default_color black
top_name_width 13
lua_load ~/.scripts/master.lua
lua_draw_hook_pre conky_main
TEXT
require 'cairo'
settings_rings_global = {
max=100,
bg_colour=0x808080,
bg_alpha=0.2,
fg_colour=0x2273b6,
fg_alpha=0.8,
radius=32,
thickness=7,
start_angle=-110,
end_angle=110,
}
settings_bars_global = {
arg='',
max=100,
width = 320,
height = 16,
borderColor = 0x888888,
borderAlpha = 0.9,
border_width=1.0,
fillColor = 0x151515,
fillColorTo = 0x2273b6,
fillAlpha = 0.8,
bg_color=0x2273b6,
bg_alpha=0.2,
warn = 0xffff00,
danger = 0xff0000,
}
settings_strings_global = {
name=nil,
arg='',
font='Bitstream Vera Sans Mono',
size=12,
color=0xffffff,
alpha=1.0,
bold=nil,
align='none',
exec_delay=30,
}
settings_graphs_global = {
arg='',
samples=100,
line_width=2,
max_value=100,
r=8,
bg_color=0x000000,
bg_alpha=0.3,
padding=8,
rules = { 30, 60, 90 },
rule_color=0xffffff,
rule_alpha=0.4,
rule_width=0.5,
}
settings_graph_lines_global = {
fg_color=0xC84545,
bg_color=0xC84545,
fg_alpha=0.75,
bg_alpha=0.38,
}
settings_rectangles_global = {
r=5,
color=0x000000,
alpha=0.2,
}
settings_graph_init=false
settings_rings = {
{ name='fs_used_perc', arg='/', x=40, y=355, },
{ name='fs_used_perc', arg='/home', x=120, y=355, },
{ name='fs_used_perc', arg='/mnt/data', x=205, y=355, },
{ name='fs_used_perc', arg='/mnt/vbox', x=290, y=355, },
}
settings_bars = {
{ name='memperc', x = 2, y = 203, },
{ name='swapperc',x = 2, y = 225, },
}
settings_strings = {
{ format='80%', size=9, alpha=0.5, x=12, y=108, },
{ format='60%', size=9, alpha=0.5, x=12, y=125, },
{ format='40%', size=9, alpha=0.5, x=12, y=142, },
{ format='20%', size=9, alpha=0.5, x=12, y=159, },
{ format='0%', size=9, alpha=0.5, x=12, y=175, },
{ name='nodename', format='Hostname: %s', x=-5, y=16, align='center', },
{ name='kernel', format='Kernel: %s', x=-5, y=32, align='center', },
{ name='uptime', format='Uptime: %s', x=-5, y=48, align='center', },
--{ name='exec', arg='date -d "`stat /var/lib/pacman/*db.tar* --format %y | sort | tail -n 1`"',
-- format='Last sync: %s', x=-5, y=64, align='center',
-- exec_delay=60, last_exec=nil, delay_count=0, },
{ name='exec', arg='date -d "`cat /usr/portage/metadata/timestamp.chk`"',
format='Last sync: %s', x=-5, y=64, align='center',
exec_delay=60, last_exec=nil, delay_count=0, },
{ name='exec', arg='currentmerge',
format='Current merge: %s', x=-5, y=80, align='center',
exec_delay=30, last_exec=nil, delay_count=0, },
{ name='freq_g', format='Freq: %sGHz', alpha=0.8, x=0, y=173, align='center', },
{ name='i8k_right_fan_rpm', format='Fan speed: %s RPM', x=4, y=197, },
{ name='exec', arg='nc localhost 7634 | cut -d"|" -f4',
format='HDD Temp: %sºC', x=4, y=197, align='right',
exec_delay=300, last_exec=nil, delay_count=0, },
{ format='Process list: CPU%', x=4, y=256, },
{ format='MEM%', x=4, y=256, align='right', },
{ name='top', arg='name 1', format='%s', x=4, y=272, },
{ name='top', arg='cpu 1', format='%s |', x=110, y=272, },
{ name='top_mem', arg='name 1', format='%s', x=176, y=272, },
{ name='top_mem', arg='mem 1', format='%s', x=5, y=272, align='right', },
{ name='top', arg='name 2', format='%s', x=4, y=288, },
{ name='top', arg='cpu 2', format='%s |', x=110, y=288, },
{ name='top_mem', arg='name 2', format='%s', x=176, y=288, },
{ name='top_mem', arg='mem 2', format='%s', x=5, y=288, align='right', },
{ name='top', arg='name 3', format='%s', x=4, y=304, },
{ name='top', arg='cpu 3', format='%s |', x=110, y=304, },
{ name='top_mem', arg='name 3', format='%s', x=178, y=304, },
{ name='top_mem', arg='mem 3', format='%s', x=5, y=304, align='right', },
{ format='root', x=25, y=345, },
{ format='home', x=105, y=345, align='left', },
{ format='data', x=110, y=345, align='right', },
{ format='vbox', x=25, y=345, align='right', },
{ name='fs_free', arg='/', format='%s', x=15, y=360, },
{ name='fs_free', arg='/home', format='%s', x=95, y=360, align='left', },
{ name='fs_free', arg='/mnt/data', format='%s', x=100, y=360, align='right', },
{ name='fs_free', arg='/mnt/vbox', format='%s', x=15, y=360, align='right', },
{ name='hwmon', arg='1 temp 1', format='Temp 1: %sºC', alpha=0.8, x=12, y=102, },
{ name='hwmon', arg='2 temp 1', format='Temp 2: %sºC', alpha=0.8, x=12, y=118, },
{ name='cpu', arg='cpu1', format='Load 1: %s%%', alpha=0.8, x=230, y=102, },
{ name='cpu', arg='cpu2', format='Load 2: %s%%', alpha=0.8, x=230, y=118, },
{ format='RAM', size=10, alpha=0.8, x=8, y=215, },
{ name='mem', format='%s /', size=10, alpha=0.8, x=115, y=215, align='right', },
{ name='memmax', format='%s', size=10, alpha=0.8, x=56, y=215, align='right', },
{ name='memperc', format='(%s%%)', size=10, alpha=0.8, x=16, y=215, align='right', },
{ format='SWAP', size=10, alpha=0.8, x=8, y=237, },
{ name='swap', format='%s /', size=10, alpha=0.8, x=115, y=237, align='right', },
{ name='swapmax', format='%s', size=10, alpha=0.8, x=56, y=237, align='right', },
{ name='swapperc', format='(%s%%)', size=10, alpha=0.8, x=16, y=237, align='right', },
{ name='addr', arg='wlan0', opt_arg='eth0',
--format='Host: %s',
format='Host: ${if_up %s}${%s %s}${else}${%s %s}${endif}',
x=2, y=390, },
{ name='gw_ip', format='Gateway: %s', x=8, y=390, align='right', },
{ name='wireless_essid', arg='wlan0', opt_arg='',
--format='ESSID: [%s]',
format='ESSID: ${if_up %s}[${%s %s}]${else}${if_up eth0}(using eth0)${else}(disconnected)${endif}${endif}',
x=2, y=405, },
{ name='wireless_link_qual_perc', arg='wlan0', opt_arg='',
--format='Quality: %s%%',
format='Quality: ${if_up %s}${%s %s}%%${else}${if_up eth0}(using eth0)${else}(disconnected)${endif}${endif}',
x=8, y=405, align='right', },
{ name='downspeed', arg='wlan0', opt_arg='eth0',
--format='D: %s/s',
format='D: ${if_up %s}${%s %s}${else}${%s %s}${endif}/s',
x=12, y=432, },
{ name='upspeed', arg='wlan0', opt_arg='eth0',
--format='U: %s/s',
format='U: ${if_up %s}${%s %s}${else}${%s %s}${endif}/s',
alpha=0.8, x=12, y=447, },
{ name='totaldown', arg='wlan0', opt_arg='eth0',
--format='Total: %s',
format='Total: ${if_up %s}${%s %s}${else}${%s %s}${endif}', font='Verdana',
alpha=0.8, x=226, y=432, },
{ name='totalup', arg='wlan0', opt_arg='eth0',
--format='Total: %s',
format='Total: ${if_up %s}${%s %s}${else}${%s %s}${endif}', font='Verdana',
alpha=0.8, x=226, y=447, },
}
settings_graphs = {
{
graph_lines = {
{ name='upspeedf', arg='wlan0', opt_arg='eth0', opt_cond='if_up',
vector={}, fg_color=0xc8c8c8, bg_color=0xc8c8c8, },
{ name='downspeedf', arg='wlan0', opt_arg='eth0', opt_cond='if_up',
vector={}, fg_color=0xa8c859, bg_color=0xa8c859, },
},
index=1, gx=0, gy=0, gw=0, gh=0,
x=2, y=412, w=320, h=90, rules = { 30, 60, 90, 120, 150 }, rule_alpha=0.4,max_value=150,
},
{
graph_lines = {
{ name='cpu', arg='cpu0', vector={}, fg_color=0xC84545, bg_color=0xC84545, },
},
index=1, gx=0, gy=0, gw=0, gh=0,
x=2, y=85, w=320, h=100, rules = { 20, 40, 60, 80,100},
},
}
settings_rectangles = {
{ x=7, y=88, w=105, h=36, },
{ x=218, y=88, w=100, h=36, },
{ x=7, y=418, w=100, h=35, },
{ x=218, y=418, w=100, h=35, },
}
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function def(mod, orig, obj)
return mod[obj] and mod[obj] or orig[obj]
end
function draw_ring(cr, pt)
local gl = settings_rings_global
local w,h=conky_window.width,conky_window.height
local xc,yc,ring_r,ring_w,sa,ea=def(pt,gl,'x'),def(pt,gl,'y'),def(pt,gl,'radius'),def(pt,gl,'thickness'),def(pt,gl,'start_angle'),def(pt,gl,'end_angle')
local bgc, bga, fgc, fga=def(pt,gl,'bg_colour'), def(pt,gl,'bg_alpha'), def(pt,gl,'fg_colour'), def(pt,gl,'fg_alpha')
local value = tonumber(conky_parse(string.format('${%s %s}',def(pt,gl,'name'),def(pt,gl,'arg'))))
if ( value == nil ) then value = 0 end
local pct = value / def(pt,gl,'max')
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=pct*(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_bar(cr, pt)
local gl = settings_bars_global
cairo_set_source_rgba (cr, rgb_to_r_g_b(def(pt,gl,'borderColor'),def(pt,gl,'borderAlpha')))
cairo_set_line_width (cr, def(pt,gl,'border_width'))
cairo_rectangle (cr, def(pt,gl,'x'), def(pt,gl,'y'), def(pt,gl,'width'), def(pt,gl,'height'))
cairo_stroke (cr)
cairo_set_source_rgba (cr, rgb_to_r_g_b(def(pt,gl,'bg_color'),def(pt,gl,'bg_alpha')))
cairo_rectangle (cr, def(pt,gl,'x')+1, def(pt,gl,'y')+1, def(pt,gl,'width')-2, def(pt,gl,'height')-2)
cairo_fill(cr)
local value = tonumber(conky_parse(string.format('${%s %s}',def(pt,gl,'name'),def(pt,gl,'arg'))))
if ( value == nil ) then value = 0 end
local pct = value / def(pt,gl,'max')
cairo_rectangle (cr, def(pt,gl,'x') + 1, def(pt,gl,'y') + 1, (def(pt,gl,'width') - 2) *pct, def(pt,gl,'height') - 2)
local pat = cairo_pattern_create_linear (def(pt,gl,'x') + (def(pt,gl,'width') * pct), def(pt,gl,'y'), (def(pt,gl,'x')) - (def(pt,gl,'width') * (pct)), def(pt,gl,'y'))
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(def(pt,gl,'fillColor'), def(pt,gl,'fillAlpha')))
if pct < .5 then
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(def(pt,gl,'fillColorTo'), def(pt,gl,'fillAlpha')))
elseif pct >= .5 and pct < .8 then
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(def(pt,gl,'warn'), def(pt,gl,'fillAlpha')))
elseif pct >= .8 then
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(def(pt,gl,'danger'), def(pt,gl,'fillAlpha')))
end
cairo_pattern_add_color_stop_rgba (pat, .3, rgb_to_r_g_b(def(pt,gl,'fillColorTo'), def(pt,gl,'fillAlpha')))
cairo_set_source (cr, pat)
cairo_fill (cr)
cairo_pattern_destroy (pat)
end
function trim(s)
local from = s:match"^%s*()"
return from > #s and "" or s:match(".*%S", from)
end
function string_pixelsize_trim(cr, str)
local extents = cairo_text_extents_t:create()
tolua.takeownership(extents)
cairo_text_extents(cr, str, extents)
return extents.width
end
function string_pixelsize(cr, str)
local extents = cairo_text_extents_t:create()
tolua.takeownership(extents)
cairo_text_extents(cr, str, extents)
return extents.x_advance
end
function draw_string(cr,pt)
local gl = settings_strings_global
if settings_strings_global.bold ~= nil then
cairo_select_font_face(cr, def(pt,gl,'font'), CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD)
else
cairo_select_font_face(cr, def(pt,gl,'font'), CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
end
cairo_set_font_size(cr, def(pt,gl,'size'))
if settings_strings_global.color ~= nil then
cairo_set_source_rgba(cr, rgb_to_r_g_b(settings_strings_global.color, def(pt,gl,'alpha')))
else
cairo_set_source_rgba(cr, rgb_to_r_g_b(def(pt,gl,'color'), def(pt,gl,'alpha')))
end
local str = ''
--if pt['type'] == 'net' then
-- print(conky_parse(def(pt,gl,'name')))
--end
if def(pt,gl,'name') ~= nil then
if def(pt,gl,'name') == 'exec' then
if pt.delay_count == 0 then
pt.last_exec = conky_parse(string.format(def(pt,gl,'format'), string.format('${%s %s}', def(pt,gl,'name'), def(pt,gl,'arg'))))
end
str = def(pt,gl,'last_exec')
if pt.delay_count < def(pt,gl,'exec_delay') then
pt.delay_count = pt.delay_count + 1
else
pt.delay_count = 0
end
else
if pt['opt_arg'] == nil then
str = conky_parse(string.format(def(pt,gl,'format'), string.format('${%s %s}', def(pt,gl,'name'), def(pt,gl,'arg'))))
else
if def(pt,gl,'opt_arg') ~= '' then
str = conky_parse(string.format(def(pt,gl,'format'), def(pt,gl,'arg'), def(pt,gl,'name'), def(pt,gl,'arg'), def(pt,gl,'name'), def(pt,gl,'opt_arg')))
else
str = conky_parse(string.format(def(pt,gl,'format'), def(pt,gl,'arg'), def(pt,gl,'name'), def(pt,gl,'arg'), def(pt,gl,'opt_arg')))
end
end
end
else
str = def(pt,gl,'format')
end
if def(pt,gl,'align') == 'right' then
cairo_move_to(cr, conky_window.width - ((string_pixelsize(cr, str) + def(pt,gl,'x'))), def(pt,gl,'y'))
elseif def(pt,gl,'align') == 'center' then
cairo_move_to(cr, (conky_window.width/2) - ((string_pixelsize(cr, str) + def(pt,gl,'x'))/2), def(pt,gl,'y'))
else
cairo_move_to(cr, def(pt,gl,'x'), def(pt,gl,'y'))
end
cairo_show_text(cr, str)
cairo_stroke(cr)
end
function init_graph(pt)
local gl = settings_graphs_global
pt.gx = def(pt,gl,'x')+def(pt,gl,'padding')
pt.gy = def(pt,gl,'y')+def(pt,gl,'h')-def(pt,gl,'padding')
pt.gw = def(pt,gl,'w')-2*def(pt,gl,'padding')
pt.gh = def(pt,gl,'h')-2*def(pt,gl,'padding')
for i in pairs(pt.graph_lines) do
for j=1, def(pt,gl,'samples'), 1 do
pt.graph_lines[i].vector[j] = 0
end
end
end
function rounded_rectangle(cr, x1, y1, x2, y2, r)
cairo_move_to(cr, x2-r, y1)
cairo_arc(cr, x2-r, y1+r, r, 3*math.pi/2, 2*math.pi) -- top right
cairo_line_to(cr, x2, y2-r) -- right
cairo_arc(cr, x2-r, y2-r, r, 0, math.pi/2) -- bottom right
cairo_line_to(cr, x1+r, y2) -- bottom
cairo_arc(cr, x1+r, y2-r, r, math.pi/2, math.pi) -- bottom left
cairo_line_to(cr, x1, y1+r) -- left
cairo_arc(cr, x1+r, y1+r, r, math.pi, 3*math.pi/2) -- top left
cairo_close_path(cr) -- top
end
function draw_rectangle(cr, pt)
local gl = settings_rectangles_global
cairo_set_source_rgba(cr, rgb_to_r_g_b(def(pt,gl,'color'),def(pt,gl,'alpha')))
rounded_rectangle(cr,def(pt,gl,'x'),def(pt,gl,'y'), def(pt,gl,'x')+def(pt,gl,'w'),def(pt,gl,'y')+def(pt,gl,'h'), def(pt,gl,'r'))
cairo_fill(cr)
end
function draw_graph(cr,pt,update)
local gl = settings_graphs_global
-- draw bg
rounded_rectangle(cr, def(pt,gl,'x'), def(pt,gl,'y'), def(pt,gl,'x')+def(pt,gl,'w'), def(pt,gl,'y')+def(pt,gl,'h'), def(pt,gl,'r'))
cairo_set_source_rgba(cr, rgb_to_r_g_b(def(pt,gl,'bg_color'), def(pt,gl,'bg_alpha')))
cairo_fill(cr)
-- draw rules
cairo_set_line_width(cr,def(pt,gl,'rule_width'))
cairo_set_source_rgba(cr, rgb_to_r_g_b(def(pt,gl,'rule_color'), def(pt,gl,'rule_alpha')))
cairo_move_to(cr, def(pt,gl,'gx'), def(pt,gl,'gy'))
cairo_rel_line_to(cr, def(pt,gl,'gw'), 0)
cairo_stroke_preserve(cr)
cairo_stroke(cr)
for i=1, #def(pt,gl,'rules'), 1 do
cairo_move_to(cr, def(pt,gl,'gx'), def(pt,gl,'gy') - def(pt,gl,'rules')[i]*def(pt,gl,'gh')/def(pt,gl,'max_value'))
cairo_rel_line_to(cr, def(pt,gl,'gw'), 0)
cairo_stroke(cr)
end
for i in pairs(pt.graph_lines) do
local fotmat, value
local gline = pt.graph_lines[i]
local gll = settings_graph_lines_global
local index = ((def(pt,gl,'index')) % def(pt,gl,'samples'))
if update then
if def(gline,gll,'opt_arg') == nil then
format = string.format('${%s %s}',def(gline,gll,'name'), def(gline,gll,'arg'))
else
format = string.format('${%s %s}${%s %s}${else}${%s %s}${endif}',def(gline,gll,'opt_cond'), def(gline,gll,'arg'),
def(gline,gll,'name'), def(gline,gll,'arg'), def(gline,gll,'name'), def(gline,gll,'opt_arg'))
end
value = tonumber(conky_parse(format))
if value ~= nil and value > def(pt,gl,'max_value') then
value = def(pt,gl,'max_value')
end
gline.vector[def(pt,gl,'index')] = value
index = index +1
end
-- draw graphs
cairo_set_line_width(cr, def(pt,gl,'line_width'))
cairo_set_source_rgba(cr, rgb_to_r_g_b(def(gline,gll,'fg_color'),def(gline,gll,'fg_alpha')))
cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND)
local val = gline.vector[((1+index-2) % def(pt,gl,'samples'))+1]
if val == nil then val = 0 end
cairo_move_to(cr,def(pt,gl,'gx'), def(pt,gl,'gy') - val*def(pt,gl,'gh')/def(pt,gl,'max_value'))
for i=2, def(pt,gl,'samples'), 1 do
val = gline.vector[((i+index-2) % def(pt,gl,'samples'))+1]
if val == nil then val = 0 end
cairo_line_to(cr, def(pt,gl,'gx') + def(pt,gl,'gw')/def(pt,gl,'samples')*i, def(pt,gl,'gy') - val*def(pt,gl,'gh')/def(pt,gl,'max_value'))
end
cairo_stroke_preserve(cr)
cairo_set_source_rgba(cr, rgb_to_r_g_b(def(gline,gll,'bg_color'),def(gline,gll,'bg_alpha')))
cairo_line_to(cr, def(pt,gl,'gx')+def(pt,gl,'gw'), def(pt,gl,'gy'))
cairo_line_to(cr, def(pt,gl,'gx'), def(pt,gl,'gy'))
cairo_close_path(cr)
cairo_fill(cr)
end
pt.index = pt.index % def(pt,gl,'samples')
if update then
pt.index = pt.index +1
end
end
function conky_main()
-- start main
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)
update_num=tonumber(conky_parse('${updates}'))
if update_num==1 or settings_graph_init==false then
for i in pairs(settings_graphs) do
init_graph(settings_graphs[i])
end
settings_graph_init=true
end
if update_num>5 then
for i in pairs(settings_rings) do
draw_ring(cr,settings_rings[i])
end
for i in pairs(settings_bars) do
draw_bar(cr, settings_bars[i])
end
for i in pairs(settings_graphs) do
draw_graph(cr, settings_graphs[i], last_num ~= update_num)
end
for i in pairs(settings_rectangles) do
draw_rectangle(cr, settings_rectangles[i])
end
for i in pairs(settings_strings) do
draw_string(cr, settings_strings[i])
end
end
cairo_destroy(cr)
cr = nil
last_num = update_num
end
function conky_cairo_cleanup()
cairo_surface_destroy(cs)
cs = nil
end
Pyronhell escribió:¿Alguien sabe por qué me puede pasar esto?
.....
Solo para cuando hago logon (tengo el script puesto en sistema > preferencias > programas al inicio), si mato el proceso y lo inicio desde terminal, con alt+f2 o cualquier cosa ya sale bien.
Flipas con la CPU que usa el script este ><
#!/bin/bash
sleep 10
conky