You are not logged in.

#726 2011-05-31 05:07:34

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: conky configs and screenshots!

djhalolegend wrote:

I had this issue too after a recent pacman -Syu. There was a missing module:

modprobe snd-pcm-oss

Thanks, that did the trick. I also added it to rc.conf to have it automatically loaded.

Offline

#727 2011-05-31 22:17:07

misteraibo
Member
Registered: 2011-05-31
Posts: 1

Re: conky configs and screenshots!

i_needed_a_new_conky_by_misteraibo-d3hpvrn.png

alignment tl
background yes
border_width 1
cpu_avg_samples 2
default_color aaaaaa
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
double_buffer yes

use_xft yes
xftfont Terminus:pixelsize=11

gap_x 5
gap_y 5
minimum_size 350 200
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window no
own_window_class Conky
own_window_type desktop
own_window_transparent yes
stippled_borders 0
update_interval 1
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
color0 aaaaaa
color1 dddddd


TEXT
$color1$nodename$color0
  |___$color1$kernel$color0
  |
  |___CPUs
  |   |__CPU1___$color1${cpu cpu0}%$color0
  |   |  '-${cpugraph cpu0 11, 192}
  |   |__CPU2___$color1${cpu cpu1}%$color0
  |      '-${cpugraph cpu1 11, 192}
  |
  |___RAM___$color1${memperc}%$color0
  |   |__${mem}/${memmax}
  |      '-${memgraph 11, 192}
  |
  ${if_up eth0}|___eth0___$color1${addr eth0}$color0
  |   |__><___$color1${upspeed eth0}$color0
  |   |  '-${upspeedgraph eth0 11, 192}
  |   |__<>___$color1${downspeed eth0}$color0
  |      '-${downspeedgraph eth0 11, 192}
  |${endif}
  |___HDD
  |   |__/_______________${color1}${fs_used /}${color0}/${color1}${fs_size /}${color0}
  |   |  '-${fs_bar 11, 192 /}
  |   |__/mnt/Storage___${color1}${fs_used /mnt/Storage}${color0}/${color1}${fs_size /mnt/Storage}${color0}
  |   |  '-${fs_bar 11, 192 /mnt/Storage}
  |   |__/mnt/wokna_____${color1}${fs_used /mnt/wokna}${color0}/${color1}${fs_size /mnt/wokna}${color0}
  |      '-${fs_bar 11, 192 /mnt/wokna}
  |
  |___${time %x___%A}
  |   |__${time %Z}: $color1${time %T}$color0
  |   |__UNIX: $color1${time %s}$color0
  |   |__Uptime: $color1$uptime$color0
  |
  |___Volume___Master: ${color1}${execi 1 amixer sget 'Master',0 | grep Mono: | sed 's/^[^[]*\[/[/g' | sed 's/\[[^%]*dB\] //g'}${color0}
${if_running nyxmms2}  |   |__Front: ${color1}${execi 1 amixer sget 'Front',0 | grep Left: | sed 's/^[^[]*\[/[/g' | sed 's/\[[^%]*dB\] //g'}${color0}
  |   |__Back: ${color1}${execi 1 amixer sget 'Surround',0 | grep Left: | sed 's/^[^[]*\[/[/g' | sed 's/\[[^%]*dB\] //g'}${color0}
  |   |__Center: ${color1}${execi 1 amixer sget 'Center',0 | grep Mono: | sed 's/^[^[]*\[/[/g' | sed 's/\[[^%]*dB\] //g'}${color0}
  |
  |___nyxmms2___${color1}${execi 1 nyxmms2 status | sed 's/:.*$//g'}${color0}___${color1}${exec nyxmms2 status | sed 's/^[^:]*:[^:]*: //g'}${color0}
      |___${execi 1 nyxmms2 status | sed 's/^[^:]*: //g' | sed 's/ - .*//g'}
          |___${color1}${execi 1 nyxmms2 status | sed 's/^[^-]*- //g' | sed 's/:.*$//g'}${color0}
${else}      |__Front: ${color1}${execi 1 amixer sget 'Front',0 | grep Left: | sed 's/^[^[]*\[/[/g' | sed 's/\[[^%]*dB\] //g'}${color0}
      |__Back: ${color1}${execi 1 amixer sget 'Surround',0 | grep Left: | sed 's/^[^[]*\[/[/g' | sed 's/\[[^%]*dB\] //g'}${color0}
      |__Center: ${color1}${execi 1 amixer sget 'Center',0 | grep Mono: | sed 's/^[^[]*\[/[/g' | sed 's/\[[^%]*dB\] //g'}${color0}
${endif}

