Hoćeš sa ili bez slack bedža Ta sličica je stavljena da izigrava okvir sata Na njemu su samo kazaljke postavljene kroz lua i conky
Doterivanje, editovanje, razmena... conkyrc-a
- Posts: 117
- Joined: 18 Jan 2014, 18:02
- Location: /home
Hvala stereo! A mozes i bez bedza pa se iskoristi i jos negdje, ako ti nije mrsko naravno!
"It is not the brains that matter most, but that which guides them—the character, the heart, generous qualities, progressive ideas."
"I'd have to be a warrior, a slave I couldn't be. Soldier and a conqueror, fighting to be free"
"I'd have to be a warrior, a slave I couldn't be. Soldier and a conqueror, fighting to be free"
- Posts: 3468
- Joined: 01 Apr 2012, 13:50
- Location: Mlečni put
Blaga dorada clock.lua - dodat kvadratni okvir.
Promenjena pozadina.
Sve ostalo isto u odnosu na prethodni config tako da ostavljam samo izmenjeni clock.lua:
i to izgleda ovako:
Promenjena pozadina.
Sve ostalo isto u odnosu na prethodni config tako da ostavljam samo izmenjeni clock.lua:
Code: Select all
require 'cairo'
function conky_draw_clock()
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)
-- Settings
-- What radius should the clock face (not including border) be, in pixels?
local clock_r=60
-- x and y coordinates, relative to the top left corner of Conky, in pixels
local xc=w/2
local yc=h/2
-- Extent of the shadow, in pixels
shadow_width=5
-- x and y offsets of the drop shadow, relative to the centre of the clock face, in pixels. Can be positive (downward) or negative (upward)
shadow_xoffset=0
shadow_yoffset=2
-- Do you want to show the second hand? Use this if you use a Conky update_interval > 1s. Can be true or false.
show_seconds=true
-- Grab time
local hours=os.date("%I")
local mins=os.date("%M")
local secs=os.date("%S")
secs_arc=(2*math.pi/60)*secs
mins_arc=(2*math.pi/60)*mins
hours_arc=(2*math.pi/12)*hours+mins_arc/12
-- Draw hour hand
xh=xc+0.9*clock_r*math.sin(hours_arc)
yh=yc-0.9*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.5)
cairo_stroke(cr)
-- Draw minute hand
xm=xc+1.3*clock_r*math.sin(mins_arc)
ym=yc-1.3*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
-- Draw rectangle around clock
line_width=3
top_left_x=50
top_left_y=50
rec_width=160
rec_height=160
red=1
green=1
blue=1
alpha=0.5
cairo_set_line_width (cr,line_width)
cairo_rectangle (cr,top_left_x,top_left_y,rec_width,rec_height)
cairo_set_source_rgba (cr,red,green,blue,alpha)
cairo_stroke (cr)
if show_seconds then
xs=xc+1.1*clock_r*math.sin(secs_arc)
ys=yc-1.1*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
- Posts: 4591
- Joined: 04 Feb 2011, 20:32
- Location: Beograd
- Contact:
Već znate da ja ne koristim Conki... Ali naleteo sam na jednu temu koja izgleda fino, pa rekoh da podelim sa vama koji koristite.
http://gtk-apps.org/content/show.php/Re ... ent=167596" onclick="window.open(this.href);return false;
http://gtk-apps.org/content/show.php/Re ... ent=167596" onclick="window.open(this.href);return false;
Who is online
Users browsing this forum: Bing [Bot] and 34 guests