You are not logged in.

#151 2010-12-12 16:51:15

toorlv
Member
Registered: 2009-11-01
Posts: 65

Re: December 2010 Screenshots

archman-cro wrote:

A reply post to seiichiro0185. wink (Thanks for the info, man, you made me do my own icons.)

http://imgur.com/kpkAas.jpg

(imgur, ~2.25MB)

Ranger file manager with "snow" colorscheme (recently messed up with a new urxvt update).
Conky+dzen line:

^pa(550)^fg()^i(/path/to/cpu2.xbm) $cpu% · ^pa(600)/ ${fs_free /}/${fs_size /} · ^pa(700)/home ${fs_free /home}/${fs_size /home}^pa(823) · ^i(/path/to/power-ac.xbm) ${execi 2 acpi -a | grep -o "on-line"}^fg(red)${execi 2 acpi -a | grep -o "off-line"}^fg() · ^pa(908)^i(/path/to/dzen-xbm-pack/pacman2.xbm)${execpi 60 /path/to/scripts/pacupdate.pl} · ^pa(945)^i(/path/to/mail.xbm) ${execpi 300 /path/to/scripts/mailcheck} · ^pa(984)^fg(white)${time %H:%M}

It's awesome.
Can I request all configuration files of i3/panels, Xdefaults, etc.?

Offline

#152 2010-12-12 18:36:52

markbabc
Member
Registered: 2010-11-06
Posts: 157

Re: December 2010 Screenshots

lagagnon wrote:

Haven't really changed anything for the past 4 months or so.
My clean wmii desktop:

http://ompldr.org/tNmo1bg

My dirty wmii desktop with right side being Chromium and left terminals with mc and irssi running using mrxvt...

http://ompldr.org/tNmo1bw

wallpaper please?

Offline

#153 2010-12-12 23:38:03

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: December 2010 Screenshots

markbabc wrote:

wallpaper please?

http://ompldr.org/vNmpjeQ/newarchback.jpg

All I have is the 1920x1080 size. The link to that wallpaper is somewhere in this forum, but might be hard to find...


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#154 2010-12-13 05:08:30

markbabc
Member
Registered: 2010-11-06
Posts: 157

Re: December 2010 Screenshots

lagagnon wrote:

http://ompldr.org/vNmpjeQ/newarchback.jpg

All I have is the 1920x1080 size. The link to that wallpaper is somewhere in this forum, but might be hard to find...

thanks! and thats ok, feh --bg-scale does a great job of adjusting images to fit to my small screen.

Offline

#155 2010-12-13 06:07:32

hunterm
Member
From: the series of tubes
Registered: 2010-07-30
Posts: 20

Re: December 2010 Screenshots

http://imgur.com/Sp2Hq.png

1280x800 resolution
wallpaper: http://0rax0.deviantart.com/art/H-E-A-T-178176309
GNOME, and Shiki-Wine, with GNOME-Wine. both can be found in the aur.

Offline

#156 2010-12-13 06:31:16

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: December 2010 Screenshots

Finally got around to modding conky and some things big_smile

tNmppOQ
tNmppYQ

Offline

#157 2010-12-13 08:16:10

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: December 2010 Screenshots

Daisuke_Aramaki wrote:

This is (sparta wink ) awesome!!
Can you share your wallpaper please? And what's the name of this comics? I'm pretty sure I read it but I can't remeber the name sad

Thx

Offline

#158 2010-12-13 10:27:46

TomMan
Member
From: UK
Registered: 2010-11-07
Posts: 16
Website

Re: December 2010 Screenshots

My KDE Desktop:

small.png


How should I know if it works? That's what beta testers are for. I only coded it.
-- Attributed to Linus Torvalds, somewhere in a posting

Offline

#159 2010-12-13 12:08:16

aleks223
Member
Registered: 2010-03-27
Posts: 178
Website

Re: December 2010 Screenshots

KDE again :

tNmpsaw

Last edited by aleks223 (2010-12-13 12:08:52)

Offline

#160 2010-12-13 12:38:05

aof
Member
Registered: 2010-06-18
Posts: 39