Offline

#728 2011-06-03 08:25:31

Nephew
Member
Registered: 2011-06-03
Posts: 7

Re: conky configs and screenshots!

screenshot1cx.th.jpg

You can download this complete theme OR the conky file here:
http://box-look.org/content/show.php/Be … ent=142341

smile

Offline

#729 2011-06-03 14:52:30

Shinryuu
Member
From: /dev/urandom
Registered: 2010-02-27
Posts: 339

Re: conky configs and screenshots!

This is for people who likes horizontal conky configurations:
tOHduNQ
Here's the code:

# font
use_xft yes
xftfont Sazanami Gothic:size=9
override_utf8_locale yes

# colors
default_color eab93d
own_window_colour 000000

# minimum size of text area
minimum_size 1920 0

# inner margin
border_inner_margin 0

# position
gap_x 0
gap_y 0

# avoid flicker
double_buffer yes

# options
own_window  yes
own_window_transparent no
own_window_type override
alignment bottom_left
background yes
update_interval 2
use_spacer none

# minimum size of text area
minimum_size 1920 0

TEXT
${alignc}${color ffffff}${if_match "${mpd_status}"=="Playing"} $mpd_smart$else${mpd_status}$endif}${color} ${color 353535}|${color} Uptime: ${color ffffff}${uptime_short}${color} ${color 353535}|${color} CPU0=${color ffffff}${cpu cpu1}% ${color 353535}-${color} ${color ffffff}${freq 1}MHz${color} CPU1=${color ffffff}${cpu cpu2}% ${color 353535}-${color} ${color ffffff}${freq 2}MHz${color} ${color 353535}|${color} /: ${color ffffff}${fs_free /}${color} /tmp: ${color ffffff}${fs_free /tmp}${color} /home: ${color ffffff}/${fs_free /home}${color} ${color 353535}|${color} Down: ${color ffffff}${totaldown wlan0}${color} Speed: ${color ffffff}${downspeed wlan0}${color} Up: ${color ffffff}${totalup wlan0}${color} Speed: ${color ffffff}${upspeed wlan0}${color}

Last edited by Shinryuu (2011-06-03 15:01:17)

Offline

#730 2011-06-05 20:13:48

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

Sometimes things are just too good not to be seen.  Like conkyForecast with colours!

And this has to be seen to be appreciated, the background LUA originally by londonali1010 (2009) as modified by dk75 and mrpeachy.  dk75 added the ability to set variables and mrpeachy the ability to set any size. As you see this has a combination of affects. All mrpeachy's ideas, I'm just expanding on it here.

Done in the conky not the LUA script.... NICE!
thmb_mrpeachy-multi-bg_1.png

This background LUA script is great!  The first layer is the complete semi-transparent black background with rounded corners set at an alpha level of 0.4.

The next comes the blocks of colours for various sections of the conky.  Here the different days are just a ripe choice for that, I've set their alpha level at 0.2 for this example.

Now some the little white boxes for the images set and positioned very similar to the way the ${image} command works I found that they are out by a few pixels, but close enough that the "-p xx,xx" portion of the images will get you close enough to make the final adjustments.

I have alpha setting set to 0.1 and 0.2 under HOY for today's weather image and the moon.  Under Lunes: 0.3, Martes: 0.4 and Míercoles:0.5 just to show various affects.  Lunes, Martes and Míercoles started showing rounded corners on the white boxes as well, values of 2,3 and 4 respectively.

Different backgrounds:
thmb_mrpeachy-multi-bg_2.png
Yea, that's nice.  Thank you  mrpeachy

the LUA script:

--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

the conky bits that matter (sample):
_ _ _ _ _ _ _ _ _ _
lua_load ~/lua/background.lua

TEXT
${lua conky_draw_bg 10 100 100 100 100 0x000000 0.2}
${lua conky_draw_bg 10 200 200 100 100 0x000000 0.2}
${lua conky_draw_bg 10 100 300 100 100 0x000000 0.2}

#${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

${execpi 1800 conkyForecast --template=~/lua/test.template}
_ _ _ _ _ _ _ _ _ _
test template:
_ _ _ _ _ _ _ _ _ _
${image [--datatype=WI --startday=1]  -p 100,100 -s 90x90}
${image [--datatype=WI --startday=2]  -p 200,200 -s 90x90}
${image [--datatype=WI --startday=3]  -p 100,300 -s 90x90}
${image [--datatype=WI --startday=4]  -p 200,400 -s 90x90}
_ _ _ _ _ _ _ _ _ _

