Doterivanje, editovanje, razmena... conkyrc-a

Teme koje se tiču podešavanja i zanimljivosti u vezi desktop okruženja

Moderators: Sinisa, Urednik

Post Reply

Administrator
Administrator
offline
User avatar

Posts: 2686
Joined: 01 Apr 2012, 13:50
Location: Mlečni put

Post Napisano: 21 Sep 2014, 19:56


Hoćeš sa ili bez slack bedža :) Ta sličica je stavljena da izigrava okvir sata :D Na njemu su samo kazaljke postavljene kroz lua i conky :evil:
13_1.jpg
Use the source, Luke
SSZ irc kanal
Spread the Word, “CHOOSE SLACK! and Don’t look back.”



Poznata ličnost
Poznata ličnost
offline
User avatar

Posts: 117
Joined: 18 Jan 2014, 18:02
Location: /home

Post Napisano: 23 Sep 2014, 14:30


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"



Administrator
Administrator
offline
User avatar

Posts: 2686
Joined: 01 Apr 2012, 13:50
Location: Mlečni put

Post Napisano: 23 Sep 2014, 17:18


Ajde, ajde evo tapet :)
13.jpg
Use the source, Luke
SSZ irc kanal
Spread the Word, “CHOOSE SLACK! and Don’t look back.”



Administrator
Administrator
offline
User avatar

Posts: 2686
Joined: 01 Apr 2012, 13:50
Location: Mlečni put

Post Napisano: 03 Oct 2014, 14:19


Blaga dorada clock.lua - dodat kvadratni okvir.
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
i to izgleda ovako:
2014-10-03-152028_1360x768_scrot.png
Use the source, Luke
SSZ irc kanal
Spread the Word, “CHOOSE SLACK! and Don’t look back.”



Administrator
Administrator
offline
User avatar

Posts: 4075
Joined: 04 Feb 2011, 20:32
Location: Beograd
Contact:

Post Napisano: 25 Oct 2014, 18:45


Već znate da ja ne koristim Conki... Ali naleteo sam na jednu temu koja izgleda fino, pa rekoh da podelim sa vama koji koristite.
167596-1.png
http://gtk-apps.org/content/show.php/Re ... ent=167596" onclick="window.open(this.href);return false;


Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests