Wow, I love the first conky in your post, it reminds me of a jukebox!
Could you share the config file? Thanks.
Wow, I love the first conky in your post, it reminds me of a jukebox!
Male, could you post the configs/lua scripts for the 2 clocks in your image above? I visited the bunsenlabs sub forum on conky clocks and couldn't find them.
Can I confirm that this Lua clock won't work with conky 1.10?male wrote: ↑Tue Jul 24, 2018 9:07 am A clock completely written in Lua by @easysid and Sector11
From here.
wall.jpg
Thank you for your praise. But I think that this is more due to the real Conky Gurus.KoO wrote: I put a curtain over the window as I don.t even need to look outside side any more as we now have the The Linux Weather Guy on board..
Your work is outstanding Thanks so much..
I got the configuration from here. It is very demanding.asqwerth wrote:Wow, I love the first conky in your post, it reminds me of a jukebox!male wrote:The first one I didn't know, the second one already, if that's what you mean here:
Could you share the config file? Thanks
The first clock is from the LUA-Guru @mrpeachy and the configuration of @Sector11asqwerth wrote:Male, could you post the configs/lua scripts for the 2 clocks in your image above? I visited the bunsenlabs sub forum on conky clocks and couldn't find them.
Code: Select all
# pkill -xf "conky -c ~/Conky/The_Clock.conky" &
# Chronograph LUA - mrpeachy (originally 4 clocks - tweaked by Sector11)
### Begin Window Settings ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour gray
#own_window_class Conky
#own_window_title Chronograph_mrpeachy
# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes
### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
#own_window_argb_visual yes
### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 0
minimum_size 320 320 ## width, height
#maximum_width 420 ## width
### For use with The-Clock.lua
#minimum_size 264 264 ## width, height
#maximum_width 264 ## width
gap_x 15 ### left &right
gap_y 45 ### up & down
### alignment values or top_left, bottom_right, etc
# tl, tm, tr
# ml, mm, mr
# bl, bm, br
alignment bm
#################################################### End Window Settings ###
### Font Settings ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont CorporateMonoExtraBold:size=9
xftfont monofur:bold:size=14
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes
uppercase no
###################################################### End Font Settings ###
### Color Settings #########################################################
draw_shades no
default_shade_color black
draw_outline no # amplifies text if yes
default_outline_color black
default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 C2CCFF # Not a clue - a blue #778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140 0 DarkOrange
color3 7FFF00 #127 255 0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF # 0 191 255 DeepSkyBlue
color7 00FFFF # 0 255 255 Cyan
color8 FFFF00 #255 255 0 Yellow
color9 B22222 #178 34 34 FireBrick
##################################################### End Color Settings ###
### Borders Section ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
##################################################### End Borders Secton ###
### Miscellaneous Section ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes
# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none
# Default and Minimum size is 256 - needs more for single commands that
text_buffer_size 256
# Subtract (file system) buffers from used memory?
no_buffers yes
# change GiB to G and MiB to M
short_units yes
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
# If enabled, values which are in bytes will be printed in human readable
# format (i.e., KiB, MiB, etc). If disabled, bytes is printed instead
format_human_readable yes
# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes
imlib_cache_size 0
# Maximum size of user text buffer
# (default is 16384 bytes)
# max_user_text 16384
# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit
############################################## End Miscellaneous Section ###
### LUA Settings ###########################################################
## draw-bg.lua
##
#lua_load ~/Chrono-TEST/LUA/draw-bg.lua
################### Chronograph ##############################################
lua_load /home/male/.conky/mrpeachy-cronograph/crono.lua
lua_draw_hook_pre main
############################## End LUA Settings ###
update_interval 1
TEXT
Code: Select all
--chronograph mrpeachy 12/13/12 - i blame sector11 for starting the whole chronograph thing!
require 'cairo'
extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
function conky_main()
if conky_window == nil then return end
local updates=tonumber(conky_parse("${updates}"))
if updates<=3 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)
--#########################################################################################################
--defaults
default_font_name="White Rabbit"
default_font_size=22
default_font_face="n"
default_hex_color=0xffffff
default_alpha=1
default_red=1
default_green=1
default_blue=1
default_horizontal_justify="l" --"l"=left, "r"=right, "c"=center
default_vertical_justify="n" --"n"=normal, "nb"=normal-ybearing, "m"=middle, "mb"=middle-ybearing, "t"=top
default_rotation="0"
--font({f="name",fs=size,ff="face"}) face="n" or "b" or "i" or "bi"
--hexcolor({c=hexcolor,a=alpha})
--rgbcolor({r=,g=,b=,a=})
--text({x=x,y=y,t="text",hj=horizontal_justify,vj=vertical_justify,r=rotation})
--set center coordinates
centx,centy=200,200
--########################################################################################
--background circle
hexcolor({c=0x212121})
cairo_arc(cr,centx,centy,118,0,2*math.pi)
cairo_fill(cr)
--background circle
hexcolor({c=0x3c3c3c})
cairo_arc(cr,centx,centy,108,0,2*math.pi)
cairo_fill(cr)
--setup font and color
font({})
hexcolor({c=0xccaa7a})
--draw numbers and dots around main circle
for i=1,12 do
if i==12 or i==4 or i==8 then
x,y=pt(centx,centy,84,((360/12)*i))
text({y=y,x=x,t=i,hj="c",vj="m"})
end
if i==2 or i==6 or i==10 then
hexcolor({c=0xdac09b})
x,y=pt(centx,centy,98,((360/12)*i))
cairo_arc(cr,x,y,6,0,2*math.pi)
cairo_fill(cr)
else
hexcolor({c=0xccaa7a})
x,y=pt(centx,centy,98,((360/12)*i))
cairo_arc(cr,x,y,4,0,2*math.pi)
cairo_fill(cr)
end
end--for
--draw inbetween marks
cairo_set_line_width(cr,1)
for i=1,60 do
if string.find(i/5,"%.")~=nil then
x,y=pt(centx,centy,108,((360/60)*i))
cairo_move_to(cr,x,y)
x,y=pt(centx,centy,98,((360/60)*i))
cairo_line_to(cr,x,y)
cairo_stroke(cr)
end
end--for
--outer circle
cairo_arc(cr,centx,centy,108,0,2*math.pi)
cairo_stroke(cr)
--########################################################################################
--hours of day at 2 position
dcx,dcy=pt(centx,centy,98,60)
font({fs=8})
--numbers
for i=0,24,3 do
x,y=pt(dcx,dcy,68,180+((120/24)*i))
text({y=y,x=x,t=string.format("%02d",i),hj="c",vj="m"})
end--for
--marks
for i=0,24 do
if string.find(i/3,"%.")~=nil and i~=0 then
x,y=pt(dcx,dcy,60,180+((120/24)*i))
cairo_move_to(cr,x,y)
x,y=pt(dcx,dcy,56,180+((120/24)*i))
cairo_line_to(cr,x,y)
cairo_stroke(cr)
else
x,y=pt(dcx,dcy,58,180+((120/24)*i))
cairo_arc(cr,x,y,1.5,0,2*math.pi)
cairo_fill(cr)
end
end
--day name
font({fs=22})
dtx,dty=pt(dcx,dcy,30,180+60)
text({x=dtx,y=dty,t=string.upper(os.date("%a")),hj="c",vj="m"})
--indicator
cairo_set_line_width(cr,2)
hexcolor({c=0xdac09b})
hour=tonumber(os.date("%H"))
dpx,dpy=pt(dcx,dcy,54,180+(120*(hour/24)))
cairo_move_to(cr,dcx,dcy)
cairo_line_to(cr,dpx,dpy)
cairo_stroke(cr)
--########################################################################################
--days of month at 6 position
font({fs=8})
hexcolor({c=0xccaa7a})
cairo_set_line_width(cr,1)
mcx,mcy=pt(centx,centy,98,180)
--date calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time({year=year,month=03,day=01,hour=00,min=0,sec=0});
local t2 = os.time({year=year,month=02,day=01,hour=00,min=0,sec=0});
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={31,feb,31,30,31,30,31,31,30,31,30,31}
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
--marks
for i=1,mdays do
if string.find((i-1)/3,"%.")~=nil then
x,y=pt(mcx,mcy,60,300+((120/mdays)*i))
cairo_move_to(cr,x,y)
x,y=pt(mcx,mcy,56,300+((120/mdays)*i))
cairo_line_to(cr,x,y)
cairo_stroke(cr)
else
x,y=pt(mcx,mcy,60,300+((120/mdays)*i))
cairo_move_to(cr,x,y)
x,y=pt(mcx,mcy,54,300+((120/mdays)*i))
cairo_line_to(cr,x,y)
cairo_stroke(cr)
end
end--for
--numbers
for i=1,mdays,3 do
x,y=pt(mcx,mcy,68,300+((120/mdays)*i))
text({y=y,x=x,t=string.format("%02d",i),hj="c",vj="m"})
end--for
--month name
font({fs=22})
text({x=mcx,y=mcy-30,t=string.upper(os.date("%b")),hj="c",vj="m"})
--indicator
cairo_set_line_width(cr,2)
hexcolor({c=0xdac09b})
day=tonumber(os.date("%e"))
mpx,mpy=pt(mcx,mcy,52,300+(120*(day/mdays)))
cairo_move_to(cr,mcx,mcy)
cairo_line_to(cr,mpx,mpy)
cairo_stroke(cr)
--########################################################################################
--months of year at 10 position
font({fs=8})
hexcolor({c=0xccaa7a})
cairo_set_line_width(cr,1)
ycx,ycy=pt(centx,centy,98,5*60)
--date calculations
td=0
for i=1,12 do
td=td+monthdays[i]
end
angle={}
ang=0
for i=1,12 do
ang=((monthdays[i]/td)*120)+ang
angle[i]=ang
end
months={"J","F","M","A","M","J","J","A","S","O","N","D"}
--arc line
cairo_arc(cr,ycx,ycy,60,adeg(60),adeg(60+ang))
cairo_stroke(cr)
--arc marks
for i=0,12 do
x,y=pt(ycx,ycy,60,60+((angle[i] or 0)))
cairo_move_to(cr,x,y)
x,y=pt(ycx,ycy,56,60+((angle[i] or 0)))
cairo_line_to(cr,x,y)
cairo_stroke(cr)
end
--month letters
for i=1,12 do
x,y=pt(ycx,ycy,68,60+((120/12)*i)-(120/24))
text({y=y,x=x,t=months[i],hj="c",vj="m"})
end--for
--year text
font({fs=22})
ytx,yty=pt(ycx,ycy,30,60+60)
text({x=ytx,y=yty,t=string.upper(os.date("%y")),hj="c",vj="m"})
font({fs=12})
text({x=ytx-4,y=yty-10,t="20",hj="c",vj="n"})
--indicator
cairo_set_line_width(cr,2)
hexcolor({c=0xdac09b})
today=tonumber(os.date("%j"))-1
ypx,ypy=pt(ycx,ycy,55,60+(120*(today/td)))
cairo_move_to(cr,ycx,ycy)
cairo_line_to(cr,ypx,ypy)
cairo_stroke(cr)
--center circle
hexcolor({c=0xdac09b,a=1})
cairo_arc(cr,centx,centy,5,0,2*math.pi)
cairo_stroke(cr)
--hand calculations #######################################################
hours=tonumber(os.date("%I"))
-- convert hours to seconds
h_to_s=hours*60*60
minutes=tonumber(os.date("%M"))
-- convert minutes to seconds
m_to_s=minutes*60
-- get current seconds
seconds=tonumber(os.date("%S"))
-- DRAW HOUR HAND
-- get hours minutes seconds as just seconds
hsecs=h_to_s+m_to_s+seconds
-- calculate degrees for each second
hsec_degs=hsecs*(360/(60*60*12))
--call hand drawing function
--hexcolor({c=0xccaa7a,a=0.8})
hexcolor({c=0xdac09b,a=0.8})
cairo_set_line_width(cr,2)
hands(
centx,--string or coodinate for clock center x
centy,--string or coodinate for clock center y
hsec_degs,--string or value for hand degrees
70,--string or value for hand length (radius)
3,--set hand center width in pixels
10,--set hand mid width in degrees
0,--set hand end width in pixels, 0=a point
0.9--number from 0 to 1 as a propotion of total hand length, ie 0.5 is exact middle distance
)
--[[hands(
centx,--string or coodinate for clock center x
centy,--string or coodinate for clock center y
hsec_degs+180,--string or value for hand degrees
30,--string or value for hand length (radius)
6,--set hand center width in pixels
18,--set hand mid width in degrees
0,--set hand end width in pixels, 0=a point
.8--number from 0 to 1 as a propotion of total hand length, ie 0.5 is exact middle distance
)--]]
--MINUTES HAND
--hexcolor({c=0xdac09b,a=0.8})
hands(
200,--string or coodinate for clock center x
200,--string or coodinate for clock center y
360*((m_to_s+seconds)/(60*60)),--string or value for hand degrees
90,--string or value for hand length (radius)
3,--set hand center width in pixels
8,--set hand mid width in degrees
0,--set hand end width in pixels, 0=a point
0.9--number from 0 to 1 as a propotion of total hand length, ie 0.5 is exact middle distance
)
--[[hands(
200,--string or coodinate for clock center x
200,--string or coodinate for clock center y
180+(360*((m_to_s+seconds)/(60*60))),--string or value for hand degrees
30,--string or value for hand length (radius)
4,--set hand center width in pixels
18,--set hand mid width in degrees
0,--set hand end width in pixels, 0=a point
0.8--number from 0 to 1 as a propotion of total hand length, ie 0.5 is exact middle distance
)--]]
--#########################################################################################################
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end--end main function
--this function draws hands
function hands(clock_centerx,clock_centery,degrees,length,hand_center_width,hand_mid_width,hand_end_width,distance_to_mid)
--draw_middle
--calc start point
xs,ys=pt(clock_centerx,clock_centery,hand_center_width,degrees-90)
cairo_move_to(cr,xs,ys)
x1,y1=pt(clock_centerx,clock_centery,length*distance_to_mid,degrees-(hand_mid_width/2))
cairo_line_to (cr,x1,y1)
x2,y2=pt(clock_centerx,clock_centery,length,degrees)
cairo_arc(cr,x2,y2,hand_end_width,(degrees+180)*(math.pi/180),(degrees)*(math.pi/180))
--cairo_line_to (cr,x2,y2)
x3,y3=pt(clock_centerx,clock_centery,length*distance_to_mid,degrees+(hand_mid_width/2))
cairo_line_to (cr,x3,y3)
--calc end point
xe,ye=pt(clock_centerx,clock_centery,hand_center_width,degrees+90)
cairo_line_to (cr,xe,ye)
cairo_arc(cr,clock_centerx,clock_centery,hand_center_width,(degrees)*(math.pi/180),(degrees+180)*(math.pi/180))
cairo_fill(cr)
end
function adeg(deg)
return(math.pi/180)*(deg-90)
end
function pt(px,py,prad,pdeg)
local ppo=(math.pi/180)*pdeg
local px1=px+prad*(math.sin(ppo))
local py1=py-prad*(math.cos(ppo))
return px1,py1
end
function font(fontt)
local name=fontt.f or default_font_name or "mono"
local size=fontt.fs or default_font_size or 12
local face=fontt.ff or default_font_face or "n"
if face=="n" then
cairo_select_font_face(cr,name,CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
elseif face=="b" then
cairo_select_font_face(cr,name,CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_BOLD)
elseif face=="i" then
cairo_select_font_face(cr,name,CAIRO_FONT_SLANT_ITALIC,CAIRO_FONT_WEIGHT_NORMAL)
elseif face=="bi" then
cairo_select_font_face(cr,name,CAIRO_FONT_SLANT_ITALIC,CAIRO_FONT_WEIGHT_BOLD)
end
cairo_set_font_size(cr,size)
end
function hexcolor(hexcolort)
local col=hexcolort.c or default_hex_color or 0xffffff
local a=hexcolort.a or default_alpha or 1
local r,g,b=((col/0x10000) % 0x100)/255,((col/0x100) % 0x100)/255,(col % 0x100)/255
cairo_set_source_rgba(cr,r,g,b,a)
end
function rgbcolor(rgbcolort)
local r=rgbcolort.r or default_red or 1
local g=rgbcolort.g or default_green or 1
local b=rgbcolort.b or default_blue or 1
local a=rgbcolort.a or default_alpha or 1
cairo_set_source_rgba(cr,r,g,b,a)
end
function text(textt)
local x=textt.x or 100
local y=textt.y or 100
local t=textt.t or "set txt"
local hj=textt.hj or default_horizontal_justify or "l"
local vj=textt.vj or default_vertical_justify or "n"
local r=textt.r or default_rotation or 0
cairo_text_extents(cr,t,extents)
local wx=extents.x_advance
local wd=extents.width
local hy=extents.height
local bx=extents.x_bearing
local by=extents.y_bearing+hy
--hl-- l=left, c=center, r=right
if hj=="l" then
xa=x-bx
rad=0
elseif hj=="c" then
xa=x-((wx-bx)/2)-bx
rad=(wx-bx)/2
elseif hj=="r" then
xa=x-wx
rad=wx-bx
else
print ('hj not set correctly for text: '..t..' - "l", "c" or "r"')
xa=0
rad=0
end
--vj-- n=normal, nb=normal-ybearing, m=middle, mb=middle-ybearing, t=top
if vj=="n" then
ya=y
rad2=0
ry=by
elseif vj=="nb" then
ya=y-by
rad2=-by
ry=by
elseif vj=="m" then
ya=y+((hy-by)/2)
rad2=((hy-by)/2)
ry=((hy-by)/2)-by
elseif vj=="mb" then
ya=y+(hy/2)-by
rad2=(hy/2)-by
ry=((hy-by)/2)-by
elseif vj=="t" then
ya=y+hy-by
rad2=hy-by
ry=0+by
else
print ('vj not set correctly for text: '..t..' - "n", "nb", "m", "mb" or "t"')
ya=0
rad2=0
ry=0
end
--rotation
if r~=0 then
local x2,y2=pt(x,y,rad2,r-180)
local x1,y1=pt(x2,y2,rad,r-90)
cairo_save (cr)
cairo_translate (cr,x1,y1)
cairo_rotate(cr,(math.pi/180)*r)
cairo_show_text (cr,t)
cairo_stroke (cr)
cairo_restore (cr)
else
cairo_move_to (cr,xa,ya)
cairo_show_text (cr,t)
cairo_stroke (cr)
end--if ro
--set non local variables to nil
xa=nil;ya=nil;rad=nil;rad2=nil;ry=nil
end--function text ###################################################################
Code: Select all
alignment bm
# минимальный размер
minimum_size 260 0
# минимальная ширина
maximum_width 300
format_human_readable yes
default_color white
# по горизонтали
gap_x 20
# по вертикали
gap_y 45
# Используется ли Xft?
use_xft yes
# Шриф Xft когда Xft доступен, здесь можно ввести название и размер любого шрифта
xftfont PT Sans:size=8
own_window yes
own_window_type normal
own_window_transparent yes
#own_window_class Conky
#own_window_argb_visual
own_window_hints undecorated,below,skip_taskbar,skip_pager #sticky,
draw_shades no
draw_outline no
draw_borders no
double_buffer yes
#update interval (seconds)
update_interval 1.0
lua_load /home/male/.conky/Olgmen7/olgmen7_1.lua
lua_draw_hook_pre widgets
TEXT
${voffset 90}${goto 130}${color ffcc00}${cpu cpu}%
${voffset 10}${goto 100}${execpi 6 sensors | grep 'Core 0' | cut -c16-17 | xargs /home/male/.conky/Olgmen7/colorizecore0.sh}°C${color}${goto 150}${execpi 6 sensors | grep 'Core 2' | cut -c16-17 | xargs /home/male/.conky/Olgmen7/colorizecore0.sh}°C${color}
${voffset 20}${goto 60}${color ffcc00}ram: $memperc%${goto 170}hdd: ${fs_used_perc /}%
${voffset 20}${goto 107}${font PT Sans:size 14}${time %d.%m.%g}
${voffset 80}
Code: Select all
#!/bin/bash
# colorizecore0.sh
COOL=74
WARM=95
if [[ $1 -lt $COOL ]]
then echo "\${color 00bf00}"$1 # COOL
elif [[ $1 -gt $WARM ]]
then echo "\${color FF0000}"$1 # HOT# colorize.sh
else echo "\${color 00ff00}"$1 # WARM
fi
exit 0
Code: Select all
--[[
При сборке скрипта использованы данные из следующих скриптов
Conky Widgets by londonali1010 (2009) - часы и кольца
Shadowed clock by wlourf (10 jan. 2010) - стрелки часов с тенью
BARGRAPH WIDGET v1.3 by wlourf (03 march 2010)
Собрал все это Борис Кринкель <olgmen> krinkel@rambler.ru
Для этого серипта требуется CONKY версии 1.7.2
Для вызова этого скрипта в Conky вставьте следующие строки до TEXT (при условии, что скрипт сохранен в ~/scripts/conky_widgets.lua):
lua_load ~/scripts/olgmen7_1.lua
lua_draw_hook_pre widgets
]]
require 'cairo'
--[[ AIR CLOCK WIDGET ]]
--[[ Виджет выводит изображение часов.
Часть настроек находится в виджете
]]
function clock(cr, x, y, s, bgc, bga, fgc, fga)
-- функция перекодировки цвета
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
-- назначаем толщину выводимых линий
local s_th = 2
-- рисуем циферблат
local radius = s/2
local m_x,m_y = x + s/2, y + s/2
-- вывод часовых делений
local i = 0
local winkel = math.rad(30)
for i=0,11,1 do
cairo_set_line_width(cr,s_th*1.5)
cairo_move_to(cr, m_x-math.sin(winkel*i)*(radius), m_y-math.cos(winkel*i)*(radius))
cairo_line_to(cr, m_x-math.sin(winkel*i)*(radius*0.8), m_y-math.cos(winkel*i)*(radius*0.8))
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
cairo_stroke(cr)
end
-- вывод минутных делений
local i = 0
local winkel = math.rad(6)
for i=0,59,1 do
cairo_set_line_width(cr,1)
cairo_move_to(cr, m_x-math.sin(winkel*i)*radius, m_y-math.cos(winkel*i)*radius)
cairo_line_to(cr, m_x-math.sin(winkel*i)*(radius*0.9), m_y-math.cos(winkel*i)*(radius*0.9))
cairo_stroke(cr)
end
-- часовые стрелки с тенью, взято из Shadowed clock by wlourf (10 jan. 2010)
function draw_hand(a_trame,arc,arc0,arc1,lg,r,border,rgb)
xx = xc + clock_r*math.sin(arc)*lg
yy = yc - clock_r*math.cos(arc)*lg
x0 = xc + r*math.sin(arc0)
y0 = yc - r*math.cos(arc0)
x1 = xc + r*math.sin(arc1)
y1 = yc - r*math.cos(arc1)
if border ~= nil then
cairo_set_line_width(cr,1)
cairo_set_source_rgba(cr,border[1],border[2],border[3],0.5)
cairo_move_to (cr, x0, y0)
cairo_curve_to (cr, x0, y0, xx, yy, x1, y1)
cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2)
cairo_stroke(cr)
end
-- рисуем тень
cairo_move_to (cr, x0, y0)
cairo_curve_to (cr, x0, y0, xx+shadow_xoffset, yy+shadow_yoffset, x1, y1)
cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2)
pat = cairo_pattern_create_radial (xc, yc, 0, xc, yc, clock_r)
cairo_pattern_add_color_stop_rgba (pat, 0, 0, 0, 0, shadow_opacity)
cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 0)
cairo_set_source (cr, pat)
cairo_fill (cr)
-- рисуем стрелки
cairo_move_to (cr, x0, y0)
cairo_curve_to (cr, x0, y0, xx, yy, x1, y1)
cairo_arc(cr,xc,yc,r,arc1-math.pi/2,arc0-math.pi/2)
pat = cairo_pattern_create_radial (xc, yc, clock_r/10, xc, yc, clock_r*lg)
cairo_pattern_add_color_stop_rgba (pat,0, rgb[1], rgb[2], rgb[3], 1)
cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1)
cairo_set_source (cr, pat)
cairo_fill (cr)
cairo_pattern_destroy (pat)
end
-- Здесь вводятся основные данные
-- радиус часов в пикселях, задаем половину диаметра часов
clock_r=s/2
-- координаты центра часов
xc = x+s/2
yc = y+s/2
-- координаты источника света относительно центра часов, 0 - источник света над центром
-- может быть положительным, источник света выше центра, или отрицательным
shadow_xoffset=70
shadow_yoffset=70
-- прозрачность тени, значения от 0 до 1
shadow_opacity=0.5
-- Выводить секундную стрелку, Да - true, Нет - false.
-- При выводе секундной стрелки update_interval в .conkyrc должен быть менее 1 сек.
show_seconds=true
-- Выводить ось стрелок в центре часов, Да - true, Нет - false.
show_dot = true
-- размеры стрелок, первая цифра ширина, вторая - длина
rh,lgh=3,1.2 -- часовая стрелка
rm,lgm=2,1.75 -- минутная стрелка
rs,lgs=1,1.9 -- секундная стрелка
-- забираем данные из ОС
local hours=os.date("%I")
local mins=os.date("%M")
local secs=os.date("%S")
-- расчет угла движения стрелок
gamma = math.pi/2-math.atan(rs/(clock_r*lgs))
secs_arc=(2*math.pi/60)*secs
secs_arc0=secs_arc-gamma
secs_arc1=secs_arc+gamma
gamma = math.pi/2-math.atan(rm/(clock_r*lgm))
mins_arc=(2*math.pi/60)*mins + secs_arc/60
mins_arc0=mins_arc-gamma
mins_arc1=mins_arc+gamma
gamma = math.pi/2-math.atan(rh/(clock_r*lgh))
hours_arc=(2*math.pi/12)*hours+mins_arc/12
hours_arc0=hours_arc-gamma
hours_arc1=hours_arc+gamma
-- вывод стрелок
draw_hand(alpha_trame,hours_arc,hours_arc0,hours_arc1,lgh,rh,{0,0,0},{1,1,1})
draw_hand(alpha_trame,mins_arc,mins_arc0,mins_arc1,lgm,rm,{0,0,0},{.9,.9,.9})
if show_seconds then
draw_hand(alpha_trame,secs_arc,secs_arc0,secs_arc1,lgs,rs,{0,0,0},{.8,.8,.8})
end
-- рисуем ось стрелок
if show_dot then
lg_shadow_center=3
radius=math.min(rh,rm,rs)*0.75
if radius<1 then radius=1 end
ang = math.atan(shadow_yoffset/shadow_xoffset)
-- тень от оси
gamma = -math.atan(1/lg_shadow_center)
ang0=ang-gamma
ang1=ang+gamma
end
end
--[[ END AIR CLOCK WIDGET ]]
-- ---------------------------------------------------------------------------
--[[ BARGRAPH WIDGET
v1.3 by wlourf (03 march 2010)
This widget draw a simple bar like (old) equalizers on hi-fi systems.
http://u-scripts.blogspot.com/
The arguments are :
- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'...
or you can set it to "" if you want to display a numeric value with arg=numeric_value
- "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 bar. If the Conky variable outputs a percentage, use 100.
- "nb_blocks" is the umber of block to draw
- "cap" id the cap of a block, possibles values are CAIRO_LINE_CAP_ROUND , CAIRO_LINE_CAP_SQUARE or CAIRO_LINE_CAP_BUTT
see http://www.cairographics.org/samples/set_line_cap/
- "xb" and "yb" are the coordinates of the bottom left point of the bar, or the center of the circle if radius>0
- "w" and "h" are the width and the height of a block (without caps), w has no effect for "circle" bar
- "space" is the space betwwen two blocks, can be null or negative
- "bgc" and "bga" are background colors and alpha when the block is not LIGHT OFF
- "fgc" and "fga" are foreground colors and alpha when the block is not LIGHT ON
- "alc" and "ala" are foreground colors and alpha when the block is not LIGHT ON and ALARM ON
- "alarm" is the value where blocks LIGHT ON are in a different color (values from 0 to 100)
- "led_effect" true or false : to show a block with a led effect
- "led_alpha" alpha of the center of the led (values from 0 to 1)
- "smooth" true or false : colors in the bar has a smooth effect
- "mid_color",mid_alpha" : colors of the center of the bar (mid_color can to be set to nil)
- "rotation" : angle of rotation of the bar (values are 0 to 360 degrees). 0 = vertical bar, 90 = horizontal bar
- "radius" : draw the bar on a circle (it's no more a circle, radius = 0 to keep bars)
- "angle_bar" : if radius>0 angle_bar is the angle of the bar
v1.0 (10 Feb. 2010) original release
v1.1 (13 Feb. 2010) numeric values can be passed instead conky stats with parameters name="", arg = numeric_value
v1.2 (28 Feb. 2010) just renamed the widget to bargraph
v1.3 (03 March 2010) added parameters radius & angle_bar to draw the bar in a circular way
]]
function equalizer(cr, name, arg, max, nb_blocks, cap, xb, yb, w, h, space, bgc, bga, fgc, fga,alc,ala,alarm,led_effect,led_alpha,smooth,mid_color,mid_alpha,rotation, radius, angle_bar)
local function rgb_to_r_g_b(colour, alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
local function setup_equalizer()
local value = 0
if name ~="" then
local str = conky_parse(string.format('${%s %s}', name, arg))
value = tonumber(str)
else
value = arg
end
if value==nil then value =0 end
--if value <= 25 then max = 50
--elseif value <= 50 then max = 100 end
local pct = 100*value/max
local pcb = 100/nb_blocks
cairo_set_line_width (cr, h)
cairo_set_line_cap (cr, cap)
local angle_rot= rotation*math.pi/180
local alpha_bar = (angle_bar*math.pi/180)/2
for pt = 1,nb_blocks do
local light_on=false
--set colors
local col,alpha = bgc,bga
if pct>=(100/nb_blocks/2) then --start after an half bloc
if pct>=(pcb*(pt-1)) then
light_on=true
col,alpha = fgc,fga
if pct>=alarm and (pcb*pt)>alarm then col,alpha = alc,ala end
end
end
--vertical points
local x1=xb
local y1=yb-pt*(h+space)
local radius0 = yb-y1
local x2=xb+radius0*math.sin(angle_rot)
local y2=yb-radius0*math.cos(angle_rot)
--line on angle_rot
local a1=(y2-yb)/(x2-xb)
local b1=y2-a1*x2
--line perpendicular to angle_rot
local a2=-1/a1
local b2=y2-a2*x2
--dots on perpendicular
local xx0,xx1,yy0,yy1=0,0,0,0
if rotation == 90 or rotation == 270 then
xx0,xx1=x2,x2
yy0=yb
yy1=yb+w
else
xx0,xx1=x2,x2+w*math.cos(angle_rot)
yy0=xx0*a2+b2
yy1=xx1*a2+b2
end
local xc,yc
--perpendicular segment
if alpha_bar == 0 then
cairo_move_to (cr, xx0 ,yy0)
cairo_line_to (cr, xx1 ,yy1)
xc,yc=(xx0+xx1)/2,(yy0+yy1)/2
else
cairo_arc( cr,
xb,
yb,
radius+(h+space)*(pt)-h/2,
( -alpha_bar -math.pi/2+angle_rot) ,
( alpha_bar -math.pi/2+angle_rot)
)
xc=xb+ (radius+(h+space)*(pt))*math.sin(angle_rot)
yc=yb- (radius+(h+space)*(pt))*math.cos(angle_rot)
end
--colors
if light_on and led_effect then
local pat = cairo_pattern_create_radial (xc, yc, 0, xc,yc,w/1.5)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col,led_alpha))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col,alpha))
cairo_set_source (cr, pat)
cairo_pattern_destroy(pat)
else
cairo_set_source_rgba(cr, rgb_to_r_g_b(col,alpha))
end
if light_on and smooth then
local radius = (nb_blocks+1)*(h+space)
if pt==1 then
xc0,yc0=xc,yc --remember the center of first block
end
cairo_move_to(cr,xc0,yc0)
local pat = cairo_pattern_create_radial (xc0, yc0, 0, xc0,yc0,radius)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(fgc,fga))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(alc,ala))
if mid_color ~=nil then
cairo_pattern_add_color_stop_rgba (pat, 0.5,rgb_to_r_g_b(mid_color,mid_alpha))
end
cairo_set_source (cr, pat)
cairo_pattern_destroy(pat)
end
cairo_stroke (cr);
end
end
--prevent segmentatioon error
local updates=tonumber(conky_parse('${updates}'))
if updates> 3 then
setup_equalizer()
end
end
-- ------------------------------------------------------------------------------------
--[[ TEXT WIDGET ]]
function addzero100(num)
if tonumber(num) == nil then return end --tonumber(num) == 0 end
if tonumber(num) < 10 then
return "00" .. num
elseif tonumber(num) <100 then
return "0" .. num
else
return num
end
end
function string:split(delimiter)
local result = { }
local from = 1
local delim_from, delim_to = string.find( self, delimiter, from )
while delim_from do
table.insert( result, string.sub( self, from , delim_from-1 ) )
from = delim_to + 1
delim_from, delim_to = string.find( self, delimiter, from )
end
table.insert( result, string.sub( self, from ) )
return result
end
function circlewriting(cr, text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1)
local inum=string.len(text)
range=finish
deg=(finish-start)/(inum-1)
degrads=1*(math.pi/180)
local textcut=string.gsub(text, ".", "%1@@@")
texttable=string.split(textcut, "@@@")
for i = 1,inum do
ival=i
interval=(degrads*(start+(deg*(i-1))))+var1
interval2=degrads*(start+(deg*(i-1)))
txs=0+radi*(math.sin(interval))
tys=0-radi*(math.cos(interval))
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize);
cairo_set_source_rgba (cr, tred, tgreen, tblue, talpha);
cairo_move_to (cr, txs+horiz, tys+verti);
cairo_rotate (cr, interval2)
cairo_show_text (cr, (texttable[i]))
cairo_rotate (cr, -interval2)
end
end
function circlewritingdown(cr, text, font, fsize, radi, horiz, verti, tred, tgreen, tblue, talpha, start, finish, var1)
local inum=string.len(text)
deg=(start-finish)/(inum-1)
degrads=1*(math.pi/180)
local textcut=string.gsub(text, ".", "%1@@@")
texttable=string.split(textcut, "@@@")
for i = 1,inum do
ival=i
interval=(degrads*(start-(deg*(i-1))))+var1
interval2=degrads*(start-(deg*(i-1)))
txs=0+radi*(math.sin(interval))
tys=0-radi*(math.cos(interval))
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize);
cairo_set_source_rgba (cr, tred, tgreen, tblue, talpha);
cairo_move_to (cr, txs+horiz, tys+verti);
cairo_rotate (cr, interval2+(180*math.pi/180))
cairo_show_text (cr, (texttable[i]))
cairo_rotate (cr, -interval2-(180*math.pi/180))
end
end
function conky_draw_text()
local updates=conky_parse('${updates}')
update_num=tonumber(updates)
--circlewriting variable
cpu=tonumber(conky_parse('${cpu cpu0}'))
if cpu == nil then cpu = 0 end
--text must be in quotes
text=("CPU 1 " .. (addzero100(cpu)) .. "%")
--font name must be in quotes
font="PT Sans"
fontsize=12
radius=70
positionx=140
positiony=160
colorred=1
colorgreen=0.7
colorblue=0
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450. Finish has to be greater than start.
start=290
finish=340
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--circlewritingdown variables
cpu=tonumber(conky_parse('${cpu cpu2}'))
if cpu == nil then cpu = 0 end
--text must be in quotes
text=("CPU 2 " .. (addzero100(cpu)) .. "%")
--font name must be in quotes
font="PT Sans"
fontsize=12
radius=70
positionx=140
positiony=160
colorred=1
colorgreen=0.7
colorblue=0
coloralpha=1
--to set start and finish values for circlewritingdown, if the text will cross 0 degrees then you must calculate for 0-finish degrees
--eg if you want to go from 90 to 270, then you will input 90 to -90. Start has to be greater than finish
start=10
finish=60
letterposition=0
circlewriting(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--circlewritingdown variable
down=tonumber(conky_parse('${downspeedf eth0}'))
--text must be in quotes
text=("DOWN " .. down .. "")
--font name must be in quotes
font="PT Sans"
fontsize=12
radius=77
positionx=140
positiony=160
colorred=1
colorgreen=0.7
colorblue=0
coloralpha=1
--to set start and finish values for circlewritingdown, if the text will cross 0 degrees then you must calculate for 0-finish degrees
--eg if you want to go from 90 to 270, then you will input 90 to -90. Start has to be greater than finish
start=250
finish=190
letterposition=0.06
circlewritingdown(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
--circlewriting variables
up=tonumber(conky_parse('${upspeedf eth0}'))
--text must be in quotes
text=("UP " .. up .. "")
--font name must be in quotes
font="PT Sans"
fontsize=12
radius=77
positionx=140
positiony=160
colorred=1
colorgreen=0.7
colorblue=0
coloralpha=1
--to set start and finish values for circlewriting, if the text will cross 0 degrees then you must calculate for 360+finish degrees
--eg if you want to go from 270 to 90, then you will input 270 to 450. Finish has to be greater than start.
start=150
finish=120
letterposition=0
circlewritingdown(cr, text, font, fontsize, radius, positionx, positiony, colorred, colorgreen, colorblue, coloralpha, start, finish, letterposition)
-- end
end
--[[ END TEXT WIDGET ]]
-- -------------------------------------------------------------------------------------
function conky_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)
-- -------------------------------------------------------------------------------------
--function equalizer(name, arg, max, nb_blocks, cap, xb, yb, w, h, space, bgc, bga, fgc, fga, alc, ala, alarm, led_effect, led_alpha, smooth, mid_color, mid_alpha, rotation, radius, angle_bar)
cr = cairo_create(cs)
if var == nil then var = 0 end
var = var + 1
angle = var
equalizer(cr, 'cpu', 'cpu0', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0.2, 0x66ff00, 1, 0x00ccff, 1, 80, true, 1, true, 0xff0000, 1.0, 40, 10, 75)
equalizer(cr, 'cpu', 'cpu1', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0.2, 0x66ff00, 1, 0x00ccff, 1, 80, true, 1, true, 0xff0000, 1.0, 320, 10, 75)
equalizer(cr, 'memperc', '', 100, 50, CAIRO_LINE_CAP_BUTT, 140, 160, 100, 1, 1, 0x00cc66, 0.2, 0x66ff00, 1, 0x00ccff, 1, 80, true, 1, true, 0xff0000, 1.0, 270, 10, 20)
equalizer(cr, 'fs_used_perc', '/', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0.2, 0x66ff00, 1, 0x00ccff, 1, 80, true, 1, true, 0xff0000, 1.0, 90, 10, 20)
equalizer(cr, 'downspeedf', 'eth0', 1000, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0.2, 0x66ff00, 1, 0x66ff00, 1, 80, true, 1, true, 0xff0000, 1.0, 220, 10, 75)
equalizer(cr, 'upspeedf', 'eth0', 100, 50, CAIRO_LINE_CAP_SQUARE, 140, 160, 100, 1, 1, 0x00cc66, 0.2, 0x66ff00, 1, 0x66ff00, 1, 80, true, 1, true, 0xff0000, 1.0, 140, 10, 75)
cairo_destroy(cr)
--[[ Вывод часов ]]
cr = cairo_create(cs)
clock(cr, 30, 50, 220, 0xffffff, 1, 0xFFF8DC, 1)
cairo_destroy(cr)
--[[ Вывод текста по кругу, настройке в скрипте ]]
cr = cairo_create(cs)
conky_draw_text()
cairo_destroy(cr)
end
A conversion to configuration 1.10 and its representation in MX17 works for me.asqwerth wrote:Can I confirm that this Lua clock won't work with conky 1.10?male wrote:A clock completely written in Lua by @easysid and Sector11
From here.
Code: Select all
conky.config = {
-- conky -c /media/5/conky/grimy_wall/grimy_conkyrc_clock &
-- pkill -xf "conky -c /media/5/conky/grimy_wall/grimy_conkyrc_clock" &
-- clock
-- written by easysid
-- Sun, 20 Oct 2013 10:44:04 IST
--## Begin Window Settings ##################################################
-- Create own window instead of using desktop (required in nautilus)
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',--,sticky
--own_window_colour gray
--own_window_class Conky
--own_window_title easysid Mech Clock
-- Use the Xdbe extension? (eliminates flicker)
-- It is highly recommended to use own window with this one
-- so double buffer won't be so big.
double_buffer = true,
--## ARGB can be used for real transparency
--## NOTE that a composite manager is required for real transparency.
--## This option will not work as desired (in most cases) in conjunction with
--## own_window_type normal
-- own_window_argb_visual yes
--## When ARGB visuals are enabled, this use this to modify the alpha value
--## Use: own_window_type normal
--## Use: own_window_transparent no
--## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
-- own_window_argb_value 0 #255
--minimum_size 320 320 ### w|h
--maximum_width 320 ### w
minimum_width = 350, minimum_height = 260,--## w|h
maximum_width = 350,--## w
gap_x = 40,--## l|r
gap_y = 45,--## u|d
-- Aligned position on screen: tl, tr, tm, bl, br, bm, ml, mr
alignment = 'bottom_left',--mm #tr
--#################################left################# End Window Settings ###
--## Font Settings #########################################################
-- Use Xft (anti-aliased font and stuff)
use_xft = true,
--xftfont Liberation Sans:size=15
font = 'monofur:bold:size=10',
-- Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha = 1,
-- Force UTF8? requires XFT ###
override_utf8_locale = true,
--#############################################################################
uppercase = false,
--##################################################### End Font Settings ###
--## Color Settings #########################################################
draw_shades = true,--no # amplifies text if yes
default_shade_color = '#000000',
draw_outline = false,-- amplifies text if yes
default_outline_color = '#000000',
--default_color DCDCDC #220 220 220 Gainsboro
--default_color C0C0C0 #192 192 192 Silver
--default_color B0E0E6 #176 224 230 PowderBlue
default_color = '#778899',--119 136 153 LightSlateGray
color0 = '#8FBC8F',--143 188 143 DarkSeaGreen
color1 = '#778899',--119 136 153 LightSlateGray
color2 = '#D8BFD8',--216 191 216 Thistle
color3 = '#9ACD32',--154 205 50 YellowGreen
color4 = '#FFA07A',--255 160 122 LightSalmon
color5 = '#FFDEAD',--255 222 173 NavajoWhite
color6 = '#00BFFF',-- 0 191 255 DeepSkyBlue
color7 = '#5F9EA0',-- 95 158 160 CadetBlue
color8 = '#BDB76B',--189 183 107 DarkKhaki
color9 = '#CD5C5C',--205 92 92 IndianRed
--#################################################### End Color Settings ###
--## Borders Section ########################################################
draw_borders = false,
-- Stippled borders?
stippled_borders = 0,
-- border margins
border_inner_margin = 0,
border_outer_margin = 0,
-- border width
border_width = 0,
-- graph borders
draw_graph_borders = true,
--default_graph_size 15 40
--#################################################### End Borders Secton ###
--## Miscellaneous Section ##################################################
-- Boolean value, if true, Conky will be forked to background when started.
background = true,
-- Adds spaces around certain objects to stop them from moving other things
-- around, this only helps if you are using a mono font
-- Options: right, left or none
use_spacer = 'none',
-- Default and Minimum size is 256 - needs more for single commands that
--text_buffer_size 1028 ## only use if required - uses resources
-- Subtract (file system) buffers from used memory?
no_buffers = true,
-- change GiB to G and MiB to M
short_units = true,
-- Like it says, ot pads the decimals on % values
-- doesn't seem to work since v1.7.1
pad_percents = 2,
-- Maximum size of user text buffer
-- (default is 16384 bytes)
-- max_user_text 16384
-- Desired output unit of all objects displaying a temperature. Parameters are
-- either "fahrenheit" or "celsius". The default unit is degree Celsius.
-- temperature_unit Fahrenheit
--# Imlib2 image cache size, in bytes. Defaults to 4MiB. Increase this value
--# if you use $image lots. Set to 0 to disable the image cache.
imlib_cache_size = 0,
--top_name_width 15
--############################################# End Miscellaneous Section ###
--## LUA Settings ###########################################################
-- lua_load ~/wea_conky/draw_bg.lua
--# ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
--# ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
--#
-- lua_load /media/5/Conky/LUA/draw-bg.lua
-- lua_draw_hook_pre draw_bg 50 0 0 0 0 0x000000 0.3
update_interval = 1,
-- -- Lua load -- #
--lua_load /media/5/Conky/easysid/MechClock/fancyclock.lua
lua_load = '~/.conky/grimy_wall/fancyclock.lua',
lua_draw_hook_pre = 'main',
};
conky.text = [[
${goto 225} UP:
${goto 225}${uptime_short}
${goto 150}${time %a}
${goto 260}${time %b}
${goto 260}${time %d}
${goto 175}${time %Y}
]];
Thanks for all 3 of your replies. Now I have some fun stuff to keep me busy when I have a little more time this weekend!male wrote:I have not managed to represent it with 1.9 or 1.10 in MX17. It works in antiX.
No ansqwerth, this has nothing to do with other packages bearing the name "cairo" in themasqwerth wrote: 1) I notice that the lua scripts mention "requires cairo". Which cairo packages are required? I checked Synaptic and there are many packages with the word cairo in them, but there is none with the single word "cairo" as its name. I have a python-cairo package pre-installed , but there are many more not installed.
Code: Select all
require 'cairo'
Code: Select all
conky -v