or you can have one background over the whole window
and others to highlight parts of the conky
_ _ _ _ _ _ _ _ _ _
TEXT
${lua conky_draw_bg 50 0 0 400 800 0x000000 0.2} # whole background
${lua conky_draw_bg 20 100 100 100 100 0x000000 0.2} # dark shade
${lua conky_draw_bg 0 200 200 100 100 0xffffff 0.2} # light square
${lua conky_draw_bg 50 100 300 100 100 0xff0000 0.2} # red circle
_ _ _ _ _ _ _ _ _ _

]]

require 'cairo'
local    cs, cr = nil
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(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) 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)
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end

I took the liberty of adding some instructions to the top.

And what I use in the conky for this example:

####################################
 border_inner_margin 2
# border_outer_margin 0
####################################
 lua_load ~/Conky/LUA/m-bg.lua
# ${lua conky_draw_bg 50 100 0 400 20 0x000000 0.2}
# ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
TEXT
${lua conky_draw_bg 30 0 0 90 920 0x000000 0.4}\
${lua conky_draw_bg 0 0 21 90 200 0xff0000 0.2}${lua conky_draw_bg 0 5 24 40 40 0xffffff 0.1}${lua conky_draw_bg 0 56 24 16 16 0xffffff 0.2}\
${lua conky_draw_bg 0 0 221 90 97 0xffff00 0.2}${lua conky_draw_bg 2 6 247 40 40 0xffffff 0.3}\
${lua conky_draw_bg 0 0 320 90 97 0x0000ff 0.2}${lua conky_draw_bg 3 6 341 40 40 0xffffff 0.4}\
${lua conky_draw_bg 4 6 443 40 40 0xffffff 0.5}\
${execpi 1800 conkyForecast --location=ARBA0009 --template=~/Conky/templates/ob_mb_weather.template}

The \ that you see on the ends of the lines confuses conky into thinking it's all one line.  Easier to code that way.

Offline

#731 2011-06-07 07:30:00

bolshevik
Member
Registered: 2011-04-24
Posts: 47

Re: conky configs and screenshots!

A simple horizontal conky, made for 1280x800 resolution. :
http://bayimg.com/nAIbOAadI

alignment                 tm
background                no
border_width              0
cpu_avg_samples           5
default_color             white
default_outline_color     white
draw_borders              no
draw_graph_borders        no
draw_outline              no
draw_shades               yes
default_shade_color      black
use_xft                   yes
xftfont                   Sans:size=10
xftalpha                  1
gap_x                     0
gap_y                     0
minimum_size              1280 15
maximum_width             1280
net_avg_samples           1
no_buffers                yes
out_to_console            no
own_window                yes
own_window_class          Conky
own_window_type           panel
own_window_transparent    no
own_window_color      black
own_window_hints          undecorated,sticky,skip_taskbar,skip_pager
#own_window_argb_visual    yes
#own_window_argb_value     130
update_interval           0.5
uppercase                 no
use_spacer                no
use_spacer                no
double_buffer             yes
short_units               yes
pad_percents              1
text_buffer_size          1024
temperature_unit          celsius
default_bar_size        42 8

TEXT
${kernel} Linux | Uptime ${uptime} | CPUs ${cpubar cpu1} ${cpubar cpu2} ${hwmon temp 1}C | Mem mem/$memmax | /root ${fs_free /} | /home ${fs_free /home} | Wireless is up on wlan0 (${wireless_link_qual_perc wlan0}%) | Download ${downspeed wlan0} (${totaldown wlan0}) | Upload ${upspeed wlan0} (${totalup wlan0})

Offline

#732 2011-06-12 20:15:29

SuNjACk
Member
Registered: 2011-02-27
Posts: 102

Re: conky configs and screenshots!

tOTE1cg

~/.config/conky/rc

background no
override_utf8_locale no

use_xft yes
xftfont cure:size=8
text_buffer_size 1024
update_interval 1.0
total_run_times 0

own_window yes
own_window_transparent yes
own_window_type desktop
own_window_colour 191919
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes

minimum_size  120 650
maximum_width 120

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

default_color 719f9f
color1 ff6565
default_shade_color 000000
default_outline_color 7f8f9f

alignment ml
gap_x 20
gap_y -20

no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no

border_inner_margin 5
border_outer_margin 5

own_window_argb_visual no
own_window_argb_value 200

lua_load ~/.config/conky/widgets.lua 
lua_draw_hook_pre main_first

