Aumentando a altura de conky

5

Existe alguma maneira de alterar a altura de uma janela conky?

.conkyrc

background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
#imlib_cache_size 0

# Window specifications #

own_window_class Conky
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes

border_inner_margin 0
border_outer_margin 0

minimum_size 200 200
maximum_width 200

alignment tr
gap_x 0
gap_y 25

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

# Text settings #
use_xft yes
xftfont Ubuntu:size=8
xftalpha 0.5

uppercase no
temperature_unit celsius
default_color FFFFFF

# Lua Load  #
lua_load ~/.conky/draw_bg.lua
lua_draw_hook_pre draw_bg

lua_load ~/.conky/clock_rings.lua
lua_draw_hook_post clock_rings

TEXT
${voffset 8}${goto 25}${color FFFFFF}${font Ubuntu:size=16}${time %A}${font}${voffset -8}${alignr 50}${color FFFFFF}${font Ubuntu:size=38}${time %e}${font}
${color FFFFFF}${goto 25}${voffset -30}${color FFFFFF}${font Ubuntu:size=18}${time %b}${goto 75}${font Ubuntu:size=20}${time %Y}${font}${color 0B8904}
${voffset 150}${font Ubuntu:size=10}${font}
${font Ubuntu:size=12}${color FFFFFF}${alignr}${font}
${voffset -20}${alignr 50}${color FFFFFF}${font Ubuntu:size=38}${time %H}${font}
${alignr 50}${color FFFFFF}${font Ubuntu:size=38}${time %M}${font}

${voffset -95}
${color FFFFFF}${goto 23}${voffset 48}${cpu cpu0}%
${color 0B8904}${goto 23}CPU
${color FFFFFF}${goto 48}${voffset 23}${memperc}%
${color 0B8904}${goto 48}RAM
${color FFFFFF}${goto 73}${voffset 23}${swapperc}%
${color 0B8904}${goto 73}Swap
${color FFFFFF}${goto 98}${voffset 23}${fs_used_perc /}%
${color 0B8904}${goto 98}Disk
${color FFFFFF}${voffset 25}${alignr 62}${downspeed eth1}${goto 135}D
${color FFFFFF}${alignr 62}${upspeed eth1}${goto 135}U 
${color 0B8904}${goto 123}Net

${color FFFFFF}${font Ubuntu:size=8}${goto 55}Uptime: ${goto 100}${uptime_short}
${color FFFFFF}${font Ubuntu:size=8}${goto 42}Processes: ${goto 100}${processes}
${color FFFFFF}${font Ubuntu:size=8}${goto 50}Running: ${goto 100}${running_processes}}

script de lua draw_bg

-- Change these settings to affect your background.
-- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.

corner_r=0

-- Set the colour and transparency (alpha) of your background.

bg_colour=0x000000
bg_alpha=.8

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 conky_draw_bg()
    if conky_window==nil then return end
    local w=conky_window.width
    local h=conky_window.height
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
    cr=cairo_create(cs)

    cairo_move_to(cr,corner_r,0)
    cairo_line_to(cr,w-corner_r,0)
    cairo_curve_to(cr,w,0,w,0,w,corner_r)
    cairo_line_to(cr,w,h-corner_r)
    cairo_curve_to(cr,w,h,w,h,w-corner_r,h)
    cairo_line_to(cr,corner_r,h)
    cairo_curve_to(cr,0,h,0,h,0,h-corner_r)
    cairo_line_to(cr,0,corner_r)
    cairo_curve_to(cr,0,0,0,0,corner_r,0)
    cairo_close_path(cr)

    cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
    cairo_fill(cr)
end

Screenshot do setup

Pergunta

Euqueroaumentarofundo(desenhadopeloscriptluausandoconky_window.height)paraocupartodaaalturadatela.

Tentou

  • Alterarminimum_sizenãotemefeito
  • Adicionarlinhasnobottonãotemefeito,consulte link

Corrigir

Acontece que conky_window.height usado pelo script lua é preservado entre reinicializações conky. Efetuando logout e back in resolve esse problema. Alterar minimum_size funciona.

    
por user80551 04.01.2014 / 19:36

2 respostas

1

Basta adicionar ${voffset 200} no final do arquivo .conckyrc e reproduzir com o valor.

    
por 05.01.2014 / 07:57
2

Basta adicionar algumas linhas vazias no final do seu .conkyrc .
Muito bom script BTW.

    
por 04.01.2014 / 19:53