Re: December 2010 Screenshots

wallpaper please

Offline

#161 2010-12-13 12:51:30

avoulk
Member
From: Greece
Registered: 2007-08-28
Posts: 132
Website

Re: December 2010 Screenshots

aleks223 wrote:

Could you please share your taskbar font? smile

Offline

#162 2010-12-13 13:38:34

TomMan
Member
From: UK
Registered: 2010-11-07
Posts: 16
Website

Re: December 2010 Screenshots

aof wrote:

wallpaper please

The wallpaper is from the Fedora 14 release, http://fedoraproject.org/wiki/File:F14- … r-rev1.png


How should I know if it works? That's what beta testers are for. I only coded it.
-- Attributed to Linus Torvalds, somewhere in a posting

Offline

#163 2010-12-13 14:43:04

Daisuke_Aramaki
Member
From: ++49/711
Registered: 2008-10-06
Posts: 651
Website

Re: December 2010 Screenshots

pyknite wrote:

This is (sparta wink ) awesome!!
Can you share your wallpaper please? And what's the name of this comics? I'm pretty sure I read it but I can't remeber the name sad
Thx

This is Spider Jerusalem from the comic Transmetropolitan.

tNmpuNw


"You know what I found? Right in the kernel, in the heart of the operating system, I found a developer's comment that said, `Does this belong here?`" -- Simon Lok about Linux kernel in 2005
Reflections on the Strange and the not so Strange
http://skinwalker.wordpress.com

Offline

#164 2010-12-13 15:42:52

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: December 2010 Screenshots

ganastasiou wrote:
Unia wrote:

New setup:

http://ompldr.org/tNmoyOQ

http://ompldr.org/tNmoyYQ