TEXT
# -- CPU BLOCK -- #
${voffset 10}${goto 10}CPU ${color1}${running_processes}/${processes}$color
${goto 10}${machine} ${freq_g}GHz
${top cpu 1} - ${color1}${top name 1}${color}
${top cpu 2} - ${color1}${top name 2}${color}
${top cpu 3} - ${color1}${top name 3}${color}
${top cpu 4} - ${color1}${top name 4}${color}
${voffset 4}${goto 10}${loadavg}
${goto 10}$kernel
# -- MEMORY BLOCK -- #
${voffset 93}MEM $color1$memmax$color
Free: $color1$memfree$color
 ${top_mem mem_res 1} - ${color1}${top_mem name 1}${color}
 ${top_mem mem_res 2} - ${color1}${top_mem name 2}${color}
 ${top_mem mem_res 3} - ${color1}${top_mem name 3}${color}
 ${top_mem mem_res 4} - ${color1}${top_mem name 4}${color}
${voffset 3}Cache: $color1${cached}$color
Buff: $color1$buffers$color
# -- DISKS BLOCK -- #
${voffset 125}${color1}God${color} [${fs_size /}] ${color1}${fs_used_perc /}%$color ${fs_used /}
${color1}Data${color} [${fs_size /media/Data}] ${color1}${fs_used_perc /media/Data}%${color} ${fs_used /media/Data}

# -- MPD BLOCK -- #
${voffset 140}${color1}${mpd_album}${color}
${voffset 2}${alignr}${color1}${mpd_elapsed}${color} - ${mpd_length}

~/.config/conky/widgets.lua

-- conky Widgets
-- Rings + bars + multiple backgrounds
-- by SuNjACk

-- Background settings
main = { 
    bg        = { color = 0x000000, alpha = 0.8 },
    border    = { color = 0x719f9f, alpha = 0.8, thick = 0.5},
    --grad    = { color = 0x303030, direction = 'n' }, -- direction = North (n), Sud (s), West (w), East (e) -- can be diagonal (ex: nw, se)
    corner     = 30,
}

frames = {
    {
        geometry = { 0, 12, 138, 165 }, -- { x, y, w, h }
         settings = main
    },
    {
        geometry = { 0, 195, 138, 200 },
        settings = main
    },
    {
        geometry = { 0, 410, 138, 150 },
        settings = main
    },
    {
        geometry = { 0, 580, 138, 75 },
        settings = main
    }
}

-- Color settings
colors = {
    bg = { color = 0x121212, gradient = 0x000000, alpha = 1 },
    fg = { color = 0x909090, gradient = 0x404040, alpha = 1 },
}
-- Bars Settings
bar_settings_table = {
    {
        name='mpd_percent', arg='', max='100',
        x=11, y=635, width=113,
        thickness='8', padding=1,
        orientation='w', -- can be: n (north), s (sud), e (east) or w (west, is the default mode) -- It indicate where indicator start
        bg = colors.bg,
        fg = colors.fg,
    },
    {
        name='cpu', arg='cpu1', max=100,
        x=10, y=125, width=115,
        thickness='6', padding=1,
        orientation='w',
        bg = colors.bg,
        fg = colors.fg,
    },
    {
        name='cpu', arg='cpu2', max=100,
        x=10, y=135, width=115,
        thickness='6', padding=1,
        orientation='w',
        bg = colors.bg,
        fg = colors.fg,
    },
    {
        name='cpu', arg='cpu3', max=100,
        x=10, y=145, width=115,
        thickness='6', padding=1,
        orientation='w',
        bg = colors.bg,
        fg = colors.fg,
    },
    {
        name='cpu', arg='cpu4', max=100,
        x=10, y=155, width=115,
        thickness='6', padding=1,
        orientation='w',
        bg = colors.bg,
        fg = colors.fg,
    },
}
-- Rings settings
ring_settings_table = {
    {
        name='fs_used_perc', arg='/', max=100,
        x=95, y=500,
        bg = colors.bg,
        fg = colors.fg,
        radius=25,
        thickness=8,
        start_angle=-60,
        end_angle=240,
        padding=1.5
    },
    {
        name='fs_used_perc', arg='/media/Data', max=100,
        bg = colors.bg,
        fg = colors.fg,
        x=60, y=500,
        radius=35,
        thickness=8,
        start_angle=-210,
        end_angle=25,
        padding=1.5
    },
    {
        name='memperc', arg='', max=100,
        bg = colors.bg,
        fg = colors.fg,
        x=68, y=343,
        radius=36,
        thickness=10,
        start_angle=8,
        end_angle=352,
        padding=1.5
    },
}

require 'cairo'

