You are not logged in.
@ansem_of_nexus:
I tryed to, but recently i can`t get it to work...edit: as for my last post: is there by any means a chance to wrap the output of the conky to the surface of the tablet? maybe with lua?
what do you mean the surface of the tablet?
Offline
Naik wrote:edit: as for my last post: is there by any means a chance to wrap the output of the conky to the surface of the tablet? maybe with lua?
what do you mean the surface of the tablet?
the tabletpc she is holding on my wall is rotated inwards to her Body a little so the surface is not a rectangle but a parallelogram with a shorter left side.. and to look realistic my conky window should be one too 
greetz -naik
edit: typo
Last edited by Naik (2013-03-17 17:01:08)
if{ $doingitright=true}:
$sucess != 0;
Offline
ansem_of_nexus wrote:Naik wrote:edit: as for my last post: is there by any means a chance to wrap the output of the conky to the surface of the tablet? maybe with lua?
what do you mean the surface of the tablet?
the tabletpc she is holding on my wall is rotated inwards to her Body a little so the surface is not a rectangle but a parallelogram with a shorter left side.. and to look realistic my conky window should be one too
greetz -naik
edit: typo
Maybe these can be modified: Text Widget and to continue Text Widget 2
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
Naik wrote:ansem_of_nexus wrote:what do you mean the surface of the tablet?
the tabletpc she is holding on my wall is rotated inwards to her Body a little so the surface is not a rectangle but a parallelogram with a shorter left side.. and to look realistic my conky window should be one too
greetz -naik
edit: typo
Maybe these can be modified: Text Widget and to continue Text Widget 2
Thank you sir! It looks like this is exaktly what i was looking for.. will post the result asap.
edit: In fact it does a lot of nice things to work with but the one thing i am looking for is not achivable as far as i can see. there seems to be no "squeez the text at the end"-option and skew-x is fine but not what i looked for.
and i have not the slightest idea of how to manipulate the script for doing it. im a total lua-noop!
but thanks anyway! this truely is a noticeable script!
greetz -naik
Last edited by Naik (2013-03-18 10:38:45)
if{ $doingitright=true}:
$sucess != 0;
Offline
here u can find some examples:
http://wlourf.deviantart.com/art/Text-w … -192574368
because i like this text-effects i try to implement this examples into my template. i will post the result.
btw: v9000 is a good start for lua-beginners
try this: http://crunchbang.org/forums/viewtopic. … 11#p284211
edit: here you find blurred text:
if blurred=="yes" then
radi=radius
inum=number
horiz=x
verti=y
for i=1,inum do
deg=360/inum
text_arc=((2*math.pi/inum)*i)
txs=0+radi*(math.sin(text_arc))
tys=0-radi*(math.cos(text_arc))
----------------------------
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);
elseif face=="oblique" then
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_OBLIQUE, CAIRO_FONT_WEIGHT_NORMAL);
end
----------------------------
cairo_set_font_size (cr, fs);
cairo_set_source_rgba (cr, col(c,a));
cairo_move_to (cr, txs+horiz, tys+verti);
cairo_show_text (cr, txt)
end
elseif blurred=="no" then
txt=txt
endblurred text only looks good if u display real big words 
create text with a border was easier then i thought:
local function col(c,a)
return ( (c/0x10000) % 0x100)/255,( (c/0x100) % 0x100)/255,(c % 0x100)/255,a
end--local function
function drawBorder() -- border around text
font="mono"
font_size=50
posx=70
posy=165
txt="void"
txt_color=0xff0000
txt_alpha=1
border_color=0x000000
border_alpha=1
line_width=1
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, font_size);
cairo_move_to (cr, posx, posy);
cairo_text_path (cr,txt);
cairo_set_source_rgba (cr,col(txt_color,txt_alpha))
cairo_fill_preserve (cr);
cairo_set_source_rgba (cr,col(border_color,border_alpha))
cairo_set_line_width (cr, line_width);
cairo_stroke (cr);
endthis looks cool. and it increases the contrast 
Last edited by lionhead (2013-03-18 17:57:30)
“If you wish to make an apple pie from scratch, you must first invent the universe.” Carl Sagan
Offline
blur is cool and i will definetly try learning more about lua with the help of v900 (although i am not realy interested in weatherforcast since i have a real-life window
) but it wont really help me at all
in stead of looking like this
i would like the output look rather like this:
and therefor (in addition to rotat it a little) i need to change the hight of the window on one side only, or something like this.
But i begin to think that there wont be an easy way out, so grab the textbook and laern some lua naik...
greetz
if{ $doingitright=true}:
$sucess != 0;
Offline
^ I don't think you can make windows without 90 degree corners in X.
I know conky does not support that.
You could shade the background with other angles to the corners to simulate that effect though with a Lua script.
Offline
^ I don't think you can make windows without 90 degree corners in X.
I know conky does not support that.
You could shade the background with other angles to the corners to simulate that effect though with a Lua script.
well, i allmost thought so but i don`t understand your solution...
i thought of somthing like starting with ${font any:pixelsize=12} and ending up with ${font any:pixelsize=7}, but changing fontsize for any word/syllable/letter would probably crash conky and look strange anyway...
greetz- naik
if{ $doingitright=true}:
$sucess != 0;
Offline
^ What I mean is you can color the background of the conky window with a semi-transparent color to make the window look like it is not a rectangle even though it is using a lua script.
I have done circle and donut shaped backgrounds that way before.
Making a four sided shape with corners that don't meet at 90 degree angles is not difficult.
From your image I thought you just wanted to draw everything at an angle not shrink it gradually as you get closer to one side of the screen.
I think you can do either of those with cairo transformations but I am not very familiar with that part of cairo.
Maybe one of the other people here who have more experience with that part of cairo can give you some advice on it.
Last edited by arclance (2013-03-19 05:15:07)
Offline
Howdy
You can't do the kind of transform Naik is looking for i.e. wider one end than the other
you would have to do something along the lines of writing each letter in a different sized font and rotated/positioned to get close to the effect, but it never looks right
sorry to say, but I would start looking into other design ideas
*gone*
Offline
We need Conky 2 stable with LUA Cairo Pango support.
Debian Sid (Minted) x86_64/3.8-5, Conky 2.0_pre, Xorg 7.7/1.12.4, GNOME 3.4.2, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, ST9250827AS 250GB
Linux user No.: 483055 | Conky Pitstop
Offline
hmm... allright! it would be fun to have for so many designs, but sure i`ll only have to wait
for the time beeing, thanks to all of you guys for your time.
greetz -naik
if{ $doingitright=true}:
$sucess != 0;
Offline
is it possible to find just the numbers within a string, for example:
conky_parse("${fs_size /}")i only need the numbers. please help me.
edit: this gives me only a part of the number. but not the rest (behind the delimiter)
string.find(ausgang,"(%d*).*")Last edited by lionhead (2013-03-20 11:10:10)
“If you wish to make an apple pie from scratch, you must first invent the universe.” Carl Sagan
Offline
ausgang=conky_parse("${fs_size /}")
ausgang=string.gsub(ausgang, "(%d*\.*%d+).*", "%1")
print(ausgang)or
ausgang=conky_parse("${fs_size /}")
for i in string.gmatch(ausgang, "%d*\.*%d+") do ausgang=i end
print(ausgang)or
ausgang=conky_parse("${fs_size /}")
_s, _e, ausgang = string.find(ausgang, "(%d*\.*%d+).*")
print(ausgang)Last edited by dk75 (2013-03-20 13:59:46)
Debian Sid (Minted) x86_64/3.8-5, Conky 2.0_pre, Xorg 7.7/1.12.4, GNOME 3.4.2, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, ST9250827AS 250GB
Linux user No.: 483055 | Conky Pitstop
Offline
Hello guys!
Please can someone help me with this script.
${color 33001A}${font StyleBats:size=35}G${font} Lacie${color FFFFFF}
${if_mounted /media/nili/Lacie Disk}
${color 1C1C1C}Size: ${alignr}${fs_size /media/nili/Lacie Disk}
${color 33001A}${fs_bar 3,83 /media/nili/Lacie Disk}${color}
${color 1C1C1C}Free: ${alignc}${fs_free /media/nili/Lacie Disk} ${alignr}${color 33001A}(${fs_free_perc /media/nili/Lacie Disk}%)${color}
${color 1C1C1C}Used: ${alignc}${fs_used /media/nili/Lacie Disk} ${alignr}${color 33001A}(${fs_used_perc /media/nili/Lacie Disk}%)${color}
${else}${color 1C1C1C}Disk: Not mounted${color}
${endif}The problem is here, my external disk Lacie Disk has this space between lacie and disk which creates problem to display info when the disk is mounted. "To remember, the disk Lacie is mounted, but show not mounted because of the Space on the disk name".

while on Disk Toshiba plus Seagate with the same code work OK, because Toshiba and Seagate doesn't have space.
So how to fix the problem of space on the code above?
Any suggestion?
Thank you very much!
Last edited by Nili (2013-03-20 16:30:19)
Offline
@dk75
thanks for your help.
i've tried this:
-- ##################################################################################
-- ## display conky variables #######################################################
-- ##################################################################################
function display_system(cd)
-----------------------------
local conky_order=nil
local variable=nil
local device=nil
local del=nil
local cs = nil
local ms = nil
-----------------------------
variable=cd.variable
device=(cd.device or '')
del=(cd.del or '.')
-----------------------------
conky_order=conky_parse("${"..variable..' '..device.."}")
local result = conky_order:gsub(" ","")
local value = chgDel(result,del)
print("value: "..value)
---- short_units no ------------------------
if ((string.find(conky_order, "iB") == nil) and (string.find(conky_order, "B") ~= nil)) then
ms=(value:gsub("B",""))..' byte'
elseif string.find(value, 'KiB') ~= nil then
ms=(value:gsub("KiB",""))..' kb'
elseif string.find(value, 'MiB') ~= nil then
ms=(value:gsub("MiB",""))..' mb'
elseif string.find(value, 'GiB') ~= nil then
ms=(value:gsub("GiB",""))..' gb'
elseif string.find(value, "TiB") ~= nil then
ms=(value:gsub("TiB","")).." tb"
elseif ((string.find(variable, "perc") ~= nil) or (string.find(variable, "percent") ~= nil)) then
ms=chgDel(value,",").." %"
elseif ((string.find(variable,"freq") ~= nil) and (string.find(variable,"_g") == nil)) then
ms=value.." Mhz"
elseif ((string.find(variable,"freq") ~= nil) and (string.find(variable,"_g") ~= nil)) then
ms=value.." Ghz"
elseif ((string.find(variable,"downspeedf") ~= nil) or (string.find(variable,"upspeedf") ~= nil)) then
ms=value:gsub(" ","").." kb/s"
elseif string.find(variable,"time") ~= nil then
ms=conky_order:gsub(" ","")
elseif string.find(variable,"cpu") ~= nil then
ms=value.." %"
elseif ((string.find(conky_order, "fs_used") ~= nil) or (string.find(conky_order, "fs_free") ~= nil)) then
ms=chgDel(value,",").." gb"
print("ausgabe: "..ms)
-- fs_used
---- short_units yes -----------------------
elseif ((string.find(value, "iB") == nil) and (string.find(value, "B") ~= nil)) then
ms=(value:gsub("B",""))..' byte'
elseif string.find(value, "K") ~= nil then
ms=(value:gsub("K",""))..' kb'
elseif string.find(value, "M") ~= nil then
ms=(value:gsub("M",""))..' mb'
elseif string.find(value, "G") ~= nil then
ms=(value:gsub("G",""))..' gb'
elseif string.find(value, "T") ~= nil then
ms=(value:gsub("T",""))..' tb'
------------------------------------------------------
else ms=value:gsub(" ","") end
------------------------------------------------------
cs=string.gsub(tostring(ms),"%.",del)
return cs
end -- of function
-- #######################################################################
-- ## change delimiter and thousand separator ############################
-- #######################################################################
function chgDel(value,del)
local ausgang=nil
local ersteZahl=nil
local rest=nil
local outputNumber=nil
-------------------------------------------------
ausgang=string.gsub(value, "(%d*\.*%d+).*", "%1")
ausgang=tonumber(ausgang)
if ((ausgang >= 10000) and (ausgang <= 99999.99)) then
ersteZahl=string.sub(ausgang,1,2)
rest=string.sub(ausgang,3,string.len(ausgang))
-----------------------------------------------------------------
if del=="," then
outputNumber=ersteZahl..'.'..string.gsub(tostring(rest),"%.",",")
else
outputNumber=ersteZahl..','..string.gsub(tostring(rest),"%,",".")
end
-----------------------------------------------------------------
elseif ((ausgang>=1000) and (ausgang <9999.99)) then
ersteZahl=string.sub(ausgang,1,1)
rest=string.sub(ausgang,2,string.len(ausgang))
-----------------------------------------------------------------
if del=="," then
outputNumber=ersteZahl..'.'..string.gsub(tostring(rest),"%.",del)
elseif del=="." then
outputNumber=ersteZahl..','..rest
end
-----------------------------------------------------------------
elseif ausgang<999 then
-----------------------------------------------------------------
if del=="," then
outputNumber=string.gsub(tostring(ausgang),"%.",',')
elseif del=="." then
outputNumber=ausgang
end
-----------------------------------------------------------------
elseif ausgang >=100000 then
ersteZahl=string.sub(ausgang,1,3)
rest=string.sub(ausgang,4,string.len(ausgang))
-----------------------------------------------------------------
if del=="," then
outputNumber=ersteZahl..'.'..string.gsub(tostring(rest),"%.",del)
elseif del=="." then
outputNumber=ersteZahl..','..rest
end
-----------------------------------------------------------------
end
return outputNumber
endi have some problems with the script:
can u help me to fix this little problem?
if u see something to improve then feel free to post a message 
edit: i fixed the problem.
is it possible to look if a number is an integer?
Last edited by lionhead (2013-03-21 10:02:40)
“If you wish to make an apple pie from scratch, you must first invent the universe.” Carl Sagan
Offline
dunno how, because in overall it works for me ,except for indexing number value error, which I've fixed by converting "outputNumber" to string upon return from "chgDel" function.
Full script that I've used:
--[[
lionhead displaysystem test
--]]
function conky_lionhead(table)
if conky_window == nil then return "" end
local updates=tonumber(conky_parse('${updates}'))
if updates<=5 then return "" end
local table=loadstring("return "..table)()
display_system(table)
return ""
end
--#####################################################################
-- ##################################################################################
-- ## display conky variables #######################################################
-- ##################################################################################
function display_system(cd)
-----------------------------
local conky_order=nil
local variable=nil
local device=nil
local del=nil
local cs = nil
local ms = nil
-----------------------------
variable=cd.variable
device=(cd.device or '')
del=(cd.del or '.')
-----------------------------
conky_order=conky_parse("${"..variable..' '..device.."}")
local result = conky_order:gsub(" ","")
local value = chgDel(result,del)
print("value: "..value)
---- short_units no ------------------------
if ((string.find(conky_order, "iB") == nil) and (string.find(conky_order, "B") ~= nil)) then
ms=(value:gsub("B",""))..' byte'
elseif string.find(value, 'KiB') ~= nil then
ms=(value:gsub("KiB",""))..' kb'
elseif string.find(value, 'MiB') ~= nil then
ms=(value:gsub("MiB",""))..' mb'
elseif string.find(value, 'GiB') ~= nil then
ms=(value:gsub("GiB",""))..' gb'
elseif string.find(value, "TiB") ~= nil then
ms=(value:gsub("TiB","")).." tb"
elseif ((string.find(variable, "perc") ~= nil) or (string.find(variable, "percent") ~= nil)) then
ms=chgDel(value,",").." %"
elseif ((string.find(variable,"freq") ~= nil) and (string.find(variable,"_g") == nil)) then
ms=value.." Mhz"
elseif ((string.find(variable,"freq") ~= nil) and (string.find(variable,"_g") ~= nil)) then
ms=value.." Ghz"
elseif ((string.find(variable,"downspeedf") ~= nil) or (string.find(variable,"upspeedf") ~= nil)) then
ms=value:gsub(" ","").." kb/s"
elseif string.find(variable,"time") ~= nil then
ms=conky_order:gsub(" ","")
elseif string.find(variable,"cpu") ~= nil then
ms=value.." %"
elseif ((string.find(conky_order, "fs_used") ~= nil) or (string.find(conky_order, "fs_free") ~= nil)) then
ms=chgDel(value,",").." gb"
print("ausgabe: "..ms)
-- fs_used
---- short_units yes -----------------------
elseif ((string.find(value, "iB") == nil) and (string.find(value, "B") ~= nil)) then
ms=(value:gsub("B",""))..' byte'
elseif string.find(value, "K") ~= nil then
ms=(value:gsub("K",""))..' kb'
elseif string.find(value, "M") ~= nil then
ms=(value:gsub("M",""))..' mb'
elseif string.find(value, "G") ~= nil then
ms=(value:gsub("G",""))..' gb'
elseif string.find(value, "T") ~= nil then
ms=(value:gsub("T",""))..' tb'
------------------------------------------------------
else ms=value:gsub(" ","") end
------------------------------------------------------
cs=string.gsub(tostring(ms),"%.",del)
return cs
end -- of function
-- #######################################################################
-- ## change delimiter and thousand separator ############################
-- #######################################################################
function chgDel(value,del)
local ausgang=nil
local ersteZahl=nil
local rest=nil
local outputNumber=nil
-------------------------------------------------
ausgang=string.gsub(value, "(%d*\.*%d+).*", "%1")
ausgang=tonumber(ausgang)
if ((ausgang >= 10000) and (ausgang <= 99999.99)) then
ersteZahl=string.sub(ausgang,1,2)
rest=string.sub(ausgang,3,string.len(ausgang))
-----------------------------------------------------------------
if del=="," then
outputNumber=ersteZahl..'.'..string.gsub(tostring(rest),"%.",",")
else
outputNumber=ersteZahl..','..string.gsub(tostring(rest),"%,",".")
end
-----------------------------------------------------------------
elseif ((ausgang>=1000) and (ausgang <9999.99)) then
ersteZahl=string.sub(ausgang,1,1)
rest=string.sub(ausgang,2,string.len(ausgang))
-----------------------------------------------------------------
if del=="," then
outputNumber=ersteZahl..'.'..string.gsub(tostring(rest),"%.",del)
elseif del=="." then
outputNumber=ersteZahl..','..rest
end
-----------------------------------------------------------------
elseif ausgang<999 then
-----------------------------------------------------------------
if del=="," then
outputNumber=string.gsub(tostring(ausgang),"%.",',')
elseif del=="." then
outputNumber=ausgang
end
-----------------------------------------------------------------
elseif ausgang >=100000 then
ersteZahl=string.sub(ausgang,1,3)
rest=string.sub(ausgang,4,string.len(ausgang))
-----------------------------------------------------------------
if del=="," then
outputNumber=ersteZahl..'.'..string.gsub(tostring(rest),"%.",del)
elseif del=="." then
outputNumber=ersteZahl..','..rest
end
-----------------------------------------------------------------
end
return tostring(outputNumber)
endconky config
# ~/.conkyrc-lionhead-01
#-----Conky settings
background no
no_buffers yes
# out_to_console yes
top_cpu_separate no
# cpu_avg_samples 10
# net_avg_samples 10
# max_port_monitor_connections 10
update_interval 1
total_run_times 0
#-----Text setings
use_xft yes
xftfont Bitstream Vera Sans Mono:bold:size=10
xftalpha 0.8
# uppercase no
override_utf8_locale yes
# format_human_readable no
# short_units
# max_user_text 64
# text_buffer_size 1024
#-----Window settings
own_window yes
own_window_type normal
# own_window_argb_visual no
# own_window_argb_value 0
own_window_transparent yes
own_window_colour black
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class Conky
own_window_title Conky
#----Layout settings
minimum_size 10 10
maximum_width 10
alignment top_left
use_spacer right
gap_x 25
gap_y 50
#-----Graphics settings
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 0
# border_inner_margin 16
border_width 1
double_buffer yes
# max_specials 64
# imlib_cache_size 0
#-----Color settings
default_color white
default_shade_color black
default_outline_color black
#-----LUA
lua_load $HOME/.conky/lua/lionhead-01.lua
#lua_draw_hook_pre
TEXT
${lua conky_lionhead { variable="fs_size", device="/", del="," } }
${lua conky_lionhead { variable="fs_used", device="/", del="," } }
${lua conky_lionhead { variable="fs_size", device="/home" } }
${lua conky_lionhead { variable="fs_used", device="/home" } }Debian Sid (Minted) x86_64/3.8-5, Conky 2.0_pre, Xorg 7.7/1.12.4, GNOME 3.4.2, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, ST9250827AS 250GB
Linux user No.: 483055 | Conky Pitstop
Offline
Heres the config for my new one
conky_system
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type desktop
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 275 1000
maximum_width 275
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment tl
gap_x 15
gap_y 45
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
short_units yes
### LUA Load ###
lua_load /home/luke/Conky/allcombined_2.lua
## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha,draw_type,line_width,outline_color,outline_alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
# draw_type: 1=fill, 2=outline(must specify line_width), 3=outline and fill (must specify line_width, outline_color and outline_alpha)
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
#note for text: justify can be "r" = right, "c" = center, "l" = left
#${lua draw_bg {10,0,0,0,0,0x000000,0.3}}
TEXT
${image /home/luke/Conky/CPU.png -s 150x75 -p 65,5}${lua draw_bg {25,0,0,0,0,0x000000,0.3}}
${goto 5}${font Pseudo APL:Bold:size=14} Core1${goto 90}${cpu cpu1}${font SansMono:Bold:size=11}%${goto 150}Core2${goto 235}${cpu cpu2}${font SansMono:Bold:size=11}%
${goto 5}${font Pseudo APL:Bold:size=14} Core3${goto 90}${cpu cpu3}${font SansMono:Bold:size=11}%${goto 150}Core4${goto 235}${cpu cpu4}${font SansMono:Bold:size=11}%
${goto 5}${font Pseudo APL:Bold:size=14} Core5${goto 90}${cpu cpu5}${font SansMono:Bold:size=11}%${goto 150}Core6${goto 235}${cpu cpu6}${font SansMono:Bold:size=11}%
#${goto 15}${cpubar cpu0 30,245}
${lua gradbar {15,143,"${cpu cpu0}",100,63,2,30,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 20}${font Pseudo APL:Bold:size=12}${top name 1} ${goto 115}${top pid 1} ${goto 185}${top cpu 1}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top name 2} ${goto 115}${top pid 2} ${goto 185}${top cpu 2}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top name 3} ${goto 115}${top pid 3} ${goto 185}${top cpu 3}${font SansMono:Bold:size=11}%
${image /home/luke/Conky/memory.png -s 225x90 -p 30,215}
${goto 5}${font Pseudo APL:Bold:size=14} RAM ${goto 110}${mem}${goto 190}/${memmax}
#${goto 15}${membar 30,245}
${lua gradbar {15,321,"${memperc}",100,63,2,30,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} SWAP ${goto 110}${swap}${goto 190}/${swapmax}
#${goto 15}${swapbar 30,245}
${lua gradbar {15,381,"${swapperc}",100,63,2,30,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 20}${font Pseudo APL:Bold:size=12}${top_mem name 1} ${goto 115}${top_mem pid 1} ${goto 185}${top_mem mem 1}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top_mem name 2} ${goto 115}${top_mem pid 2} ${goto 185}${top_mem mem 2}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top_mem name 3} ${goto 115}${top_mem pid 3} ${goto 185}${top_mem mem 3}${font SansMono:Bold:size=11}%
${image /home/luke/Conky/Storage.png -s 225x90 -p 29,453}
${goto 5}${font Pseudo APL:Bold:size=14} / ${goto 120}${fs_used /}${goto 205}/15G
${lua gradbar {15,555,"${fs_used_perc /}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} /home ${goto 120}${fs_used /home}${goto 205}/37G
${lua gradbar {15,595,"${fs_used_perc /home}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} Storage ${goto 120}${fs_used /media/storage}${goto 205}/${fs_size /media/storage}
${lua gradbar {15,635,"${fs_used_perc /media/storage}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} Music ${goto 120}${fs_used /media/sde6}${goto 205}/${fs_size /media/sde6}
${lua gradbar {15,675,"${fs_used_perc /media/sde6}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} External ${goto 120}${fs_used /media/sde5}${goto 205}/${fs_size /media/sde5}
${lua gradbar {15,715,"${fs_used_perc /media/sde5}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} Videos ${goto 120}${fs_used /media/sdc1}${goto 205}/${fs_size /media/sdc1}
${lua gradbar {15,755,"${fs_used_perc /media/sdc1}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} Software ${goto 120}${fs_used /media/sdb1}${goto 205}/${fs_size /media/sdb1}
${lua gradbar {15,795,"${fs_used_perc /media/sdb1}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${image /home/luke/Conky/temps.png -s 225x90 -p 23,798}
${goto 5}${font Pseudo APL:Bold:size=14} CPU ${goto 225}${platform it87.656 temp 1}F
${lua gradbar {15,893,"${platform it87.656 temp 1}",195,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} Motherboard ${goto 225}${platform it87.656 temp 2}F
${lua gradbar {15,935,"${platform it87.656 temp 2}",200,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} GPU ${goto 225}${nvidia temp}F
${lua gradbar {15,975,"${platform it87.656 temp 2}",200,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}conky_weather
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type normal
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 350 360
maximum_width 350
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment top_middle
gap_x 200
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 6
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0
# Maximum size of user text buffer, i.e. layout below TEXT line in config file
# (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
### LUA Load ###
lua_load /home/luke/Conky/allcombined_2.lua
## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha,draw_type,line_width,outline_color,outline_alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
# draw_type: 1=fill, 2=outline(must specify line_width), 3=outline and fill (must specify line_width, outline_color and outline_alpha)
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
#note for text: justify can be "r" = right, "c" = center, "l" = left
#${lua draw_bg {10,0,0,0,0,0x000000,0.3}}
${lua draw_bg {25,0,0,0,0,0x000000,0.3}}
TEXT
${image /home/luke/Conky/weather.png -s 225x90 -p 75,5}${lua draw_bg {25,0,0,0,0,0x000000,0.3}}
${image /home/luke/Conky/thermometer.png -s 50x50 -p 20,90}
${voffset 7}${goto 70}${font Pseudo APL:Bold:size=20}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F ${voffset -5}
${font Pseudo APL:Bold:size=14}${goto 10}Dawn ${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/curr_cond}${texeci 500 bash $HOME/Accuweather_Conky_USA_Images/acc_usa_images}${image $HOME/Accuweather_Conky_USA_Images/cc.png -p 185,90 -s 140x125}
${goto 10}Dusk ${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${font Pseudo APL:Bold:size=12}${goto 25}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 140}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 260}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/tod_ton}
${font Pseudo APL:Bold:size=11}${goto 90}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 205}${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 320}${execpi 600 sed -n '19p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F
${voffset 5}${font Pseudo APL:Bold:size=11}${goto 90}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 205}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 320}${execpi 600 sed -n '20p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${image $HOME/Accuweather_Conky_USA_Images/7.png -p 10,225 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/12.png -p 128,225 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/17.png -p 246,225 -s 80x67}${voffset -5}
${font Pseudo APL:Bold:size=50}${alignc}${time %I}:${time %M}${time %P}
${voffset -35}${font Pseudo APL:Bold:size=31}${alignc}${time %a} ${time %D}${voffset 35}
${image /home/luke/Conky/network.png -s 225x90 -p 75,405}${image /home/luke/Conky/up.png -s 30x30 -p 20,495}
${goto 70}${font Pseudo APL:Bold:size=16}${upspeed eth0} ${voffset -8}${goto 163}${upspeedgraph 23,165 666666 000066}${voffset 8}
${image /home/luke/Conky/down.png -s 30x30 -p 20,548}
${goto 70}${font Pseudo APL:Bold:size=16}${downspeed eth0} ${voffset -8}${goto 163}${downspeedgraph 23,165 666666 000066}${voffset 8}allcombined_2.lua (by mrpeachy)
--[[ by mrpeachy -
combines background bar and calendar functions
]]
require 'cairo'
require 'imlib2'
function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end
function conky_gradbar(bartab)
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=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--convert to table
local bartab=loadstring("return" .. bartab)()
local bar_startx=bartab[1]
local bar_starty=bartab[2]
local number=bartab[3]
local number=conky_parse(number)
local number_max=bartab[4]
local divisions=bartab[5]
local div_width=bartab[6]
local div_height=bartab[7]
local div_gap=bartab[8]
local bg_col=bartab[9]
local bg_alpha=bartab[10]
local st_col=bartab[11]
local st_alpha=bartab[12]
local mid_col=bartab[13]
local mid_alpha=bartab[14]
local end_col=bartab[15]
local end_alpha=bartab[16]
--color conversion
local br,bg,bb,ba=rgb_to_r_g_b({bg_col,bg_alpha})
local sr,sg,sb,sa=rgb_to_r_g_b({st_col,st_alpha})
local mr,mg,mb,ma=rgb_to_r_g_b({mid_col,mid_alpha})
local er,eg,eb,ea=rgb_to_r_g_b({end_col,end_alpha})
if number==nil then number=0 end
local number_divs=(number/number_max)*divisions
cairo_set_line_width (cr,div_width)
--gradient calculations
for i=1,divisions do
if i<(divisions/2) and i<=number_divs then
colr=((mr-sr)*(i/(divisions/2)))+sr
colg=((mg-sg)*(i/(divisions/2)))+sg
colb=((mb-sb)*(i/(divisions/2)))+sb
cola=((ma-sa)*(i/(divisions/2)))+sa
elseif i>=(divisions/2) and i<=number_divs then
colr=((er-mr)*((i-(divisions/2))/(divisions/2)))+mr
colg=((eg-mg)*((i-(divisions/2))/(divisions/2)))+mg
colb=((eb-mb)*((i-(divisions/2))/(divisions/2)))+mb
cola=((ea-ma)*((i-(divisions/2))/(divisions/2)))+ma
else
colr=br
colg=bg
colb=bb
cola=ba
end
cairo_set_source_rgba (cr,colr,colg,colb,cola)
cairo_move_to (cr,bar_startx+((div_width+div_gap)*i-1),bar_starty)
cairo_rel_line_to (cr,0,div_height)
cairo_stroke (cr)
end
--#########################################################################################################
end-- if updates>5
bartab=nil
colr=nil
colg=nil
colb=nil
cola=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function
function conky_draw_bg(bgtab)
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)
--#########################################################################################################
--convert to table
local bgtab=loadstring("return" .. bgtab)()
local r=bgtab[1]
local x=bgtab[2]
local y=bgtab[3]
local w=bgtab[4]
local h=bgtab[5]
local color=bgtab[6]
local alpha=bgtab[7]
if w==0 then
w=tonumber(conky_window.width)
end
if h==0 then
h=tonumber(conky_window.height)
end
cairo_set_source_rgba (cr,rgb_to_r_g_b({color,alpha}))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
--#########################################################################################################
bgtab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function
function conky_luacal(caltab)
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 caltab=loadstring("return" .. caltab)()
local cal_x=caltab[1]
local cal_y=caltab[2]
local tfont=caltab[3]
local tfontsize=caltab[4]
local tc=caltab[5]
local ta=caltab[6]
local bfont=caltab[7]
local bfontsize=caltab[8]
local bc=caltab[9]
local ba=caltab[10]
local hfont=caltab[11]
local hfontsize=caltab[12]
local hc=caltab[13]
local ha=caltab[14]
local spacer=caltab[15]
local gaph=caltab[16]
local gapt=caltab[17]
local gapl=caltab[18]
local sday=caltab[19]
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b({tc,ta})
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b({bc,ba})
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b({hc,ha})
--###################################################
--calendar 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 day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
if i<=start_day then
dnum[i]=" "
else
dn=i-start_day
if dn=="nil" then dn=0 end
if dn<=9 then dn=(spacer .. dn) end
if i>x then dn="" end
dnum[i]=dn
dnumh[i]=dn
if dn==(spacer .. today) or dn==today then
dnum[i]=""
end
if dn==(spacer .. today) or dn==today then
dnumh[i]=dn
place=i
else dnumh[i]=" "
end
end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
if tonumber(sday)==0 then
dys={"SU","MO","TU","WE","TH","FR","SA"}
else
dys={"MO","TU","WE","TH","FR","SA","SU"}
end
--draw calendar titles
for i=1,7 do
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnum[i])
cairo_stroke (cr)
end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnumh[i])
cairo_stroke (cr)
end
end
--#########################################################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function
function conky_luaimage(imtab)
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 imtab=loadstring("return" .. imtab)()
local im_x=imtab[1]
local im_y=imtab[2]
local im_w=imtab[3]
local im_h=imtab[4]
local file=imtab[5]
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(im_w)==0 then
width=imlib_image_get_width()
else
width=tonumber(im_w)
end
if tonumber(im_h)==0 then
height=imlib_image_get_height()
else
height=tonumber(im_h)
end
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(im_x, im_y)
imlib_free_image()
show=nil
--#########################################################################################################
imtab=nil
height=nil
width=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function
function conky_tex_bg(textab)
local textab=loadstring("return" .. textab)()
local tex_file=textab[6]
local surface = cairo_image_surface_create_from_png(tostring(tex_file))
local cw,ch = conky_window.width, conky_window.height
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, cw,ch)
local cr=cairo_create(cs)
--#########################################################################################################
--convert to table
local r=textab[1]
local x=textab[2]
local y=textab[3]
local w=textab[4]
local h=textab[5]
if w=="0" then
w=cw
end
if h=="0" then
h=ch
end
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_clip (cr)
cairo_new_path (cr);
--image part
cairo_set_source_surface (cr, surface, 0, 0)
cairo_paint (cr)
--#########################################################################################################
textab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cairo_surface_destroy (surface)
cr=nil
return ""
end-- end main function
function conky_luatext(txttab)--x,y,c,a,f,fs,txt,j ##################################################
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)
--#########################################################################################################
--convert to table
local txttab=loadstring("return" .. txttab)()
local x=txttab[1]
local y=txttab[2]
local c=txttab[3]
local a=txttab[4]
local f=txttab[5]
local fs=txttab[6]
local j=txttab[7]
local txt=txttab[8]
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fs)
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,txt,extents)
local wx=extents.x_advance
cairo_set_source_rgba (cr,rgb_to_r_g_b({c,a}))
if j=="l" then
cairo_move_to (cr,x,y)
elseif j=="c" then
cairo_move_to (cr,x-(wx/2),y)
elseif j=="r" then
cairo_move_to (cr,x-wx,y)
end
cairo_show_text (cr,txt)
cairo_stroke (cr)
--#########################################################################################################
txttab=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cr=nil
return ""
end-- end main functionYou can get all the images here (includes my custom images for Teo's weather script)
and Teo's Accuweather script can be found here
Conky | SMXI HowTo | Super Grub | VastOnes GMB HowTo | VSIDO
Offline
Hello guys!
Please can someone help me with this script.${color 33001A}${font StyleBats:size=35}G${font} Lacie${color FFFFFF} ${if_mounted /media/nili/Lacie Disk} ${color 1C1C1C}Size: ${alignr}${fs_size /media/nili/Lacie Disk} ${color 33001A}${fs_bar 3,83 /media/nili/Lacie Disk}${color} ${color 1C1C1C}Free: ${alignc}${fs_free /media/nili/Lacie Disk} ${alignr}${color 33001A}(${fs_free_perc /media/nili/Lacie Disk}%)${color} ${color 1C1C1C}Used: ${alignc}${fs_used /media/nili/Lacie Disk} ${alignr}${color 33001A}(${fs_used_perc /media/nili/Lacie Disk}%)${color} ${else}${color 1C1C1C}Disk: Not mounted${color} ${endif}The problem is here, my external disk Lacie Disk has this space between lacie and disk which creates problem to display info when the disk is mounted. "To remember, the disk Lacie is mounted, but show not mounted because of the Space on the disk name".
http://img845.imageshack.us/img845/3973 … 303201.png
while on Disk Toshiba plus Seagate with the same code work OK, because Toshiba and Seagate doesn't have space.
So how to fix the problem of space on the code above?Any suggestion?
Thank you very much!
Linux don't like space in name...
Try change Lacie Disk by Lacie* in your code
If that don't work, you can also rename your Lacie Disk as Lacie_Disk (or other name)
Last edited by chepioq (2013-03-22 08:30:35)
Offline
hey there!
I finaly managed to realise that some things can be done with conky while other can`t. 
but know, since i read so much about displaying webcam pictures i wanted to ask if there is a posiblity to display the pictures of this feed in conky? i think resizing it and getteing it to be shown whereever i want it to be should be no problem, but how do i automate the downloading of it?
UPDATE:
#! /bin/bash
wget -m --accept=jpg http://apod.nasa.gov/apod/astropix.html -O ~/images/space.jpg &&
convert ~/images/space.jpg -scale 123x123 ~/images/space_conky.jpg
endThis wont work, is it thought to simple?
thanks in advance, -naik
Last edited by Naik (2013-03-22 22:12:47)
if{ $doingitright=true}:
$sucess != 0;
Offline
Linux don't like space in name...
Try change Lacie Disk by Lacie* in your code
If that don't work, you can also rename your Lacie Disk as Lacie_Disk (or other name)
Hi chepioq,
Thank you for the message,
I wasn't aware at first about space so i named the disk "Lacie Disk" now i'm too late to change it because some applications access the driver with this letter. I know if i short the name to Lacie work pretty good because it working on other external that i have like Toshiba or Seagate.
Also i'm pretty sure will work with Lacie_Disk, Lacie-Disk or Lacie^Disk too.
All what i need is how can i benefit without making these changes in letter name.
I have some time to seek a solution on the Internet, but it is impossible apparently. Thank you again!
Offline
Hi chepioq,
Thank you for the message,
I wasn't aware at first about space so i named the disk "Lacie Disk" now i'm too late to change it because some applications access the driver with this letter. I know if i short the name to Lacie work pretty good because it working on other external that i have like Toshiba or Seagate.Also i'm pretty sure will work with Lacie_Disk, Lacie-Disk or Lacie^Disk too.
All what i need is how can i benefit without making these changes in letter name.I have some time to seek a solution on the Internet, but it is impossible apparently. Thank you again!
I have an other soluce, but I don't know if that work with conky.
Instead of
${fs_used /media/nili/Lacie Disk}, try with
${fs_used /media/nili/"Lacie Disk"}Offline
Or perhaps putting a \ before the space works? It does in bash/zsh scripting. Dunno about conky/lua - I don't use it.
Blimey, should not have said that in a thread dedicated to conky and reaching 200 pages... 
bootinfoscript - emacs primer - I ♥ #!
Offline
Or perhaps putting a \ before the space works? It does in bash/zsh scripting. Dunno about conky/lua - I don't use it.
Blimey, should not have said that in a thread dedicated to conky and reaching 200 pages...
That just "might" do it. It works for fonts that have a dash in it.
${font digital-7:size=15} and the top is cut off.
${font digital\-7:size=15} and it works just fine.
Last edited by Sector11 (2013-03-22 18:14:00)
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.