Bem-vindo: Seg, 18 de Novembro 2024, 0:35 Pesquisa avançada

Mostre o seu Desktop!

Apresente aqui temas que gostou, skins de programas, ícones, wallpapers, conky's, etc. Ou seja, tudo o que possa alterar de estético no seu Ubuntu, apresente aqui. Em caso de dúvidas de personalização ou se quiser mostrá-la ao mundo, utilize esta secção!

Re: Mostre o seu Desktop!

Mensagempor Roger Braga » Qua, 26 de Outubro 2011, 4:13

JOY BURN

  • Sistema Operativo: Ubuntu 11.04 (Natty Narwhal)
  • Tema: ContrastGray
  • Ícones: Any Color You Like
  • Wallpaper: http://img703.imageshack.us/img703/3601 ... 0x1050.jpg
  • AWN;
  • Covergloobus: Praise;
  • Conky;
    conkyrc
    Spoiler:
    #!/usr/bin/conky -d -c
    ## .conkyrc configuration
    alignment bottom_left
    background yes
    border_width 5
    color0 555555 #
    color1 FCAF3E # zolty
    color2 2a2a2a # braz
    color3 a82553 # rozowy f71f84
    color4 5e1014 # bordowy
    color5 64574e # braz
    color6 2a2a2a # szary
    color7 8888CC # (COOL)
    color8 9d9c61 # zolto-szary
    color9 525276 # niebiesko-szary
    cpu_avg_samples 2
    default_color 000000 # szary 5f5f5f
    default_outline_color 000000 # Black
    default_shade_color 000000 # Black
    double_buffer yes
    draw_borders no
    draw_graph_borders no
    draw_outline no
    draw_shades no
    gap_x 40
    gap_y 310
    max_specials 1024
    max_user_text 10000
    maximum_width 900
    minimum_size 250
    net_avg_samples 2
    no_buffers yes
    override_utf8_locale yes
    own_window yes
    own_window_colour 000000 # Black
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    own_window_transparent Yes
    own_window_type override ## normal
    pad_percents 2 # to co nizej, miejsc po przecinku
    short_units yes # krotka wersja podawania wielkosci dyskow np. 612.21M/3.80G
    stippled_borders 3
    text_buffer_size 8000
    total_run_times 0
    update_interval 2.0
    uppercase no
    use_spacer right
    use_xft yes
    xftalpha 1
    xftfont Freesans:pixelsize=9

    TEXT

    ${font BankGothic Lt BT:pixelsize=32}${time %A}${font}

    ${font Victor's Pixel Font:pixelsize=17} ${time %d %B, %Y}

    ${font BankGothic Lt BT:pixelsize=51}${time %H:%M}${font}


    ${font 123:size=10} Recursos${font} ${hr}

    ${font 123:size=10} Cpu 1 : ${alignc} ${cpubar cpu1}
    ${font 123:size=10} Cpu 2 : ${alignc} ${cpubar cpu2}
    ${font 123:size=10} Ram : ${alignc} ${membar}
    ${font 123:size=10} Swap : ${alignc} ${swapbar}
    ${font 123:size=10} Hd : ${alignc} ${fs_bar /}

    ${font 123:size=10}TEMPO DE HOJE${font 123:size=7}${alignr}............................................................
    ${font ConkyWeather:size=22}${execi 3600 conkyForecast --location=BRXX0232 --datatype=WF}${font} Temp: ${color}${execi 3600 conkyForecast --location=BRXX0232 --datatype=HT}${color} ( ${color}${execi 3600 conkyForecast --location=BRXX0232 --datatype=LT}${color} )${alignr}Humidade: (${color}${execi 3600 conkyForecast --location=BRXX0232 --datatype=HM}${color} )
    ${execi 3600 conkyForecast --location=BRXX0232 --datatype=CC}${color}, Velocidade do vento é de ${color}${execi 3600 conkyForecast --location=BRXX0232 --datatype=WS}${color},
    Com direção ${color}${execi 3600 conkyForecast --location=BRXX0232 --datatype=WD}${color}. Visibilidade ${color}${execi 3600 conkyForecast --location=BRXX0232 --datatype=VI}${color}

    ${font 123:size=10}DIA SEGUINTES${font 123:size=7}${alignr}............................................................
    ${execi 3600 conkyForecast --location=BRXX0232 --datatype=DW --startday=1 --shortweekday --endday=2 --spaces=10}
    ${goto 4}${font ConkyWeather:size=20}${execi 3600 conkyForecast --location=BRXX0232 --datatype=WF --startday=1 --endday=2 --spaces=3}${font}
    ${goto 8}${execi 3600 conkyForecast --location=BRXX0232 --datatype=HT --startday=1 --endday=2 --spaces=8}

    ${font 123:size=10}${color}TOP PROCESSES ${color DarkSlateGray}${hr}
    ${color}$font${top_mem name 2}${alignr}${top mem 2} %
    $font${top_mem name 3}${alignr}${top mem 3} %
    $font${top_mem name 4}${alignr}${top mem 4} %
    $font${top_mem name 5}${alignr}${top mem 5} %
    ${voffset -33}${font OpenLogos:size=103}${color2}v${font}${voffset -76}${goto 179}${font UbuntuTitleBold:size=19.8}${color4}${pre_exec cat /etc/*release | grep 'RELEASE' | awk -F'=' '{print $2}'}${font}

AGARB REGOR


Imagem
:ubuntued: "Somente seres humanos excepcionais e irrepreensíveis suscitam ideias generosas e ações elevadas. O conhecimento é limitado. A imaginação envolve ao mundo."
:ubuntued:
Avatar do usuário
Roger Braga
Mr. Deskmod
 
Mensagens: 755
Registrado em: 04 Julho, 2011
Localização: São Paulo, BRASIL

Re: Mostre o seu Desktop!

Mensagempor Roger Braga » Qua, 26 de Outubro 2011, 4:52

DRAGO

AGARB REGOR


Imagem
:ubuntued: "Somente seres humanos excepcionais e irrepreensíveis suscitam ideias generosas e ações elevadas. O conhecimento é limitado. A imaginação envolve ao mundo."
:ubuntued:
Avatar do usuário
Roger Braga
Mr. Deskmod
 
Mensagens: 755
Registrado em: 04 Julho, 2011
Localização: São Paulo, BRASIL

Re: Mostre o seu Desktop!

Mensagempor fenon » Qua, 26 de Outubro 2011, 5:02

total Linux

  • Sistema Operativo: Ubuntu 11.04 (Natty Narwhal)
  • Tema: Ambiance
  • Ícones: token modificado
  • Wallpaper: pessoal

.conkyrc
Spoiler:
# Conky settings #
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

temperature_unit fahrenheit

# Window specifications #

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

border_inner_margin 0
border_outer_margin 0

minimum_size 200 250
maximum_width 200

alignment tr
gap_x 35
gap_y 80

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

# Text settings #
use_xft yes
override_utf8_locale yes
xftfont Neuropolitical:size=8
xftalpha 0.8
uppercase no

temperature_unit celsius

default_color 0F6866

# Lua Load #
lua_load ~/.lua/scripts/clock_rings.lua
lua_draw_hook_pre clock_rings

TEXT
${font radio space:size=42}${time %e}
${goto 100}${font radio space:size=18}${color ffffff}${voffset -75}${time %b}
${font radio space:size=10}${color ffffff}${voffset 15}${time %A}${color 0F6866}${hr}
${goto 100}${font radio space:size=15}${color 0F6866}${voffset -35}${time %Y}
${font radio space:size=30}${voffset 40}${alignc}${time %H}:${time %M}
${goto 175}${voffset -30}${font radio space:size=10}${time %S}
${voffset 10}${font radio space:size=11}${color ffffff}${alignr}Santo André - SP${font}
${font radio space:size=13}${color 0F6866}${alignr}temp: ${weather http://weather.noaa.gov/pub/data/observ ... /stations/ SBSP temperature temperature 30} °C${font}
${hr}
${image ~/.conky/logo.png -p 165,10 -s 35x35}
${color 0F6866}${font radio space:size=8}Uptime: ${uptime_short}
${color 0F6866}${font radio space:size=8}Processes: ${processes}
${color 0F6866}${font radio space:size=8}Running: ${running_processes}

${color FF0055}${goto 125}${voffset 27}CPU
${color 0F6866}${goto 125}${cpu cpu0}%
${color FF0055}${goto 125}${voffset 55}RAM
${color 0F6866}${goto 125}${memperc}%
${color FF0055}${goto 125}${voffset 56}Swap
${color 0F6866}${goto 125}${swapperc}%
${color FF0055}${goto 125}${voffset 57}Disk
${color 0F6866}${goto 125}${fs_used_perc /}%
${color FF0055}${goto 130}${voffset 55}Net
${color 0F6866}${goto 130}${downspeed eth0}
${color 0F6866}${goto 130}${upspeed eth0}

${color ffffff}${font radio space:size=8}${alignr}${nodename}
${color ffffff}${font radio space:size=8}${alignr}${pre_exec cat /etc/issue.net} $machine
${color ffffff}${font radio space:size=8}${alignr}Kernel: ${kernel}
${hr}


clock-Rings.lua
Spoiler:
--[[
Clock Rings by Linux Mint (2011) reEdited by despot77

This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.

IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.

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

Changelog:
+ v1.0 -- Original release (30.09.2009)
v1.1p -- Jpope edit londonali1010 (05.10.2009)
*v Mint-lua -- reEdit despot77 (18.02.2011)
]]

settings_table = {

{
name='cpu',
arg='cpu0',
max=100,
bg_colour=0xffffff,
bg_alpha=0.2,
fg_colour=0x14868C,
fg_alpha=0.8,
x=163, y=280,
radius=25,
thickness=25,
start_angle=-90,
end_angle=180
},
{
name='memperc',
arg='',
max=100,
bg_colour=0xffffff,
bg_alpha=0.2,
fg_colour=0x14868C,
fg_alpha=0.8,
x=163, y=360,
radius=25,
thickness=25,
start_angle=-90,
end_angle=180
},
{
name='swapperc',
arg='',
max=100,
bg_colour=0xffffff,
bg_alpha=0.2,
fg_colour=0x14868C,
fg_alpha=0.8,
x=163, y=440,
radius=25,
thickness=25,
start_angle=-90,
end_angle=180
},
{
name='fs_used_perc',
arg='/',
max=100,
bg_colour=0xffffff,
bg_alpha=0.2,
fg_colour=0x14868C,
fg_alpha=0.8,
x=163, y=520,
radius=25,
thickness=25,
start_angle=-90,
end_angle=180
},
{
name='downspeedf',
arg='eth0',
max=210,
bg_colour=0xffffff,
bg_alpha=0.2,
fg_colour=0x14868C,
fg_alpha=0.8,
x=165, y=600,
radius=30,
thickness=12,
start_angle=-90,
end_angle=180
},
{
name='upspeedf',
arg='eth0',
max=100,
bg_colour=0xffffff,
bg_alpha=0.2,
fg_colour=0x14868C,
fg_alpha=0.8,
x=165, y=600,
radius=16,
thickness=12,
start_angle=-90,
end_angle=180
},
}

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

clock_r=65

-- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.

clock_x=100
clock_y=150

show_seconds=true

require 'cairo'

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

function draw_ring(cr,t,pt)
local w,h=conky_window.width,conky_window.height

local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

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=t*(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_clock_hands(cr,xc,yc)
local secs,mins,hours,secs_arc,mins_arc,hours_arc
local xh,yh,xm,ym,xs,ys

secs=os.date("%S")
mins=os.date("%M")
hours=os.date("%I")

secs_arc=(2*math.pi/60)*secs
mins_arc=(2*math.pi/60)*mins+secs_arc/60
hours_arc=(2*math.pi/12)*hours+mins_arc/12

end

function conky_clock_rings()
local function setup_rings(cr,pt)
local str=''
local value=0

str=string.format('${%s %s}',pt['name'],pt['arg'])
str=conky_parse(str)

value=tonumber(str)
pct=value/pt['max']

draw_ring(cr,pct,pt)
end

-- Check that Conky has been running for at least 5s

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)

local updates=conky_parse('${updates}')
update_num=tonumber(updates)

if update_num>5 then
for i in pairs(settings_table) do
setup_rings(cr,settings_table[i])
end
end

draw_clock_hands(cr,clock_x,clock_y)
end
Avatar do usuário
fenon
 
Mensagens: 19
Registrado em: 03 Outubro, 2011
Localização: paragominas ,PA

Re: Mostre o seu Desktop!

Mensagempor ehrickwilliam » Qua, 26 de Outubro 2011, 14:02

Diego Pereira » Seg Out 24, 2011 10:02 am escreveu:
ehrickwilliam » Dom Out 23, 2011 2:07 am escreveu:
Elegancy Green

  • Sistema Operativo: Ubuntu 11.10 (Oneiric Ocelot)
  • Tema: MintLiner
  • Ícones: Faenza Mint
  • Wallpaper: http://i.imgur.com/i7jwR.jpg
  • Outros: Docky, Gnome Shell


Ola, bom dia!

Como você fez para que o menu dos aplicativos apareçam na barra superior?

Obrigado.



oi ! desculpa a demora.
tutorial \/
http://www.webupd8.org/2011/09/get-glob ... shell.html
Avatar do usuário
ehrickwilliam
 
Mensagens: 24
Registrado em: 06 Agosto, 2011

Re: Mostre o seu Desktop!

Mensagempor Roger Braga » Qua, 26 de Outubro 2011, 16:07

:ubuntued: RED EYE :ubuntued:

AGARB REGOR


Imagem
:ubuntued: "Somente seres humanos excepcionais e irrepreensíveis suscitam ideias generosas e ações elevadas. O conhecimento é limitado. A imaginação envolve ao mundo."
:ubuntued:
Avatar do usuário
Roger Braga
Mr. Deskmod
 
Mensagens: 755
Registrado em: 04 Julho, 2011
Localização: São Paulo, BRASIL

Re: Mostre o seu Desktop!

Mensagempor Roger Braga » Qua, 26 de Outubro 2011, 19:35

RAY 5

AGARB REGOR


Imagem
:ubuntued: "Somente seres humanos excepcionais e irrepreensíveis suscitam ideias generosas e ações elevadas. O conhecimento é limitado. A imaginação envolve ao mundo."
:ubuntued:
Avatar do usuário
Roger Braga
Mr. Deskmod
 
Mensagens: 755
Registrado em: 04 Julho, 2011
Localização: São Paulo, BRASIL

Re: Mostre o seu Desktop!

Mensagempor Roger Braga » Qua, 26 de Outubro 2011, 20:33

SONY

  • Sistema Operativo: Ubuntu 11.04 (Natty Narwhal)
  • Tema: Dark-linux-0.7
  • Ícones: iZ3 Elite 1.0
  • Wallpaper: http://img51.imageshack.us/img51/3506/7 ... 0x1050.jpg
  • AWN;
  • Screenlets;
  • Conky;
    conkyrc
    Spoiler:
    ######################
    # - Conky settings - #
    ######################
    update_interval 1
    total_run_times 0
    net_avg_samples 1
    cpu_avg_samples 1

    imlib_cache_size 0
    double_buffer yes
    no_buffers yes

    #####################
    # - Text settings - #
    #####################
    use_xft yes
    xftfont Led:size=180
    override_utf8_locale yes
    text_buffer_size 2048
    xftalpha 0.9

    #############################
    # - Window specifications - #
    #############################
    own_window_class Conky
    own_window yes
    # Descomente abaixo para Gome 2
    # deixando comentado para Gnome 3
    own_window_type override
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    alignment tr
    gap_x 10
    gap_y -160
    minimum_size 320 400
    default_bar_size 60 8

    #########################
    # - Graphics settings - #
    #########################
    # mude os valores de default_color e color2 se
    # não quiser o atual "preto e azul"
    draw_shades no
    default_color BDB76B
    default_shade_color 000000
    color0 BDB76B
    color1 ffffff
    # Vermelho - descomente, comentando Azul
    # color2 FE0D0D
    # Azul
    color2 8B658B

    TEXT
    ${voffset -000}${font Led:size=28}Tempo ligado:${color2}${uptime_short}${font}${color}
    ${voffset -250}${time %H}${font Led:size=80}H${font}
    ${color2}${voffset -200}${time %M}${font Led:size=80}M${font}${color}
    ${voffset -330}${font Led:size=28} ${time %d}-${time %B}-${time %Y}

AGARB REGOR


Imagem
:ubuntued: "Somente seres humanos excepcionais e irrepreensíveis suscitam ideias generosas e ações elevadas. O conhecimento é limitado. A imaginação envolve ao mundo."
:ubuntued:
Avatar do usuário
Roger Braga
Mr. Deskmod
 
Mensagens: 755
Registrado em: 04 Julho, 2011
Localização: São Paulo, BRASIL

Re: Mostre o seu Desktop!

Mensagempor Roger Braga » Qua, 26 de Outubro 2011, 21:40

AGARB REGOR


Imagem
:ubuntued: "Somente seres humanos excepcionais e irrepreensíveis suscitam ideias generosas e ações elevadas. O conhecimento é limitado. A imaginação envolve ao mundo."
:ubuntued:
Avatar do usuário
Roger Braga
Mr. Deskmod
 
Mensagens: 755
Registrado em: 04 Julho, 2011
Localização: São Paulo, BRASIL

Re: Mostre o seu Desktop!

Mensagempor Roger Braga » Qua, 26 de Outubro 2011, 23:26

AUDIO JUNGLE

AGARB REGOR


Imagem
:ubuntued: "Somente seres humanos excepcionais e irrepreensíveis suscitam ideias generosas e ações elevadas. O conhecimento é limitado. A imaginação envolve ao mundo."
:ubuntued:
Avatar do usuário
Roger Braga
Mr. Deskmod
 
Mensagens: 755
Registrado em: 04 Julho, 2011
Localização: São Paulo, BRASIL

Re: Mostre o seu Desktop!

Mensagempor fenon » Qui, 27 de Outubro 2011, 2:15

BMW Black


conkyrelog
Spoiler:
alignment top_left
background no
border_inner_margin 0
border_outer_margin 0
cpu_avg_samples 2
default_color 94959C
default_outline_color ffffff
default_shade_color 94959C
double_buffer yes
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
gap_x 1050
gap_y 500
maximum_width 500
max_port_monitor_connections 64
max_specials 512
max_user_text 16384
minimum_size 400 400
net_avg_samples 2
no_buffers yes
out_to_console no
own_window_colour black
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_type override
own_window yes
update_interval 0.4
uppercase no
use_spacer none
use_xft yes
xftalpha 0.8
xftfont Purisa:size=7

# -- Lua load -- #
lua_load ~/conky11/clock2.lua
lua_draw_hook_pre clock_rings

TEXT


clock2.lua
Spoiler:
--[[
Clock Rings by londonali1010 (2009)

This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.

IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.

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

Changelog:
+ v1.0 -- Original release (30.09.2009)
]]

settings_table = {
{
name='cpu',
arg='cpu0',
max=100,
bg_colour=0xE1E3E4,
bg_alpha=0,
fg_colour=0xE1E3E4,
fg_alpha=0.8,
x=195, y=195,
radius=137.5,
thickness=15,
start_angle=0,
end_angle=360
},
{
name='memperc',
arg='',
max=100,
bg_colour=0xd8d8d8,
bg_alpha=0.1,
fg_colour=0xd8d8d8,
fg_alpha=0.5,
x=195, y=195,
radius=157,
thickness=13,
start_angle=0,
end_angle=360
},
{
name='fs_used_perc',
arg='/',
max=100,
bg_colour=0xE1E3E4,
bg_alpha=0,
fg_colour=0x2E95E6,
fg_alpha=0.5,
x=195, y=195,
radius=100,
thickness=20,
start_angle=0,
end_angle=360
},
{
name='cpu',
arg='cpu1',
max=100,
bg_colour=0x353535,
bg_alpha=0.4,
fg_colour=0x2E95E6,
fg_alpha=1,
x=195, y=195,
radius=120,
thickness=10,
start_angle=0,
end_angle=360
},
{
name='wireless_link_qual_perc',
arg='eth0',
max=100,
bg_colour=0x353535,
bg_alpha=0.1,
fg_colour=0xE1E3E4,
fg_alpha=0.9,
x=195, y=195,
radius=80,
thickness=12.5,
start_angle=0,
end_angle=360
},
{
name='time',
arg='%I',
max=12,
bg_colour=0x868686,
bg_alpha=0.1,
fg_colour=0x868686,
fg_alpha=0.9,
x=195, y=195,
radius=28,
thickness=3.5,
start_angle=0,
end_angle=360
},
{
name='time',
arg='%M',
max=60,
bg_colour=0xE1E3E4,
bg_alpha=0.1,
fg_colour=0xE1E3E4,
fg_alpha=0.95,
x=195, y=195,
radius=33,
thickness=3.5,
start_angle=0,
end_angle=360
},
{
name='time',
arg='%S',
max=60,
bg_colour=0x868686,
bg_alpha=0.1,
fg_colour=0x868686,
fg_alpha=1.0,
x=195, y=195,
radius=13.5,
thickness=23,
start_angle=0,
end_angle=360
},
}

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

clock_r=125

-- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.

clock_x=195
clock_y=195

show_seconds=true

require 'cairo'

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

function draw_ring(cr,t,pt)
local w,h=conky_window.width,conky_window.height

local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

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=t*(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_clock_hands(cr,xc,yc)
local secs,mins,hours,secs_arc,mins_arc,hours_arc
local xh,yh,xm,ym,xs,ys

secs=os.date("%S")
mins=os.date("%M")
hours=os.date("%I")

secs_arc=(2*math.pi/60)*secs
mins_arc=(2*math.pi/60)*mins+secs_arc/60
hours_arc=(2*math.pi/12)*hours+mins_arc/12

-- Draw hour hand

xh=xc+0.7*clock_r*math.sin(hours_arc)
yh=yc-0.7*clock_r*math.cos(hours_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xh,yh)

cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
cairo_set_line_width(cr,5)
cairo_set_source_rgba(cr,1,1,1,0.8)
cairo_stroke(cr)

-- Draw minute hand

xm=xc+clock_r*math.sin(mins_arc)
ym=yc-clock_r*math.cos(mins_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xm,ym)

cairo_set_line_width(cr,3)
cairo_stroke(cr)

-- Draw seconds hand

if show_seconds then
xs=xc+clock_r*math.sin(secs_arc)
ys=yc-clock_r*math.cos(secs_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xs,ys)

cairo_set_line_width(cr,1)
cairo_stroke(cr)
end
end

function conky_clock_rings()
local function setup_rings(cr,pt)
local str=''
local value=0

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']

draw_ring(cr,pct,pt)
end

-- Check that Conky has been running for at least 5s

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)

local updates=conky_parse('${updates}')
update_num=tonumber(updates)

if update_num>5 then
for i in pairs(settings_table) do
setup_rings(cr,settings_table[i])
end
end

draw_clock_hands(cr,clock_x,clock_y)
end


conky:seven modificado,AWN
Avatar do usuário
fenon
 
Mensagens: 19
Registrado em: 03 Outubro, 2011
Localização: paragominas ,PA

AnteriorPróximo

Voltar para Temas do Ubuntu

Quem está online

Usuários navegando neste fórum: Google [Bot] e 16 visitantes