-------------------------------------------------
---// Convert 0xRRGGBB into readble values //----
-------------------------------------------------
local function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------
---------/// Drawing Rings Function \\\----------
-------------------------------------------------
--               | Parameters |                --
-- cr: the cairo raw ( by default given by conku_widget_stats() )
-- t: a value from 0 to 1, for the foreground
-- pt: the table containg values
local function draw_ring(cr,t,pt)
    local w,h=conky_window.width,conky_window.height
    local xc,yc,ring_r,ring_w,sa,ea,pd=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle'],pt['padding']
    local bgc, bga, bgg = pt['bg']['color'] or colors.bg.color or 0x000000, pt['bg']['alpha'] or colors.bg.alpha or nil, pt['bg']['gradient'] or colors.bg.gradient or 1
    local fgc, fga, fgg = pt['fg']['color'] or colors.fg.color or 0x000000, pt['fg']['alpha'] or colors.fg.alpha or nil, pt['fg']['gradient'] or colors.fg.gradient or 1
    local angle_0=sa*(2*math.pi/360)-math.pi/2
    local angle_f=ea*(2*math.pi/360)-math.pi/2
    local ind_0=sa*(2*math.pi/360)-math.pi/2
    local ind_f=ea*(2*math.pi/360)-math.pi/2
    local t_arc=t*(angle_f-angle_0)
 
    -- Draw background ring
    local function draw_pattern(color, gradient, alpha, width, end_angle)
        cairo_arc(cr, xc, yc, ring_r, angle_0, end_angle)
        local pat = cairo_pattern_create_radial(xc, yc, ring_r-(ring_w/2), xc, yc, ring_r+(ring_w/2) )
        cairo_pattern_add_color_stop_rgba(pat, 1, rgb_to_r_g_b(color, alpha))
        if gradient ~= nil then
            cairo_pattern_add_color_stop_rgba(pat, 0, rgb_to_r_g_b(gradient, alpha))
        end
        cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND)
        cairo_set_source(cr, pat)
        cairo_set_line_width(cr, width)
        cairo_stroke(cr)
        cairo_pattern_destroy(pat)
    end
    
    draw_pattern(bgc, bgg, bga, ring_w, angle_f)
    draw_pattern(fgc, fgg, fga, ring_w-(pd*2), angle_0+t_arc)
end

-------------------------------------------------
---------/// Drawing Bars Function \\\-----------
-------------------------------------------------
--               | Parameters: |               --
-- cr: the cairo raw ( by default given by conku_widget_stats() )
-- t: a value from 0 to 1, for the foreground
-- pt: the table containg values
local function draw_bar(cr,t,pt)
      -- Window height and width
    local h,w=conky_window.height,conky_window.width
      -- The width,thickness and padding of the background bar
    local wth,thc,pdg=pt['width'],pt['thickness'],pt['padding']
      -- The width of the foreground bar
    local tf=(wth)*t
      -- The colors [bg|fg]_[color|alpha]
    local bgc, bga, bgg = pt['bg']['color'] or colors.bg.color or 0x000000, pt['bg']['alpha'] or colors.bg.alpha or 1, pt['bg']['gradient'] or colors.bg.gradient or 0x303030
    local fgc, fga, fgg = pt['fg']['color'] or colors.fg.color or 0xf0f0f0, pt['fg']['alpha'] or colors.fg.alpha or 1, pt['fg']['gradient'] or colors.fg.gradient or 0x909090
      -- Start point coordinate
    local bg_xi,bg_yi=pt['x'],pt['y']
      -- Identify orientation and from it define the remaing points coordinate
    if pt['orientation'] == 'e' then -- from right to left (east)
        bg_xf, bg_yf = bg_xi+wth, bg_yi
        fg_xi, fg_yi = bg_xf, bg_yf
        fg_xf, fg_yf = fg_xi-tf, fg_yi
    elseif pt['orientation'] == 'n' then -- from top to bottom (north)
        bg_xf, bg_yf = bg_xi, bg_yi+wth
        fg_xi, fg_yi = bg_xi, bg_yi
        fg_xf, fg_yf = fg_xi, fg_yi+tf
    elseif pt['orientation'] == 's' then -- from bottom to top (sud)
        bg_xf, bg_yf = bg_xi, bg_yi
        bg_yi = bg_yf+wth
        fg_xi, fg_yi = bg_xi, bg_yi
        fg_xf, fg_yf = fg_xi, fg_yi-tf
    else                                 -- use the default: from left to right (west)
        bg_xf, bg_yf = bg_xi+wth, bg_yi
        fg_xi, fg_yi = bg_xi, bg_yi
        fg_xf, fg_yf = fg_xi+tf, fg_yi
    end


    local function draw_pattern_bar(color, gradient, alpha, width, x0, y0, xf, yf)
        cairo_move_to(cr, x0, y0)
        cairo_line_to(cr, xf, yf)
        local pat = cairo_pattern_create_linear( x0, y0-(width/2), x0, y0+(width/2) )
        cairo_pattern_add_color_stop_rgba(pat, 1, rgb_to_r_g_b(color, alpha))
        if gradient ~= nil then
            cairo_pattern_add_color_stop_rgba(pat, 0, rgb_to_r_g_b(gradient, alpha))
        end
        cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND)
        cairo_set_source(cr, pat)
        cairo_set_line_width(cr, width)
        cairo_stroke(cr)
        cairo_pattern_destroy(pat)
    end
    
    draw_pattern_bar( bgc, bgg, bga, thc, bg_xi, bg_yi, bg_xf, bg_yf)
    draw_pattern_bar( fgc, fgg, fga, thc-(2*pdg), fg_xi, fg_yi, fg_xf, fg_yf)