(No, I don't run Crunchbang, just like the wallpaper)

Which gtk theme do u use?

Nice setup.

Share the wallpaper plz.

GTK theme is Dyne
Wallpaper can be found on the Crunchbang forums, but to ease your search I've searched for you already. http://d-arthwound.deviantart.com/#/d30i2px


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#165 2010-12-13 18:18:13

aleks223
Member
Registered: 2010-03-27
Posts: 178
Website

Re: December 2010 Screenshots

avoulk wrote:

Could you please share your taskbar font? smile

The font is called sansation and is really nice.

Offline

#166 2010-12-13 18:35:03

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: December 2010 Screenshots

He's asking you to share it, hence: provide a link wink.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#167 2010-12-13 19:38:44

Erus_Iluvatar
Wiki Admin
Registered: 2010-04-01
Posts: 122

Re: December 2010 Screenshots

It's in the AUR : ttf-sansation 1-1.1 : https://aur.archlinux.org/packages.php?ID=42454


I'm french, don't mind my mistakes in english.

Offline

#168 2010-12-13 21:57:29

heleos
Member
From: Maine, USA
Registered: 2007-04-24
Posts: 678

Re: December 2010 Screenshots

aleks223 wrote:

KDE again :

...

Could you also share the KDE theme? Thanks big_smile

Offline

#169 2010-12-13 22:14:40

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: December 2010 Screenshots

Erus_Iluvatar wrote:

It's in the AUR : ttf-sansation 1-1.1 : https://aur.archlinux.org/packages.php?ID=42454

Package is broken. You can get it here: http://www.dafont.com/sansation.font


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#170 2010-12-13 22:49:18

gorudonu
Member
Registered: 2010-08-08
Posts: 37

Re: December 2010 Screenshots

aleks223 wrote:

skin please smile

Offline

#171 2010-12-13 23:10:02

avoulk
Member
From: Greece
Registered: 2007-08-28
Posts: 132
Website

Re: December 2010 Screenshots

@aleks223: Thanks man, they're really cool smile

Offline

#172 2010-12-14 07:02:41

kittykatt
Member
From: Missouri, USA
Registered: 2009-11-04
Posts: 260
Website

Re: December 2010 Screenshots

Woah. December already? Huh.

Semi-clean:
archscreenie-2010-12-14-clean.thumb.png

Semi-busy:
archscreenie-2010-12-14-busy.thumb.png

Look! I'm actually working on screenfetch again! YAY! \o/


And here's some requests....

k3ttc4r wrote:
hume's doona wrote:

I don't do these often, b/c I don't do much eyecandy stuff

Who would have guessed? big_smile

Personally, I spend way too much time on that stuff...

clean
http://filer.crshd.cc/screenshots/2010-12-01_19-48.png

dirty
http://filer.crshd.cc/screenshots/2010-12-01_19-46.png

I looked through the thread so far and saw that you hadn't posted your configs, so I'll ask for this set now please. I LOVE your setup.


Unia wrote:

This is my setup as for now.

Clean:
http://ompldr.org/vNmRlMQ

Dirty:
http://ompldr.org/vNmRkeQ

Conky is based on piotrek91666's work and the tint2 is based on aiBo's work (thanks again for getting the svn607 version to work, mate!)
Need more info? Just ask! smile

Same goes for you on this post, though you've already mentioned that you've updated your conky since then. I'm hoping to get THESE conky configs off of you. tongue

I'd also like the ones from your second post, if possible.


Tall order, right? xD

Last edited by kittykatt (2010-12-14 07:04:39)


- [ My Blog ] | [ AUR Packages ] | [ My deviantART ] | [ screenFetch ] | [ SilverIRC ] -

Offline

#173 2010-12-14 07:10:05

silenc3r
Member
From: Poland
Registered: 2009-08-29
Posts: 149

Re: December 2010 Screenshots

colbert wrote:

Finally got around to modding conky and some things big_smile

tNmppOQ
tNmppYQ

Gtk theme and icons pls

Offline

#174 2010-12-14 16:40:35

aleks223
Member
Registered: 2010-03-27
Posts: 178
Website

Re: December 2010 Screenshots

Well one answer for all : the theme is ember. For the colors, plasma and window decoration. So go on kde-look or installed it directly from within kde.

Offline

#175 2010-12-14 18:59:08

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: December 2010 Screenshots

kittykatt wrote:

Same goes for you on this post, though you've already mentioned that you've updated your conky since then. I'm hoping to get THESE conky configs off of you. tongue

I'd also like the ones from your second post, if possible.

First one:
.conkyrc:

# -- Conky settings -- #

update_interval            1.0
cpu_avg_samples            4
net_avg_samples            2
override_utf8_locale        true
double_buffer            true
no_buffers            true
text_buffer_size        2048
imlib_cache_size        0
out_to_x            true
short_units            true
temperature_unit        celsius


# -- Window specifications -- #

own_window            true
own_window_colour        000000
own_window_hints        undecorated,below,sticky,skip_taskbar,skip_pager
own_window_argb_visual        true
own_window_argb_value        70
own_window_type            normal
own_window_transparent        true
border_inner_margin        0
border_outer_margin        0
maximum_width            125
minimum_size            125 660
alignment            tr
gap_x                0
gap_y                43


# -- Graphics settings -- #

draw_shades            false
draw_outline            false
draw_borders            false
draw_graph_borders        false
default_shade_color        black
default_outline_color        403F44
stippled_borders        0
color0                B7FF00


# -- Text settings -- #

use_xft                true
font                Ubuntu:style=Regular:size=8
uppercase            no
default_color            FFFFFF


# -- Lua Scripts -- #
lua_load ~/.scripts/rings2.lua
lua_draw_hook_pre draw_widgets


TEXT
${voffset 27}${goto 16}${time %d %a}
${goto 16}${time %b %Y}
${voffset -25}${goto 92}${execi 600 /home/jente/.scripts/conkyemail/conkyEmail --servertype=POP --servername=pop3.live.com --username= --password= --ssl} 
${voffset 30}${goto 20}${color0}Uptime: ${color}${uptime_short}
${goto 20}${color0}Battery: ${color}${battery_percent BAT0}%
${voffset 35}${goto 51}${mem}
${goto 61}of
${goto 51}${memmax}
${voffset 32}${goto 51}${swap}
${goto 61}of
${goto 51}${swapmax}
${voffset 59}${goto 68}${cpu cpu}%
${voffset 70}${goto 51}${fs_used /}
${goto 61}of
${goto 51}${fs_size /}
${voffset 32}${goto 51}${fs_used /home}
${goto 61}of
${goto 51}${fs_size /home}
${voffset 39}${goto 50}${color0}Artist:
${goto 50}${color}${mpd_artist}
${goto 50}${color0}Song: 
${goto 50}${color}${mpd_title}
${goto 50}${color0}${mpd_elapsed}${color}/${color0}${mpd_length}

Note that the space under mpd_elapsed is required!

lua:

require 'cairo'
require 'imlib2'

--[[ RING WIDGET ]]
--[[ v1.1 by londonali1010 (2009) ]]
--[[ Options (name, arg, max, bg_colour, bg_alpha, xc, yc, radius, thickness, start_angle, end_angle):
    "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
    "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
    "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
    "bg_colour" is the colour of the base ring.
    "bg_alpha" is the alpha value of the base ring.
    "fg_colour" is the colour of the indicator part of the ring.
    "fg_alpha" is the alpha value of the indicator part of the ring.
    "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
    "radius" is the radius of the ring.
    "thickness" is the thickness of the ring, centred around the radius.
    "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
    "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger (e.g. more clockwise) than start_angle. ]]


function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function ring(name, arg, max, bgc, bga, fgc, fga, xc, yc, r, t, sa, ea)

    local function draw_ring(pct)
        local angle_0 = sa * (2 * math.pi/360) - math.pi/2
        local angle_f = ea * (2 * math.pi/360) - math.pi/2
        local pct_arc = pct * (angle_f - angle_0)

        -- Draw background ring
        cairo_set_line_cap  (cr, CAIRO_LINE_CAP_BUTT) -- square line ends 
        cairo_arc(cr, xc, yc, r, angle_0, angle_f)
        cairo_set_source_rgba(cr, rgb_to_r_g_b(bgc, bga))
        cairo_set_line_width(cr, t)
        cairo_stroke(cr)
    
        -- Draw indicator ring

        cairo_arc(cr, xc, yc, r, angle_0, angle_0 + pct_arc)
        cairo_set_source_rgba(cr, rgb_to_r_g_b(fgc, fga))
        cairo_stroke(cr)
    end;
    local function setup_ring()
        local str = ''
        local value = 0
        
        str = string.format('${%s %s}', name, arg)
        str = conky_parse(str)
        value = tonumber(str)
        if value == nil then value = 0 end
        pct = value/max
        draw_ring(pct)
    end
    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)
    if update_num > 5 then setup_ring() end
    cairo_stroke (cr);
end

function draw_atext(arg, x, y, ff, fs, r, cl, ca, sl, wg)
    local rad=(math.pi*r)/180
    if sl == 'italic' then
        slant = CAIRO_FONT_SLANT_ITALIC
    else--if sl == 'normal' then
        slant = CAIRO_FONT_SLANT_NORMAL
    end

    if wg == 'bold' then
        weight = CAIRO_FONT_WEIGHT_BOLD
    else--if wg == 'normal' then
        weight = CAIRO_FONT_WEIGHT_NORMAL
    end

    cairo_select_font_face (cr, ff, slant, weight)
    cairo_set_font_size (cr, fs)
    cairo_set_source_rgba(cr, rgb_to_r_g_b(cl, ca))
    cairo_move_to (cr, x, y)
    cairo_rotate(cr, rad)
    cairo_show_text (cr, conky_parse(arg))
    cairo_rotate(cr, -rad)
    cairo_stroke (cr)
end

function draw_aline(x1, y1, x2, y2, width, cl, ca)
    cairo_set_source_rgba(cr, rgb_to_r_g_b(cl, ca))
    cairo_set_line_width (cr, width)
    cairo_set_line_cap  (cr, CAIRO_LINE_CAP_ROUND)
    cairo_move_to (cr, x1, y1)
    cairo_rel_line_to (cr, -x1+x2, -y1+y2)
    cairo_stroke (cr)
end

function draw_arectangle(x1, y1, width, height, radius, rct_fill_cl, rct_fill_al, outl_width, outl_cl, outl_al)
    --aspect=1.0
    --corner_radius = 30.0
    --radius = corner_radius / aspect
    degrees = math.pi / 180.0
    cairo_new_sub_path (cr)
    cairo_arc (cr, x1 + width - radius, y1 + radius, radius, -90 * degrees, 0 * degrees)
    cairo_arc (cr, x1 + width - radius, y1 + height - radius, radius, 0 * degrees, 90 * degrees)
    cairo_arc (cr, x1 + radius, y1 + height - radius, radius, 90 * degrees, 180 * degrees)
    cairo_arc (cr, x1 + radius, y1 + radius, radius, 180 * degrees, 270 * degrees)
    cairo_close_path (cr)
    cairo_set_source_rgba(cr, rgb_to_r_g_b(rct_fill_cl, rct_fill_al))
    cairo_fill_preserve (cr)
    cairo_set_source_rgba(cr, rgb_to_r_g_b(outl_cl, outl_al))
    --cairo_set_source_rgba (cr, 0.5, 0, 0, 0.5)
    cairo_set_line_width (cr, outl_width)
    cairo_stroke (cr)
end

-- RUNTIME

function conky_draw_widgets()
    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)
    cr = cairo_create(cs)

    draw_arectangle(0, 0, 200, 660, 20, 0x000000, 0.15, 0, 0x92CC00, 0.4)
    draw_arectangle(1, 1, 198, 658, 18, 0x000000, 0.0, 2, 0x92CC00, 0.4)
    
    ring('time','%I.%M',12,0x92CC00,0.1,0x92CC00,0.4,95, 35,20,4,0,360)
    ring('time','%M.%S',60,0xA4E600,0.1,0xA4E600,0.6,95, 35,25,4,0,360)
    ring('time','%S',60,0xB7FF00,0.1,0xB7FF00,0.8,95, 35,29,2,0,360)
    ring('memperc','',100,0x1E90FF,0.2,0x1E90FF,0.8,127, 150.5,25,12,180,360)
    ring('swapperc','',100,0x1E90FF,0.2,0x1E90FF,0.8,127, 220,25,12,180,360)
    ring('cpu','cpu1',100,0x1E90FF,0.2,0x1E90FF,0.8,50, 280,25,4,90,180)
    ring('cpu','cpu2',100,0xB7FF00,0.2,0xB7FF00,0.8,50, 335,25,4,0,90)
    ring('cpu','cpu3',100,0xB7FF00,0.2,0xB7FF00,0.8,105, 280,25,4,180,270)
    ring('cpu','cpu4',100,0x1E90FF,0.2,0x1E90FF,0.8,105, 335,25,4,270,360)
    ring('fs_used_perc','/',100,0xFF6E00,0.1,0xFF6E00,0.6,127, 400,25,12,180,360)
    ring('fs_used_perc','/home',100,0xFF6E00,0.1,0xFF6E00,0.6,127, 470,25,12,180,360)
    
    draw_aline(10, 25, 60, 25, 2, 0x92CC00, 0.4)
    --draw_aline(60, 210, 130, 210, 5, 0xffffff, 0.1)
    
    draw_atext('${time %H:%M}', 16.0, 20.0, 'Ubuntu', 14.0, 0.0, 0xB7FF00, 1.0, 'normal', 'bold')
    draw_atext('Memory', 25.0, 226.0, 'Ubuntu', 22.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('RAM', 50.0, 128.0, 'Ubuntu', 14.0, 0.0, 0x1E90FF, 1.0, 'normal', 'normal')
    draw_atext('Swap', 50.0, 198.0, 'Ubuntu', 14.0, 0.0, 0x1E90FF, 1.0, 'normal', 'normal')
    draw_atext('CPU', 25.0, 330.0, 'Ubuntu', 22.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('1', 54.0, 295.0, 'Ubuntu', 16.0, 0, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('2', 90.0, 295.0, 'Ubuntu', 16.0, 0, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('3', 54.0, 330.0, 'Ubuntu', 16.0, 0, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('4', 90.0, 330.0, 'Ubuntu', 16.0, 0, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('Disk Usage', 25.0, 495.0, 'Ubuntu', 22.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('Root', 50.0, 378.0, 'Ubuntu', 14.0, 0.0, 0xFF6E00, 1.0, 'normal', 'normal')
    draw_atext('Home', 50.0, 448.0, 'Ubuntu', 14.0, 0.0, 0xFF6E00, 1.0, 'normal', 'normal')
    draw_atext('Music', 25.0, 600, 'Ubuntu', 22.0, -90, 0xffffff, 0.2, 'normal', 'bold')


    cairo_destroy(cr)

end

I think my second post was the vertical conky, in which all the functions are called by the lua script. For the .conkyrc, you'll only need to remove everything (except the space under mpd_elapsed!) under TEXT from the above posted .conkyrc.

vertical lua:

require 'cairo'
require 'imlib2'

--[[ RING WIDGET ]]
--[[ v1.1 by londonali1010 (2009) ]]
--[[ Options (name, arg, max, bg_colour, bg_alpha, xc, yc, radius, thickness, start_angle, end_angle):
    "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
    "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
    "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
    "bg_colour" is the colour of the base ring.
    "bg_alpha" is the alpha value of the base ring.
    "fg_colour" is the colour of the indicator part of the ring.
    "fg_alpha" is the alpha value of the indicator part of the ring.
    "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
    "radius" is the radius of the ring.
    "thickness" is the thickness of the ring, centred around the radius.
    "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
    "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger (e.g. more clockwise) than start_angle. ]]


function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function ring(name, arg, max, bgc, bga, fgc, fga, xc, yc, r, t, sa, ea)

    local function draw_ring(pct)
        local angle_0 = sa * (2 * math.pi/360) - math.pi/2
        local angle_f = ea * (2 * math.pi/360) - math.pi/2
        local pct_arc = pct * (angle_f - angle_0)

        -- Draw background ring
        cairo_set_line_cap  (cr, CAIRO_LINE_CAP_BUTT) -- square line ends 
        cairo_arc(cr, xc, yc, r, angle_0, angle_f)
        cairo_set_source_rgba(cr, rgb_to_r_g_b(bgc, bga))
        cairo_set_line_width(cr, t)
        cairo_stroke(cr)
    
        -- Draw indicator ring

        cairo_arc(cr, xc, yc, r, angle_0, angle_0 + pct_arc)
        cairo_set_source_rgba(cr, rgb_to_r_g_b(fgc, fga))
        cairo_stroke(cr)
    end;
    local function setup_ring()
        local str = ''
        local value = 0
        
        str = string.format('${%s %s}', name, arg)
        str = conky_parse(str)
        value = tonumber(str)
        if value == nil then value = 0 end
        pct = value/max
        draw_ring(pct)
    end
    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)
    if update_num > 5 then setup_ring() end
    cairo_stroke (cr);
end

function draw_atext(arg, x, y, ff, fs, r, cl, ca, sl, wg)
    local rad=(math.pi*r)/180
    if sl == 'italic' then
        slant = CAIRO_FONT_SLANT_ITALIC
    else--if sl == 'normal' then
        slant = CAIRO_FONT_SLANT_NORMAL
    end

    if wg == 'bold' then
        weight = CAIRO_FONT_WEIGHT_BOLD
    else--if wg == 'normal' then
        weight = CAIRO_FONT_WEIGHT_NORMAL
    end

    cairo_select_font_face (cr, ff, slant, weight)
    cairo_set_font_size (cr, fs)
    cairo_set_source_rgba(cr, rgb_to_r_g_b(cl, ca))
    cairo_move_to (cr, x, y)
    cairo_rotate(cr, rad)
    cairo_show_text (cr, conky_parse(arg))
    cairo_rotate(cr, -rad)
    cairo_stroke (cr)
end

function draw_aline(x1, y1, x2, y2, width, cl, ca)
    cairo_set_source_rgba(cr, rgb_to_r_g_b(cl, ca))
    cairo_set_line_width (cr, width)
    cairo_set_line_cap  (cr, CAIRO_LINE_CAP_ROUND)
    cairo_move_to (cr, x1, y1)
    cairo_rel_line_to (cr, -x1+x2, -y1+y2)
    cairo_stroke (cr)
end

function draw_arectangle(x1, y1, width, height, radius, rct_fill_cl, rct_fill_al, outl_width, outl_cl, outl_al)
    --aspect=1.0
    --corner_radius = 30.0
    --radius = corner_radius / aspect
    degrees = math.pi / 180.0
    cairo_new_sub_path (cr)
    cairo_arc (cr, x1 + width - radius, y1 + radius, radius, -90 * degrees, 0 * degrees)
    cairo_arc (cr, x1 + width - radius, y1 + height - radius, radius, 0 * degrees, 90 * degrees)
    cairo_arc (cr, x1 + radius, y1 + height - radius, radius, 90 * degrees, 180 * degrees)
    cairo_arc (cr, x1 + radius, y1 + radius, radius, 180 * degrees, 270 * degrees)
    cairo_close_path (cr)
    cairo_set_source_rgba(cr, rgb_to_r_g_b(rct_fill_cl, rct_fill_al))
    cairo_fill_preserve (cr)
    cairo_set_source_rgba(cr, rgb_to_r_g_b(outl_cl, outl_al))
    --cairo_set_source_rgba (cr, 0.5, 0, 0, 0.5)
    cairo_set_line_width (cr, outl_width)
    cairo_stroke (cr)
end

-- RUNTIME

function conky_draw_widgets()
    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)
    cr = cairo_create(cs)

    draw_arectangle(72, 1, 35, 766, 0, 0x000000, 0.15, 0, 0x92CC00, 0.4)
    draw_arectangle(72, 0, 37, 770, 0, 0x000000, 0.15, 2, 0x92CC00, 0.4)
    
    
        
    draw_atext('${time %H:%M}', 87.0, 50.0, 'Ubuntu', 14.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('${uptime_short}', 100.0, 63.0, 'Ubuntu', 14.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('1', 87.0, 100.0, 'Ubuntu', 14.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('${cpu cpu1}%', 100.0, 103.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('2', 87.0, 120.0, 'Ubuntu', 14.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('${cpu cpu2}%', 100.0, 123.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('3', 87.0, 140.0, 'Ubuntu', 14.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('${cpu cpu3}%', 100.0, 143.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('4', 87.0, 160.0, 'Ubuntu', 14.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('${cpu cpu4}%', 100.0, 163.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('RAM', 87.0, 222.0, 'Ubuntu', 14.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('${mem}', 100.0, 230.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('$memperc%', 100.0, 200.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('SWAP', 87.0, 299.0, 'Ubuntu', 14.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('${swap}', 100.0, 270.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('$swapperc%', 100.0, 295.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')    
    draw_atext('Root', 87.0, 374.0, 'Ubuntu', 14.0, -90.0, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('${fs_used /} /', 100.0, 388.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('${fs_size /}', 100.0, 352.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('Home', 87.0, 473.0, 'Ubuntu', 14.0, -90.0, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('${fs_used /home/jente} /', 100.0, 482.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('${fs_size /home/jente}', 100.0, 445.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('Battery', 87.0, 570.0, 'Ubuntu', 14.0, -90, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('$battery', 100.0, 574.0, 'Ubuntu', 9.0, -90, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('${mpd_artist} - ${mpd_title}', 87.0, 766.0, 'Ubuntu', 14.0, -90.0, 0xffffff, 0.2, 'normal', 'bold')
    draw_atext('${mpd_length}', 100.0, 735.0, 'Ubuntu', 9.0, -90.0, 0xffffff, 0.2, 'normal', 'normal')
    draw_atext('${mpd_elapsed} /', 100.0, 766.0, 'Ubuntu', 9.0, -90.0, 0xffffff, 0.2, 'normal', 'normal')
    
    cairo_destroy(cr)

end

If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

Board footer

Powered by FluxBB