Originally Posted by
ragamatrix
@Sector11
Hi! What a great work you did ! I've "spyed" a little but not discretly on another forum and I've tested your new "Chronograph_full_2"
Really nice and again big thanks ! (it's for instance in 2 languages but that doesn't disturb me so much)except the metric system...Sorry bad joke
By the way I got a 1920x1080...
Have a nice day
Tschüss
a shot :
http://pix.toile-libre.org/upload/or...1352386371.png
Not "my work" but a collaberation of various people.
Like this
- Sector11 steals 4-clocks code from mrpeachy and edits it to The 24 Hour Chronograph, with help from mrp.
- McLovin steals code from Sector11 and edits it, reverting it back to a 12 hour clock and adds conkyForecast
- Sector11 steals that and again edits it back to a 24 Hour Clock using mrpeachy's v9000 weather.
The template uses the new addition in the main ~/v9000/v9000.lua script:
so betweenthis line:
Code:
function out(tx)--##############################################################
and this line:
Code:
end--function out ##############################################################
you need to change it to:
Code:
function out(tx)--##############################################################
--#############################
--font needs to be set first #########
f=nil
f=(tx.f or default_font)
--#############################
--additional face settings
face=nil
face=(tx.face or default_face) -- old is: face=(tx.face or "normal")
if face=="normal" then
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
elseif face=="bold" then
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
elseif face=="italic" then
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL);
elseif face=="bolditalic" then
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_BOLD);
end
--##############################################################################
c=nil
c=(tx.c or default_color)
a=nil
a=(tx.a or default_alpha)
fs=nil
fs=(tx.fs or default_font_size)
x=nil
x=(tx.x or 0)
y=nil
y=(tx.y or 0)
txt=nil
txt=(tx.txt or "set txt")
local function col(c,a)
return ( (c/0x10000) % 0x100)/255,( (c/0x100) % 0x100)/255,(c % 0x100)/255,a
end--local function
cairo_set_font_size (cr, fs)
cairo_set_source_rgba (cr,col(c,a))
cairo_move_to (cr,x,y)
cairo_show_text (cr,txt)
cairo_stroke (cr)
end--function out ##############################################################
Then in any tempalte to have you have to add a section if you want the new features:
Code:
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="monofur"--font must be in quotes
default_font_size=12
default_color=0xffffff --white
default_alpha=1 --fully opaque
default_image_width=50
default_image_height=50
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
Bookmarks