end
 
-------------------------------------------------
--/// Draw Widgets and Parse Setting Tables \\\--
-------------------------------------------------
--               | Parametres |                --
-- set_table: the setting table declared above
-- widtype: the widget type, for now only "ring" and "bar"
local function conky_widget_stats(set_table,widtype)
    -- Given the widget type do the setup
    local function setup_widgets(cr,pt,type)
        local str=''
        local value=0
         -- Parse conky string
        str=string.format('${%s %s}',pt['name'],pt['arg'])
        str=conky_parse(str)
        value=tonumber(str)
        if value == nil then value = 0 end
        pct=value/pt['max']
         -- Identify the type
        if type == "ring" then draw_ring(cr,pct,pt) end
        if type == "bar"  then draw_bar(cr,pct,pt) end
    end
     -- Return nothing if there is no conky window
    if conky_window==nil then return end
    -- Create the surface
    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)    
    -- Pairs table
    for i in pairs(set_table) do setup_widgets(cr,set_table[i],widtype) end
    -- Destroy what you created
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
end

-------------------------------------------------
----/// Drawing Backgrounds With Borders ///-----
-------------------------------------------------
--               | Parametes: |                --
-- cr -
-- pt - setting table 
local function draw_bg(cr,pt)
    --if conky_window==nil then return end
    --// Parameters //--
    -- geometry
    local x, y = pt['geometry'][1] or 0, pt['geometry'][2] or 0
    local w, h = pt['geometry'][3] or conky_window.width, pt['geometry'][4] or conky_window.height
    -- colors
    local bgc, bga = pt['settings']['bg']['color'] or main.bg.color or 0x000000, pt['settings']['bg']['alpha'] or main.bg.alpha or 0.5
    local bdc, bda = pt['settings']['border']['color'] or main.border.color or 0xc0c0c0, pt['settings']['border']['alpha'] or main.border.alpha or 1
    -- border setting
    local crn, th = pt['settings']['corner'] or main.corner or 20, pt['settings']['border']['thick'] or main.border.thick or 2
    -- 
    local function create_pattern(cr,x,y,w,h,t,corner)
        cairo_move_to(cr, corner+x, t+y)
        cairo_line_to(cr, x+w-corner, t+y)
        cairo_curve_to(cr, x+w-t, t+y, x+w-t, t+y, x+w-t, corner+y)
        cairo_line_to(cr, x+w-t, y+h-corner)
        cairo_curve_to(cr, x+w-t, y+h-t, x+w-t, y+h-t, x+w-corner, y+h-t)
        cairo_line_to(cr, x+corner, y+h-t)
        cairo_curve_to(cr, x+t, y+h-t, x+t, y+h-t, x+t, y+h-corner)
        cairo_line_to(cr, x+t, y+corner)
        cairo_curve_to(cr, x+t, y+t, x+t, y+t, x+corner, y+t)
        cairo_close_path(cr)
     end

    -- Background
    create_pattern(cr, x, y, w, h, th, crn)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc, bga))
    cairo_fill(cr)

    -- Border
    create_pattern(cr, x, y, w, h, th, crn)
    cairo_set_source_rgba(cr,rgb_to_r_g_b(bdc, bda))
    cairo_set_line_width(cr,th)
    cairo_stroke(cr)

end

function conky_widget_background(set_table)
    if conky_window==nil then return end
    -- Create surface
    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)
    -- Parce table
    for i in pairs(set_table) do draw_bg(cr,set_table[i]) end
    -- Prevent memory leak
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
end

-- Main conky
function conky_main_first()
    conky_widget_background(frames)
    conky_widget_stats(ring_settings_table,'ring')
    conky_widget_stats(bar_settings_table,'bar')
end

Offline

#733 2011-06-12 22:22:43

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

SuNjACk wrote:

~/.config/conky/rc

Ummmmmmmm ... YEA!!!!!

Conky PitStop: Featured and the Gallery 2011 (2) page.

Last edited by Sector11 (2011-06-12 23:09:30)

Offline

#734 2011-06-13 11:25:58

SuNjACk
Member
Registered: 2011-02-27
Posts: 102

Re: conky configs and screenshots!

Sector11 wrote:
SuNjACk wrote:

~/.config/conky/rc

Ummmmmmmm ... YEA!!!!!

Conky PitStop: Featured and the Gallery 2011 (2) page.

Thank you very much smile

Offline

#735 2011-06-13 12:55:52

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

SuNjACk wrote:
Sector11 wrote:
SuNjACk wrote:

~/.config/conky/rc

Ummmmmmmm ... YEA!!!!!

Conky PitStop: Featured and the Gallery 2011 (2) page.

Thank you very much smile

You're welcome.

Offline

#736 2011-07-02 14:43:35

hjautumn
Member
From: Canada
Registered: 2011-07-02
Posts: 1

Re: conky configs and screenshots!

5893556845_053706ea06_s.jpg
ST2011-thumbnail by hjautumn, on Flickr

You can download the theme from here: http://hjautumn.deviantart.com/#/d3kqtvn

smile

Offline

#737 2011-07-07 17:33:03

dodo3773
Member
Registered: 2011-03-17
Posts: 818

Re: conky configs and screenshots!

Here's mine.

http://ompldr.org/vOWU4Yg/Screenshot.png

tOWU4Yg

I will share if anyone is interested. Most of it is just external bash scripts with the exception of the nmap script on the bottom left (perl).

Offline

#738 2011-07-25 10:29:59

AivarasK
Member
From: Lithuania
Registered: 2011-01-29
Posts: 13
Website

Re: conky configs and screenshots!

And here is mine:

AivarasK's conky

alignment top_left
background no
border_width 0
cpu_avg_samples 2
default_color green
default_outline_color green
default_shade_color green
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
use_xft yes
xftfont Inconsolata :size=12
gap_x 5
gap_y 5
minimum_size 5 5
net_avg_samples 2
no_buffers no
out_to_console no
out_to_stderr no
extra_newline no
own_window no
own_window_class Conky
own_window_type desktop
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no

TEXT
$nodename
$kernel
Uptime: $uptime
RAM Usage: $mem/$memmax
Swap Usage: $swap/$swapmax 
$hr
CPU: 
Used    $cpu%
Core 1    ${freq_g 1} GHz
Core 2    ${freq_g 2} GHz
    
Processes:$color $processes Running: $running_processes
$hr
File systems:
 /     ${fs_used /}/${fs_size /}   
 /home ${fs_used /home}/${fs_size /home}
$hr
Temperatures:
    CPU: ${hwmon temp 1} °C
    GPU: ${execi 60 nvidia-settings -query GPUCoreTemp | perl -ne 'print $1 if /GPUCoreTemp.*?: (\d+)./;'} °C
    HDD: ${hddtemp /dev/sda} °C

But I have a small problem with that - sometimes its blinks hmm


Laptop I: DELL Inspiron 15: Intel i3-4005U @ 1.70GHz, 8GB DDR3 1600MHz, Sandisk Plus 256GB SSD + WD Blue 500GB, Archlinux x86_64.
Laptop II: Acer C720: Intel Celeron 2955U @ 1.4GHz, 2GB DDR3, Intel HD, 120GB m.2 SSD, Archlinux x86_64
Server: HP ProLiant G4 DL380: 2x Intel Xeon 3.6GHz, 8GB of EEC ram, 8x 73GB 15K RPM SCSI drives, Archlinux x86_64

Offline

#739 2011-07-25 11:06:04

Zom
Member
From: Sweden
Registered: 2007-10-27
Posts: 430

Re: conky configs and screenshots!

AivarasK wrote:

But I have a small problem with that - sometimes its blinks hmm

Add

double_buffer           yes

to your conkyrc.

Offline

#740 2011-07-25 12:59:33

AivarasK
Member
From: Lithuania
Registered: 2011-01-29
Posts: 13
Website

Re: conky configs and screenshots!

Zom wrote:
AivarasK wrote:

But I have a small problem with that - sometimes its blinks hmm

Add

double_buffer           yes

to your conkyrc.

Thanks! Now it works perfect smile


Laptop I: DELL Inspiron 15: Intel i3-4005U @ 1.70GHz, 8GB DDR3 1600MHz, Sandisk Plus 256GB SSD + WD Blue 500GB, Archlinux x86_64.
Laptop II: Acer C720: Intel Celeron 2955U @ 1.4GHz, 2GB DDR3, Intel HD, 120GB m.2 SSD, Archlinux x86_64
Server: HP ProLiant G4 DL380: 2x Intel Xeon 3.6GHz, 8GB of EEC ram, 8x 73GB 15K RPM SCSI drives, Archlinux x86_64

Offline

#741 2011-07-27 00:51:38

rsty
Member
From: chicago, IL
Registered: 2008-08-14
Posts: 12

Re: conky configs and screenshots!

dodo3773 wrote:

Here's mine.

http://ompldr.org/vOWU4Yg/Screenshot.png

http://ompldr.org/tOWU4Yg

I will share if anyone is interested. Most of it is just external bash scripts with the exception of the nmap script on the bottom left (perl).

+1

I'll take it smile


"You are an explorer, and you represent our species, and the greatest good you can do is to bring back a new idea, because our world is endangered by the absence of good ideas. Our world is in crisis because of the absence of consciousness." -Terence McKenna

Offline

#742 2011-07-27 01:03:38

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

rsty wrote:
dodo3773 wrote:

Here's mine.

http://ompldr.org/vOWU4Yg/Screenshot.png

http://ompldr.org/tOWU4Yg

I will share if anyone is interested. Most of it is just external bash scripts with the exception of the nmap script on the bottom left (perl).

+1

I'll take it smile

... and I'll be right behind you.  big_smile

Offline

#743 2011-07-27 07:12:44

dodo3773
Member
Registered: 2011-03-17
Posts: 818

Re: conky configs and screenshots!

rsty wrote:
dodo3773 wrote:

Here's mine.

http://ompldr.org/vOWU4Yg/Screenshot.png

http://ompldr.org/tOWU4Yg

I will share if anyone is interested. Most of it is just external bash scripts with the exception of the nmap script on the bottom left (perl).

+1

I'll take it smile

This should be everything http://pastie.org/2278044.

Offline

#744 2011-07-27 07:13:27

dodo3773
Member
Registered: 2011-03-17
Posts: 818

Re: conky configs and screenshots!

Sector11 wrote:
rsty wrote:
dodo3773 wrote:

Here's mine.

http://ompldr.org/vOWU4Yg/Screenshot.png

http://ompldr.org/tOWU4Yg

I will share if anyone is interested. Most of it is just external bash scripts with the exception of the nmap script on the bottom left (perl).

+1

I'll take it smile

... and I'll be right behind you.  big_smile

This should be everything http://pastie.org/2278044.

Offline

#745 2011-07-27 15:33:10

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

dodo3773 wrote:

This should be everything http://pastie.org/2278044.

Thank you!

Offline

#746 2011-07-27 17:42:55

dodo3773
Member
Registered: 2011-03-17
Posts: 818

Re: conky configs and screenshots!

Sector11 wrote:
dodo3773 wrote:

This should be everything http://pastie.org/2278044.

Thank you!

You are welcome. If you have any questions let me know.

Offline

#747 2011-08-01 12:15:17

sam87
Member
From: down the rabbit hole
Registered: 2009-09-26
Posts: 141

Re: conky configs and screenshots!

hey, does conky weather require icons or is that a font? i keep seeing many people here use it but no matter how hard i try, i cant get it to work on my netbook sad


what i cannot build, i do not understand

Offline

#748 2011-08-01 16:27:54

na12
Member
From: /home/serbia
Registered: 2008-12-23
Posts: 752

Re: conky configs and screenshots!

Offline

#749 2011-08-01 16:37:28

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

sam87 wrote:

hey, does conky weather require icons or is that a font? i keep seeing many people here use it but no matter how hard i try, i cant get it to work on my netbook sad

conkyForecast installs BOTH, a font and "icons" or images.

You can find examples at:

/usr/share/conkyforecast/example

along with the three examples there are even three scripts you can click/execute to display them:
thmb_cf-examples.png

One example uses individual calls, the other two use template, one execpi call to get everything displayed - less cpu resources.

Offline

#750 2011-08-01 17:07:18

Sector11
Banned
Registered: 2010-02-25
Posts: 10

Re: conky configs and screenshots!

dodo3773 wrote:
Sector11 wrote:
dodo3773 wrote:

This should be everything http://pastie.org/2278044.

Thank you!

You are welcome. If you have any questions let me know.

OK, one question - Hows this:  Featured, for a week and Gallery 2011-2 until .... whenever?

Offline

Board footer

Powered by FluxBB