SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#6701 2013-11-22 03:35:05

liquibyte
#! Member
From: N42°34'30.2664",W71°59'
Registered: 2013-11-04
Posts: 67
Website

Re: Conky v1.9 Thread

sjv047 wrote:

Sector11,

If I understand your post, I posted the 1st part of mrpeachy's before the TEXT part, then posted the remainder under the section that I was hoping to "code"... the removable drives area.

Once done, it doesn't show anything beyond the "TOTAL PARTITIONS MOUNTED:, then only the same code that I posted in the file.

Am I missing something with the code? I've googled the script, but can't find anything beyond the same script that I posted in my config file.

In your .conkyrc

lua_load ~/path/to/script/mounted.lua
TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

Save as mounted.lua

--[[partitions for conky by mrpeachy

##instructions
##load script
lua_load ~/lua/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint

TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

]]

conky_start=1
function conky_get_mounted_data(interval)
local updates=tonumber(conky_parse("${updates}"))
timer=(updates % interval)
if timer==0 or conky_start==1 then
fsys={}
size={}
used={}
avail={}
uperc={}
mount={}
local file = io.popen("df -h")
	for line in file:lines() do
		if string.find(line,"/dev/")~=nil then
		local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
		table.insert(fsys,fs)
		local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(size,sz)
		local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(used,us)
		local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(avail,av)
		local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(uperc,up)
		local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
		table.insert(mount,mn)
		end
	end
file:close()
conky_start=nil
end--timed section
return ""
end

function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
d=tostring(d)
n=tonumber(n)
c=tonumber(c) or 0
if d=="total" then
data=#fsys or 1
elseif d=="fsys" then
data=fsys[n] or ""
	if c~=0 then
	data=string.sub(data,1,c) or ""
	end
elseif d=="size" then
data=size[n] or ""
elseif d=="used" then
data=used[n] or ""
elseif d=="free" then
data=avail[n] or ""
elseif d=="use%" then
data=uperc[n] or ""
elseif d=="mount" then
data=mount[n] or ""
	if c~=0 then
	data=string.sub(data,1,c) or ""
	end
else
data="check data type"
end
return data
end--end main function

I just tested it and it works nicely.

Offline

Be excellent to each other!

#6702 2013-11-22 04:11:56

sjv047
Member
Registered: 2013-11-20
Posts: 23

Re: Conky v1.9 Thread

Liquibyte,

Please excuse my ignorance, but I'm pretty confused now... In your first set of quotes, am I adding the 1st line only to the top section of my conky, then add the remainder (of your first quoted section) in the area of the file I want it to show up i when running?

Where does the 2nd set of "script" come into play? Wherever I add that part, then I save this file as 'mounted.lua'? Once I do that, what do I run? conky or mounted.lua?

And here I was beginning to think I was finally figuring out the "old" language of conky, and here you go introducing a new "lua" scripting language... sheesh!! yikes

Offline

#6703 2013-11-22 05:01:22

liquibyte
#! Member
From: N42°34'30.2664",W71°59'
Registered: 2013-11-04
Posts: 67
Website

Re: Conky v1.9 Thread

sjv047 wrote:

Liquibyte,

Please excuse my ignorance, but I'm pretty confused now... In your first set of quotes, am I adding the 1st line only to the top section of my conky, then add the remainder (of your first quoted section) in the area of the file I want it to show up i when running?

Where does the 2nd set of "script" come into play? Wherever I add that part, then I save this file as 'mounted.lua'? Once I do that, what do I run? conky or mounted.lua?

And here I was beginning to think I was finally figuring out the "old" language of conky, and here you go introducing a new "lua" scripting language... sheesh!! yikes

You save the first part in your .conkyrc file.  Put all lua calls above "TEXT" always (this is for conky versions below 1.9 and below.  You can find out your version by typing conky -v in a terminal).  The second part gets put in a seperate file and saved as mounted.lua wherever you put your conky scripts.  Say you wanted to have a folder in your home folder named conky and inside that folder you have another one named scripts.  Put the mounted lua in the /home/sjv047/conky/scripts folder and change the line above TEXT to lua_load ~/conky/scripts/mounted.lua as this calls the script in that path.  Your .conkyrc usually just goes in your home folder.  You'll then just run conky as usual and it should show up.

The way we do it for testing, and I'm making assumptions about how others do it here, is to make a seperate folder with a .conkyrc and scripts that we want to try out.  For instance, I made a folder called mounted and made a .conkyrc with the following and put it in the newly created mounted folder:

#########conky settings#########
own_window true
own_window_transparent true
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
own_window_type override
own_window_argb_visual true
update_interval 1.0
draw_shades false
double_buffer true
minimum_size 400 400
maximum_width 400
alignment top_right
gap_X 0
gap_y 0

#########lua script(s)#########
lua_load ~/mounted/mounted.lua

#########stuff that gets drawn#########
TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

Then I made a seperate file with the following and saved it as mounted.lua in the same folder:

--[[partitions for conky by mrpeachy

##instructions
##load script
lua_load ~/lua/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint

TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

#########everything above this is a comment#########]]

conky_start=1
function conky_get_mounted_data(interval)
local updates=tonumber(conky_parse("${updates}"))
timer=(updates % interval)
if timer==0 or conky_start==1 then
fsys={}
size={}
used={}
avail={}
uperc={}
mount={}
local file = io.popen("df -h")
	for line in file:lines() do
		if string.find(line,"/dev/")~=nil then
		local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
		table.insert(fsys,fs)
		local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(size,sz)
		local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(used,us)
		local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(avail,av)
		local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(uperc,up)
		local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
		table.insert(mount,mn)
		end
	end
file:close()
conky_start=nil
end--timed section
return ""
end

function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
d=tostring(d)
n=tonumber(n)
c=tonumber(c) or 0
if d=="total" then
data=#fsys or 1
elseif d=="fsys" then
data=fsys[n] or ""
	if c~=0 then
	data=string.sub(data,1,c) or ""
	end
elseif d=="size" then
data=size[n] or ""
elseif d=="used" then
data=used[n] or ""
elseif d=="free" then
data=avail[n] or ""
elseif d=="use%" then
data=uperc[n] or ""
elseif d=="mount" then
data=mount[n] or ""
	if c~=0 then
	data=string.sub(data,1,c) or ""
	end
else
data="check data type"
end
return data
end --#########end main function (this is a comment too)#########

Then I opened a terminal and I navigated to that folder "cd ~/mounted" and ran "conky -c ~/mounted/.conkyrc"

Did that make more sense?

Last edited by liquibyte (2013-11-22 05:35:59)

Offline

#6704 2013-11-22 09:43:18

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

liquibyte wrote:
dk75 wrote:

Your Conky compiled without Cairo support...
As I remember I had that problem for few months before, then some git commit make it possible.
Will check what's needed to compile new git Conky under SID and post dependencies, later...

Thanks for the info.  I actually ended up getting things to complile nicely except for the lua branch.  Still looking at that one.  Something about too few arguments in a library call.  Sector11 gave me a proper v2 config and I mangage to figure out that the lua calls fit inside of the config bit.  My problem was a trailing ',' for the lua_draw_hook_pre line.  Apparenly it looks at the whole config file as kind of one statement.  I didn't really dig around in the source too much.  As for the config flags, I turned on everything except IBM and mpd I believe.  I'll give it a try again and see if I missed something obvious.  EDIT.  Rebuilt with all flags except bmpx and old config support and still getting these errors.  Something isn't playing nice.

Did you installed it?
I've compiled it with /opt, /opt/lib, and /opt/share as installation path and without make install had same error (cairo, imlib2 and rsvg need it's tolua conky compiled libraries in conky installation library path - conky with LUA is compiled as shared, not static).
After make install it worked without any problem.

PS: I have conky 1.9 in /usr, 2.0_pre from 2012 in /usr/local and now 2.0_pre from yesterday in /opt - all work flawless.
PS2: will make debian package to replace my old 2.0_pre in /usr/local - this have RSVG support :yay:
PS3: pango please :pray:

PS4: uninstalled

:~$ ~/.local/src/conky/build/src/conky -c ~/.conky/.conkyrc-liquibyte01
conky: Syntax error (/home/kitsune/.conky/.conkyrc-liquibyte01:3: unexpected symbol near '#') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: llua_load: /home/kitsune/.conky/lua/liquibyte_superclock.lua:10: module 'cairo' not found:
	no field package.preload['cairo']
	no file './cairo.lua'
	no file '/usr/local/share/lua/5.1/cairo.lua'
	no file '/usr/local/share/lua/5.1/cairo/init.lua'
	no file '/usr/local/lib/lua/5.1/cairo.lua'
	no file '/usr/local/lib/lua/5.1/cairo/init.lua'
	no file '/usr/share/lua/5.1/cairo.lua'
	no file '/usr/share/lua/5.1/cairo/init.lua'
	no file '/opt/lib/conky/libcairo.so'
	no file './cairo.so'
	no file '/usr/local/lib/lua/5.1/cairo.so'
	no file '/usr/lib/x86_64-linux-gnu/lua/5.1/cairo.so'
	no file '/usr/lib/lua/5.1/cairo.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
conky: desktop window (82) is root window
conky: window type - normal
conky: drawing to created window (0x5000002)
conky: drawing to double buffer
conky: llua_do_call: function conky_draw_superclock execution failed: attempt to call a nil value
conky: llua_do_call: function conky_draw_superclock execution failed: attempt to call a nil value
conky: llua_do_call: function conky_draw_superclock execution failed: attempt to call a nil value
conky: llua_do_call: function conky_draw_superclock execution failed: attempt to call a nil value
conky: llua_do_call: function conky_draw_superclock execution failed: attempt to call a nil value
conky: llua_do_call: function conky_draw_superclock execution failed: attempt to call a nil value
conky: llua_do_call: function conky_draw_superclock execution failed: attempt to call a nil value
conky: llua_do_call: function conky_draw_superclock execution failed: attempt to call a nil value
^Cconky: received SIGINT or SIGTERM to terminate. bye!

installed

:~$ /opt/bin/conky -c ~/.conky/.conkyrc-liquibyte01
conky: Syntax error (/home/kitsune/.conky/.conkyrc-liquibyte01:3: unexpected symbol near '#') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: desktop window (82) is root window
conky: window type - normal
conky: drawing to created window (0x5000002)
conky: drawing to double buffer
conky: llua_do_call: function conky_draw_superclock execution failed: /home/kitsune/.conky/lua/liquibyte_superclock.lua:140: attempt to perform arithmetic on local 'hx' (a nil value)
^Cconky: received SIGINT or SIGTERM to terminate. bye!

Last edited by dk75 (2013-11-22 09:47:44)


Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

#6705 2013-11-22 09:45:36

BlackmesaExperimental
New Member
Registered: 2013-11-22
Posts: 1

Re: Conky v1.9 Thread

Sorry to interrupt, as it were, but could I request some help?
I'm a complete newbie to #! and Linux as a whole (shocking, I know. What noob would ever pick #!?).
Anyway, I'm having difficulties properly installing this prebuilt Conky. When I dump the two .conkyrc files into my main directory along with the folder that came with it, I get this:
Screenshot_221113_17_35_45.jpg

Offline

#6706 2013-11-22 10:29:30

ragamatrix
#! Junkie
From: Earth
Registered: 2012-12-05
Posts: 286

Re: Conky v1.9 Thread

Sector11 wrote:
ragamatrix wrote:

First test with weather-forecast on board...
I'm working on it... quite slowly...

Looking good ... but yea, that "big" circle takes away from it

Me, in the small three circles, I'd GIMP them with the one on the left to cover the centre and right circles, to make them look like they are facing you.
http://s20.postimg.org/3qk87s8wd/meteockpit.png
subir fotos gratis

left: Barometric Pressure
centre:  Flt. Time (${uptime_short})
right - the Wind

But that's me.  big_smile

Thanks Sector11 !
Following your advices things look like better.
meteotest2.jpg
Hardworking to place elements and difficulties to find good color for dates and températures fonts... But the "jpdipsy's weather convert" script helps good to build elements, rotate, and plays with opacitys  on the wallpaper. (for the watch it's the same effect of the draw_bg.lua)

Last edited by ragamatrix (2013-11-22 10:48:35)

Offline

#6707 2013-11-22 10:58:15

ragamatrix
#! Junkie
From: Earth
Registered: 2012-12-05
Posts: 286

Re: Conky v1.9 Thread

BlackmesaExperimental wrote:

Sorry to interrupt, as it were, but could I request some help?
I'm a complete newbie to #! and Linux as a whole (shocking, I know. What noob would ever pick #!?).
Anyway, I'm having difficulties properly installing this prebuilt Conky. When I dump the two .conkyrc files into my main directory along with the folder that came with it, I get this:
http://s23.postimg.org/3ph65bsuv/Screenshot_221113_17_35_45.jpg

Hello,
You may-be have some settings must be configured by your own location... (sorry for my English) The paths to the files, weather settings of your city, things in conkyrc to modify in your language, and your hardware settings might be different (how many cpu's you have...) I think you'll have a little work to do big_smile
Be brave ! Continue to discover conky and you'll soon be an addict one !

Offline

#6708 2013-11-22 12:10:11

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: Conky v1.9 Thread

@liquidbyte, sjv04,...

the lua sollution works great here!
(had a clock, mesure-rings, mocp-watching, and mounted-data in the same script)
acij6ybU.jpg

BUT (without offence):
previously i did it the native conky way and looks much more pretty:
ablo2Djr.jpg
lightblue bars are the filling the grey donts mark diskio.
I don`t know about the resources, but i can`t imagine it to be more hungry on them.

${voffset 15}${color CAD3DC}${font Inconsolata:size=9}${goto 13}RAM: ${goto 53}${if_match $memperc>90}${color 665858}${else}${color 3E6B6B}${endif}${goto 53}${membar 10,107}${goto 62}${memgraph 9,95 000000 74868B}${goto 53}${color 000000}${fs_bar 10,107 /4}${color}${goto 167}$memperc%
${voffset 7}${goto 13}${font Inconsolata:size=7}${color CAD3DC}SYS:${goto 53}${color 3E6B6B}${fs_bar 6,106 /} ${goto 53}${color 000000}${fs_bar 6,106 /4}${color}${font Inconsolata:size=8}${goto 167}${fs_used_perc /}%${font Inconsolata:size=7}${color CAD3DC}${goto 62}${diskiograph  /dev/sda1 4,95 000000 74868B -l}${voffset 3}
${goto 13}${font Inconsolata:size=7}${color CAD3DC}SPC:${goto 53}${color 3E6B6B}${fs_bar 6,106 /space} ${goto 53}${color 000000}${fs_bar 6,106 /4}${color}${font Inconsolata:size=8}${goto 167}${fs_used_perc /space}%${font Inconsolata:size=7}${color CAD3DC}${goto 62}${diskiograph  /dev/sda3 4,95 000000 74868B -l}${voffset 3}
${goto 13}${font Inconsolata:size=7}${color CAD3DC}TST:${goto 53}${color 3E6B6B}${fs_bar 6,106 /test} ${goto 53}${color 000000}${fs_bar 6,106 /4}${color}${font Inconsolata:size=8}${goto 167}${fs_used_perc /test}%${font Inconsolata:size=7}${color CAD3DC}${goto 62}${diskiograph  /dev/sda2 4,95 000000 74868B -l}${voffset 3}
${if_mounted /media/naik/TOSHY}${goto 13}${font Inconsolata:size=7}${color CAD3DC}TOSHY:${goto 53}${color 3E6B6B}${fs_bar 6,106 /media/naik/TOSHY} ${goto 53}${color 000000}${fs_bar 6,106 /4}${color}${font Inconsolata:size=8}${goto 167}${fs_used_perc /media/naik/TOSHY}%${font Inconsolata:size=7}${color CAD3DC}${goto 62}${diskiograph  /dev/sdb 4,95 000000 74868B -l}${voffset 3}${endif}
${if_mounted /media/naik/0094-5892}${goto 13}${font Inconsolata:size=7}${color CAD3DC}HANDY:${color 3E6B6B}${goto 53}${fs_bar 6,106 /media/naik/0094-5892} ${goto 53}${color 000000}${fs_bar 6,106 /4}${color}${font Inconsolata:size=7}${goto 167}${fs_used_perc /media/naik/0094-5892}%${font Inconsolata:size=7}${color CAD3DC}${goto 62}${diskiograph  /media/naik/0094-5892 4,95 000000 74868B -l}${voffset 3}${endif}

I think it is harder to get all the right values and if you are continuosly formatting your usb-drives (like i did some time ago) it is a pain in the a... neck! but maybe i am just a little retro  cool

greetz -naik


*kaum macht man es richtig, funktioniert es sofort*

Offline

#6709 2013-11-22 12:36:07

liquibyte
#! Member
From: N42°34'30.2664",W71°59'
Registered: 2013-11-04
Posts: 67
Website

Re: Conky v1.9 Thread

dk75 wrote:

Did you installed it?
I've compiled it with /opt, /opt/lib, and /opt/share as installation path and without make install had same error (cairo, imlib2 and rsvg need it's tolua conky compiled libraries in conky installation library path - conky with LUA is compiled as shared, not static).
After make install it worked without any problem.

I never thought about having to actually install it.  I'll give that a try today after I change the paths and let you know how it goes.  The stuff I work with daily has no deps and by nature can't.  Sometimes I forget that things can be less than simple.

Naik wrote:

@liquidbyte, sjv04,...

the lua sollution works great here!
(had a clock, mesure-rings, mocp-watching, and mounted-data in the same script)
acij6ybU.jpg

BUT (without offence):
previously i did it the native conky way and looks much more pretty:
ablo2Djr.jpg
lightblue bars are the filling the grey donts mark diskio.
I don`t know about the resources, but i can`t imagine it to be more hungry on them.

I just tested it for the fact that it works and wasn't worried about the bling factor.  I've got a few issues to work out with lua scripts and conky and once I do I'll finish the clock I've been working on and start some new meters.  Things should go from there exponentially.

Offline

#6710 2013-11-22 15:08:13

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

liquibyte wrote:

Man, doing fonts is tedius.  I've got a preliminary version of a digital-7 type font done http://liquibyte.org/font/digit.ttf.  I didn't do everything as far as alignment and hinting so it's just a rough idea at the moment.  I also didn't do the lower case letters yet so only the caps will show up.  I did try it out and it's a bit rough around the edges but I think it's not too bad for my first font ever.  I'll keep working on it over time until it's complete.  I don't think it should be too hard to make it into a truncated utf8 version.

Digital-7 didn't have a spacing problem... it was cut in half missing the top half.

2013_11_22_11_52_23_423x1024_Sector11.jpg

And doesn't work in conky unless one adds a \ in the name before the -

TEXT


		${font Digital-7:bold:size=14}${time %T %a. %d %b. %Y}${font}


		${font Digital\-7:bold:size=14}${time %T %a. %d %b. %Y}${font}

It simply defers to the default font: 2013_11_22_11_58_42_263x107_Sector11.jpg

I was going to try yours but I have a digit.ttf font - and I know a simple remane doesn't work (tried that a couple of years ago).

Maybe: digital_liquibyte.ttf would be good

Do appreciate what you're doing though.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6711 2013-11-22 15:55:25

sjv047
Member
Registered: 2013-11-20
Posts: 23

Re: Conky v1.9 Thread

Liquibyte,

First off... YES, that was much better, and I did what you stated (I think...)
But when I run conky, I don't see anything that appears after I plug any removable drive into the machine. what DOES appear is a new header (of sorts) titled: TOTAL PARTITIONS MOUNTED: (see screenshot) Conky (removable drive area)

I have also posted my mounted and conky files to show what I have/posted as well.

Still not getting this working, and am hoping that its a minor issue in the "code"... We'll see.

Thanks again Liquibyte and others for all your help so far!!

Conky

################################
#       Conky Settings         #
################################
update_interval 1
total_run_times 0
cpu_avg_samples 2
net_avg_samples 2

imlib_cache_size 0
double_buffer yes
no_buffers yes

format_human_readable

################################
#        Text Settings         #
################################
use_xft true
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048
uppercase no
override_utf8_locale true

################################
#      Windows Settings        #
################################
own_window_class Conky
own_window true
own_window_transparent true
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_type normal

alignment top_right
gap_x 12
gap_y 2
minimum_size 182 0
maximum_width 182

default_bar_size 85 5

################################
#      Graphic Settings        #
################################
draw_shades false
draw_outline false
draw_borders false
stippled_borders 0
border_margin 5
border_width 1
default_color white
own_window_colour white
own_window_argb_visual true
use_spacer none

#########lua script(s)#########
lua_load ~/home/steve/mounted.lua

TEXT
${alignc 10}${font Trebuchet MS:size=14}${time %H%M}, ${time %y%m%d}${font}
########## System Information ##########
${color Blue}SYSTEM INFORMATION ${color orange}${hr 2}$color
#
Host: ${alignr}${nodename}
User: ${alignr}${user_names}
Kernel:  ${alignr}${kernel}
Uptime: ${alignr}${uptime}
MAC Address: ${alignr}${execi 99999 cat /sys/class/net/eth0/address }
CPU Temp:${alignr}${if_match ${hwmon 0 tempf 1} <= 149}${color green}${hwmon 0 tempf 1}${color}${endif}${if_match ${hwmon 0 tempf 1} >=150}${color red}${hwmon 0 tempf 1}${color}${endif} °F / ${if_match ${hwmon 0 temp 1} <=64}${color green}${hwmon 0 temp 1}${color}${endif}${if_match ${hwmon 0 temp 1} >=65}${color red}${hwmon 0 temp 1}${color}${endif}°C
${stippled_hr 1}
#
CPU: ${alignr}${cpu cpu0}% ${if_match ${cpu cpu0} <= 19}${color green}${cpubar 10,100 cpu0}${color}${endif}${if_match ${cpu cpu0} >=20}${if_match ${cpu cpu0} <=49}${color yellow}${cpubar 10,100 cpu0}${color}${endif}${endif}${if_match ${cpu cpu0} >=50}${if_match ${cpu cpu0} <=74}${color orange}${cpubar 10,100 cpu0}${color}${endif}${endif}${if_match ${cpu cpu0} >= 75}${if_match ${cpu cpu0} <=100}${color red}${cpubar 10,100 cpu0}${color}${endif}${endif}
${alignr}${freq_g 0}GHz
#
Power: ${alignr}${battery_short} ${if_match ${battery_percent BAT0} <= 10}${color red}${battery_bar 10,100 BAT0}${color}${endif}${if_match ${battery_percent BAT0} >= 11}${if_match ${battery_percent BAT0} <=49}${color orange}${battery_bar 10,100 BAT0}${color}${endif}${endif}${if_match ${battery_percent BAT0} >= 50}${if_match ${battery_percent BAT0} <=79}${color yellow}${battery_bar 10,100 BAT0}${color}${endif}${endif}${if_match ${battery_percent BAT0} >= 80}${if_match ${battery_percent BAT0} <=100}${color green}${battery_bar 10,100 BAT0}${color}${endif}${endif}
${alignr}${battery_time}
#
Memory: ${alignr}${memperc}% ${if_match ${memperc} <= 24}${color green}${membar 10,100}${color}${endif}${if_match ${memperc} >= 25}${if_match ${memperc} <=49}${color yellow}${membar 10,100}${color}${endif}${endif}${if_match ${memperc} >= 50}${if_match ${memperc} <=74}${color orange}${membar 10,100}${color}${endif}${endif}${if_match ${memperc} >= 80}${if_match ${memperc} <=100}${color red}${membar 10,100}${color}${endif}${endif}
${alignr}${mem} / ${memmax}

${color Blue}DISK(S) INFORMATION ${color orange}${hr 2}$color

########## HDD ##########
${font sans-serif:italic:size=8} ${alignc} - HDD - ${font sans-serif:normal:size=8}
Disk I/O: ${alignr}${diskio}
Processes: ${alignr}$processes / $running_processes
File System: ${alignr}${fs_free /} / ${fs_size /}
Temp:${alignr}${if_match ${exec hddtemp /dev/sda -n --unit=F} <= 149}${color green}${exec hddtemp /dev/sda -n --unit=F}${color}${endif}${if_match ${exec hddtemp /dev/sda -n --unit=F} >=150}${color red}${exec hddtemp /dev/sda -n --unit=F}${color}${endif} °F / ${if_match ${exec hddtemp /dev/sda -n --unit=C} <=64}${color green}${exec hddtemp /dev/sda -n --unit=C}${color}${endif}${if_match ${exec hddtemp /dev/sda -n --unit=C} >=65}${color red}${exec hddtemp /dev/sda -n --unit=C}${color}${endif}°C
########## REMOVABLE DRIVES ##########
${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}
########## NETWORK INFORMATION ##########
${color Blue}NETWORK INFORMATION${color orange}${hr 2}$color

Gateway IP:${alignr}${gw_ip}
DNS:${alignr}${nameserver}
${stippled_hr 1}
#
########## WIFI CONNECTION INFO ##########
${if_existing /proc/net/route wlan0} ${font sans-serif:italic:size=8}$alignc WiFi Connected - ${wireless_essid wlan0}
${font sans-serif:normal:size=8}
Signal strength: ${alignr}${if_match ${wireless_link_qual wlan0} <= 10}${color red}${wireless_link_qual wlan0}%${color}${endif}${if_match ${wireless_link_qual wlan0} >= 11}${if_match ${wireless_link_qual wlan0} <=49}${color orange}${wireless_link_qual wlan0}%${color}${endif}${endif}${if_match ${wireless_link_qual wlan0} >=50}${if_match ${wireless_link_qual wlan0} <=74}${color yellow}${wireless_link_qual wlan0}%${color}${endif}${endif}${if_match ${wireless_link_qual wlan0} >= 75}${if_match ${wireless_link_qual wlan0} <=100}${color green}${wireless_link_qual wlan0}%${color}${endif}${endif}
IP address: $alignr ${addr wlan0}
${voffset 4}${font Poky:size=13}${font}${voffset -8}Public IP: ${alignr}${execi 3600 wget -q -O /dev/stdout http://checkip.dyndns.org/ | cut -d : -f 2- | cut -d \< -f -1}
Speed: $alignr ${wireless_bitrate wlan0}
Down: ${downspeed wlan0}/s ${alignr}Up: ${upspeed wlan0}/s
Total: ${totaldown wlan0} ${alignr}Total: ${totalup wlan0}
${endif}
########## LAN CONNECTION INFO ##########
${if_existing /proc/net/route eth0} ${font sans-serif:italic:size=8} $alignc Wired (LAN) - Connected
${font sans-serif:normal:size=8}
IP address: $alignr ${addr eth0}
Down: ${downspeed eth0}/s ${alignr}Up: ${upspeed eth0}/s
Total: ${totaldown eth0} ${alignr}Total: {totalup eth0}
${endif}

mounted.lua

--[[partitions for conky by mrpeachy

##instructions
##load script
lua_load ~/lua/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint

TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

#########everything above this is a comment#########]]

conky_start=1
function conky_get_mounted_data(interval)
local updates=tonumber(conky_parse("${updates}"))
timer=(updates % interval)
if timer==0 or conky_start==1 then
fsys={}
size={}
used={}
avail={}
uperc={}
mount={}
local file = io.popen("df -h")
	for line in file:lines() do
		if string.find(line,"/dev/")~=nil then
		local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
		table.insert(fsys,fs)
		local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(size,sz)
		local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(used,us)
		local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(avail,av)
		local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(uperc,up)
		local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
		table.insert(mount,mn)
		end
	end
file:close()
conky_start=nil
end--timed section
return ""
end

function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
d=tostring(d)
n=tonumber(n)
c=tonumber(c) or 0
if d=="total" then
data=#fsys or 1
elseif d=="fsys" then
data=fsys[n] or ""
	if c~=0 then
	data=string.sub(data,1,c) or ""
	end
elseif d=="size" then
data=size[n] or ""
elseif d=="used" then
data=used[n] or ""
elseif d=="free" then
data=avail[n] or ""
elseif d=="use%" then
data=uperc[n] or ""
elseif d=="mount" then
data=mount[n] or ""
	if c~=0 then
	data=string.sub(data,1,c) or ""
	end
else
data="check data type"
end
return data
end --#########end main function (this is a comment too)#########

Offline

#6712 2013-11-22 17:01:05

liquibyte
#! Member
From: N42°34'30.2664",W71°59'
Registered: 2013-11-04
Posts: 67
Website

Re: Conky v1.9 Thread

Sector11 wrote:

2013_11_22_11_58_42_263x107_Sector11.jpg

I was going to try yours but I have a digit.ttf font - and I know a simple remane doesn't work (tried that a couple of years ago).

Maybe: digital_liquibyte.ttf would be good

Do appreciate what you're doing though.

I'm still working on it and it doesn't show up yet as fixed width etc. and the glyphs are wonky as I haven't really started to size everything right yet.  I think I need to scale things by about 75% at least but I wanted to wait until I read some font specs first.  Here ya go >> http://liquibyte.org/font/liquibyte.ttf

sjv047 wrote:

Still not getting this working, and am hoping that its a minor issue in the "code"... We'll see.

Try changing lua_load ~/home/steve/mounted.lua to lua_load ~/mounted.lua if your mounted.lua is in /home/steve or /home/steve/mounted.lua.  The tilde is shorthand for linux that means /home/user.

Last edited by liquibyte (2013-11-22 17:09:55)

Offline

#6713 2013-11-22 17:42:01

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

@ sjv047

Sorry, you need one or two entries for the external connections
Sample:

 ${color1}${hr}
 ${color6}FSYS${color} = ${lua mount 1 total}${goto 80}${color8}SIZE${goto 115}${color7}FREE${goto 160}${color1}USED${goto 210}${color}MOUNT
${voffset -5} ${color1}${stippled_hr 5 1}
 ${color6}${lua mount 1 fsys 10}${goto 80}${color8}${lua mount 1 size}${goto 115}${color7}${lua mount 1 free}${goto 160}${color1}${lua mount 1 use%}${goto 210}${color}${lua mount 1 mount}
 ${color6}${lua mount 8 fsys 10}${goto 80}${color8}${lua mount 8 size}${goto 115}${color7}${lua mount 8 free}${goto 160}${color1}${lua mount 8 use%}${goto 210}${color}${lua mount 8 mount}
 ${color6}${lua mount 3 fsys 10}${goto 80}${color8}${lua mount 3 size}${goto 115}${color7}${lua mount 3 free}${goto 160}${color1}${lua mount 3 use%}${goto 210}${color}${lua mount 3 mount}
 ${color6}${lua mount 4 fsys 10}${goto 80}${color8}${lua mount 4 size}${goto 115}${color7}${lua mount 4 free}${goto 160}${color1}${lua mount 4 use%}${goto 210}${color}${lua mount 4 mount}
 ${color6}${lua mount 5 fsys 10}${goto 80}${color8}${lua mount 5 size}${goto 115}${color7}${lua mount 5 free}${goto 160}${color1}${lua mount 5 use%}${goto 210}${color}${lua mount 5 mount}
 ${color6}${lua mount 7 fsys 10}${goto 80}${color8}${lua mount 7 size}${goto 115}${color7}${lua mount 7 free}${goto 160}${color1}${lua mount 7 use%}${goto 210}${color}${lua mount 7 mount}
 ${color6}${lua mount 6 fsys 10}${goto 80}${color8}${lua mount 6 size}${goto 115}${color7}${lua mount 6 free}${goto 160}${color1}${lua mount 6 use%}${goto 210}${color}${lua mount 6 mount}
 ${color6}${lua mount 2 fsys 10}${goto 80}${color8}${lua mount 2 size}${goto 115}${color7}${lua mount 2 free}${goto 160}${color1}${lua mount 2 use%}${goto 210}${color}${lua mount 2 mount}
External:
 ${color6}${lua mount 9 fsys 10}${goto 80}${color8}${lua mount 9 size}${goto 115}${color7}${lua mount 9 free}${goto 160}${color1}${lua mount 9 use%}${goto 210}${color}${lua mount 9 mount}

2013_11_22_14_27_31_1920x1080_Sector11.jpg

Gotta get read for the Doc ... may be gone for a few days ...

Notice I have repositioned #1 to 8 to reflect my 'internal' partitions better.
9 and 10 would be the first 2 external links.

Also with this line:
${lua get_mounted_data 10}
you will not see any changes for 10 seconds - after the system sees it.

try:
${lua get_mounted_data 3}

Last edited by Sector11 (2013-11-22 17:48:12)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6714 2013-11-22 18:55:40

liquibyte
#! Member
From: N42°34'30.2664",W71°59'
Registered: 2013-11-04
Posts: 67
Website

Re: Conky v1.9 Thread

I finally fixed the conky freezing bug.  Turns out that if you have session.screen0.opaqueMove: false in your ~/.fluxbox/init file, your conky will freeze while dragging windows.  Filed a bug report with Fluxbox but I'd bet money they call this a feature.

Offline

#6715 2013-11-22 19:05:38

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

Conky transparency is... workaround, so it might be a Conky problem and bug will be dismissed.


Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

#6716 2013-11-22 19:16:39

liquibyte
#! Member
From: N42°34'30.2664",W71°59'
Registered: 2013-11-04
Posts: 67
Website

Re: Conky v1.9 Thread

dk75 wrote:

Conky transparency is... workaround, so it might be a Conky problem and bug will be dismissed.

The window manager should not have a window from one program affect another, ever.  That's a bug no matter if I want to draw my window as a window or on the root desktop.  The call to draw is being completely interrupted while windows are being moved.  I'd go so far as to call this a major bug.

Offline

#6717 2013-11-22 21:36:12

sjv047
Member
Registered: 2013-11-20
Posts: 23

Re: Conky v1.9 Thread

Liquibyte & Sector11,

Thanks much... It's working exactly the way I want it. I tweeked to fit my likes, and I'm very sure that there will be many more tweeks to come, but couldn't have done much of it without your help!

conky_zpse7e8c2ed.jpg

Offline

#6718 2013-11-22 22:16:41

sjv047
Member
Registered: 2013-11-20
Posts: 23

Re: Conky v1.9 Thread

Oh great  sad 

Already found an issue with my "latest" conky... Many of the numbers (i.e. up or down speeds), as they change, do not line up correctly... it seems like the numbers overlap themselves, making them unreadable for a moment before they straighten themselves out again... right before the numbers change again.

It mostly happens within the up/down speeds of my connections, but I have noticed it on ANY number that fluxuates as things change quickly within the system.

Is this a setting issue of conky to change buffer size or numbering in the setup prior to the "drawing" of the information shown?

Offline

#6719 2013-11-22 22:23:58

liquibyte
#! Member
From: N42°34'30.2664",W71°59'
Registered: 2013-11-04
Posts: 67
Website

Re: Conky v1.9 Thread

sjv047 wrote:

Oh great  sad 

Already found an issue with my "latest" conky... Many of the numbers (i.e. up or down speeds), as they change, do not line up correctly... it seems like the numbers overlap themselves, making them unreadable for a moment before they straighten themselves out again... right before the numbers change again.

It mostly happens within the up/down speeds of my connections, but I have noticed it on ANY number that fluxuates as things change quickly within the system.

Is this a setting issue of conky to change buffer size or numbering in the setup prior to the "drawing" of the information shown?

Post your conkyrc and I'll take a look at it.  I already have the script if you didn't modify any of it.

Offline

#6720 2013-11-22 22:28:34

sjv047
Member
Registered: 2013-11-20
Posts: 23

Re: Conky v1.9 Thread

Liquibyte...  Here you go!

################################
#       Conky Settings         #
################################
update_interval 1
total_run_times 0
cpu_avg_samples 2
net_avg_samples 2

imlib_cache_size 0
double_buffer true
no_buffers true

format_human_readable

################################
#        Text Settings         #
################################
use_xft true
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048
uppercase false
override_utf8_locale true

################################
#      Windows Settings        #
################################
own_window_class Conky
own_window true
own_window_transparent true
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_type normal

alignment top_right
gap_x 12
gap_y 2
minimum_size 190 0
maximum_width 190

default_bar_size 85 5

################################
#      Graphic Settings        #
################################
draw_shades false
draw_outline false
draw_borders false
stippled_borders 0
border_margin 5
border_width 1
default_color white
own_window_colour white
own_window_argb_visual true
use_spacer none

#########lua script(s)#########
lua_load ~/mounted.lua

TEXT
${lua get_mounted_data 10}
${alignc 10}${font Trebuchet MS:size=14}${time %H%M}, ${time %y%m%d}${font}
########## System Information ##########
${color Blue}SYSTEM INFORMATION ${color orange}${hr 2}$color
#
Host: ${alignr}${nodename}
User: ${alignr}${user_names}
Kernel:  ${alignr}${kernel}
Uptime: ${alignr}${uptime}
MAC Address: ${alignr}${execi 99999 cat /sys/class/net/eth0/address }
CPU Temp:${alignr}${if_match ${hwmon 0 tempf 1} <= 149}${color green}${hwmon 0 tempf 1}${color}${endif}${if_match ${hwmon 0 tempf 1} >=150}${color red}${hwmon 0 tempf 1}${color}${endif} °F / ${if_match ${hwmon 0 temp 1} <=64}${color green}${hwmon 0 temp 1}${color}${endif}${if_match ${hwmon 0 temp 1} >=65}${color red}${hwmon 0 temp 1}${color}${endif}°C
${stippled_hr 1}
#
CPU: ${alignr}${cpu cpu0}% ${if_match ${cpu cpu0} <= 19}${color green}${cpubar 10,100 cpu0}${color}${endif}${if_match ${cpu cpu0} >=20}${if_match ${cpu cpu0} <=49}${color yellow}${cpubar 10,100 cpu0}${color}${endif}${endif}${if_match ${cpu cpu0} >=50}${if_match ${cpu cpu0} <=74}${color orange}${cpubar 10,100 cpu0}${color}${endif}${endif}${if_match ${cpu cpu0} >= 75}${if_match ${cpu cpu0} <=100}${color red}${cpubar 10,100 cpu0}${color}${endif}${endif}
${alignr}${freq_g 0}GHz
#
Power: ${alignr}${battery_short} ${if_match ${battery_percent BAT0} <= 10}${color red}${battery_bar 10,100 BAT0}${color}${endif}${if_match ${battery_percent BAT0} >= 11}${if_match ${battery_percent BAT0} <=49}${color orange}${battery_bar 10,100 BAT0}${color}${endif}${endif}${if_match ${battery_percent BAT0} >= 50}${if_match ${battery_percent BAT0} <=79}${color yellow}${battery_bar 10,100 BAT0}${color}${endif}${endif}${if_match ${battery_percent BAT0} >= 80}${if_match ${battery_percent BAT0} <=100}${color green}${battery_bar 10,100 BAT0}${color}${endif}${endif}
${alignr}${battery_time}
#
Memory: ${alignr}${memperc}% ${if_match ${memperc} <= 24}${color green}${membar 10,100}${color}${endif}${if_match ${memperc} >= 25}${if_match ${memperc} <=49}${color yellow}${membar 10,100}${color}${endif}${endif}${if_match ${memperc} >= 50}${if_match ${memperc} <=74}${color orange}${membar 10,100}${color}${endif}${endif}${if_match ${memperc} >= 80}${if_match ${memperc} <=100}${color red}${membar 10,100}${color}${endif}${endif}
${alignr}${mem} / ${memmax}

${color Blue}DISK(S) INFORMATION ${color orange}${hr 2}$color

########## HDD ##########
Total Mounted Drives:${alignr} ${lua mount 1 total}
Disk I/O: ${alignr} ${diskio}
Processes: ${alignr} $processes / $running_processes
HDD Temp:${alignr} ${if_match ${exec hddtemp /dev/sda -n --unit=F} <= 149}${color green}${exec hddtemp /dev/sda -n --unit=F}${color}${endif}${if_match ${exec hddtemp /dev/sda -n --unit=F} >=150}${color red}${exec hddtemp /dev/sda -n --unit=F}${color}${endif} °F / ${if_match ${exec hddtemp /dev/sda -n --unit=C} <=64}${color green}${exec hddtemp /dev/sda -n --unit=C}${color}${endif}${if_match ${exec hddtemp /dev/sda -n --unit=C} >=65}${color red}${exec hddtemp /dev/sda -n --unit=C}${color}${endif}°C
${stippled_hr 1}
########## REMOVABLE DRIVES ##########
${color orange}System Name${goto 100}Size${alignr}Used%$color
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${alignr}${lua mount 1 use%}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${alignr}${lua mount 2 use%}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${alignr}${lua mount 3 use%}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${alignr}${lua mount 4 use%}
########## NETWORK INFORMATION ##########
${color Blue}NETWORK INFORMATION${color orange}${hr 2}$color

Gateway IP:${alignr}${gw_ip}
DNS:${alignr}${nameserver}
${stippled_hr 1}
#
########## WIFI CONNECTION INFO ##########
${if_existing /proc/net/route wlan0}${font sans-serif:size=8}WiFi SSID: ${alignr}${wireless_essid wlan0}${font sans-serif:normal:size=8}
Signal strength: ${alignr} ${if_match ${wireless_link_qual wlan0} <= 10}${color red}${wireless_link_qual wlan0}%${color}${endif}${if_match ${wireless_link_qual wlan0} >= 11}${if_match ${wireless_link_qual wlan0} <=49}${color orange}${wireless_link_qual wlan0}%${color}${endif}${endif}${if_match ${wireless_link_qual wlan0} >=50}${if_match ${wireless_link_qual wlan0} <=74}${color yellow}${wireless_link_qual wlan0}%${color}${endif}${endif}${if_match ${wireless_link_qual wlan0} >= 75}${if_match ${wireless_link_qual wlan0} <=100}${color green}${wireless_link_qual wlan0}%${color}${endif}${endif}
IP address: $alignr ${addr wlan0}
${voffset 4}${font Poky:size=13}${font}${voffset -8}Public IP: ${alignr}${execi 3600 wget -q -O /dev/stdout http://checkip.dyndns.org/ | cut -d : -f 2- | cut -d \< -f -1}
Speed: $alignr ${wireless_bitrate wlan0}
Down: ${downspeed wlan0} ${alignr} Up: ${upspeed wlan0}
Total: ${totaldown wlan0} ${alignr} Total: ${totalup wlan0}
${endif}
########## LAN CONNECTION INFO ##########
${if_existing /proc/net/route eth0} ${font sans-serif:italic:size=8} $alignc Wired (LAN) - Connected
${font sans-serif:normal:size=8}
IP address: $alignr ${addr eth0}
Down: ${downspeed eth0} ${alignr}Up: ${upspeed eth0}
Total: ${totaldown eth0} ${alignr}Total: {totalup eth0}
${endif}

Offline

#6721 2013-11-22 23:44:31

liquibyte
#! Member
From: N42°34'30.2664",W71°59'
Registered: 2013-11-04
Posts: 67
Website

Re: Conky v1.9 Thread

sjv047 wrote:

Liquibyte...  Here you go!

I've been testing it and can't figure out what's overlapping for you.  The only thing I don't have and can't spoof is a battery so I get no output for that.  I even went and found the Poky.ttf to make sure I had all of your fonts on my system and that was the only one I didn't have.  I see values changing but nothing overlaps here.  A variable value that's changing can and will move a static value that's on the same line in some instances.  Perhaps moving the calls to variables to a different line and adjusting their position manually might help.  I wish I could say more but what's happening on your end is definately not happening on my end.

Offline

#6722 2013-11-22 23:48:28

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: Conky v1.9 Thread

@sjv047: Do you mean the glitch caught on your last screeny (signal strengh)?
If so, i have never seen something like this before...
What i just saw is that your ${if_match}statements vary related to the spacing around the comparator, but maybe this is of no importance.
Another thing is that you set a IMO very high text_buffer_size (2048).

http://conky.sourceforge.net/config_settings.html wrote:

Size of the standard text buffer (default is 256 bytes). This buffer is used for intermediary text, such as individual lines, output from $exec vars, and various other variables. Increasing the size of this buffer can drastically reduce Conky's performance, but will allow for more text display per variable. The size of this buffer cannot be smaller than the default value of 256 bytes.

I don`t see any real big text or rss-feeds or stuff like this in your conky, so i don`t think you will need it that big, but if it can drastically reduce Conky's performance this may be the cause of your problem.

BTW i think want to have a look at line 108

${voffset 4}${font Poky:size=13}${font}${voffset -8}$...

wink

i hope this could be of any help.
good night -naik

Last edited by Naik (2013-11-22 23:51:07)


*kaum macht man es richtig, funktioniert es sofort*

Offline

#6723 2013-11-22 23:58:57

liquibyte
#! Member
From: N42°34'30.2664",W71°59'
Registered: 2013-11-04
Posts: 67
Website

Re: Conky v1.9 Thread

I didn't run into any display issues on my end with the script after changing a few defaults like eth0 and such.  All I did was make copies of the original lines and commented them out and changed them to sane values for my system.  Here's a copy of what I did so you can do a diff on it if you want:

################################
#       Conky Settings         #
################################
update_interval 1
total_run_times 0
cpu_avg_samples 2
net_avg_samples 2

imlib_cache_size 0
double_buffer true
no_buffers true

format_human_readable

################################
#        Text Settings         #
################################
use_xft true
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048
uppercase false
override_utf8_locale true

################################
#      Windows Settings        #
################################
own_window_class Conky
own_window true
own_window_transparent true
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_type normal

alignment top_right
gap_x 12
gap_y 2
minimum_size 190 0
maximum_width 190

default_bar_size 85 5

################################
#      Graphic Settings        #
################################
draw_shades false
draw_outline false
draw_borders false
stippled_borders 0
#border_margin 5 (not valid with my Conky 1.9.0)
border_width 1
default_color white
own_window_colour white
own_window_argb_visual true
use_spacer none

#########lua script(s)#########
lua_load ~/mounted/mounted.lua
#/sys/class/power_supply/BAT0/uevent
#/proc/acpi/battery/BAT0/state
#/proc/apm
TEXT
${lua get_mounted_data 10}
${alignc 10}${font Trebuchet MS:size=14}${time %H%M}, ${time %y%m%d}${font}
########## System Information ##########
${color Blue}SYSTEM INFORMATION ${color orange}${hr 2}$color
#
Host: ${alignr}${nodename}
User: ${alignr}${user_names}
Kernel:  ${alignr}${kernel}
Uptime: ${alignr}${uptime}
#MAC Address: ${alignr}${execi 99999 cat /sys/class/net/enp3s0/address }
MAC Address: ${alignr}${execi 99999 cat /sys/class/net/enp3s0/address }
CPU Temp:${alignr}${if_match ${hwmon 0 tempf 1} <= 149}${color green}${hwmon 0 tempf 1}${color}${endif}${if_match ${hwmon 0 tempf 1} >=150}${color red}${hwmon 0 tempf 1}${color}${endif} °F / ${if_match ${hwmon 0 temp 1} <=64}${color green}${hwmon 0 temp 1}${color}${endif}${if_match ${hwmon 0 temp 1} >=65}${color red}${hwmon 0 temp 1}${color}${endif}°C
${stippled_hr 1}
#
CPU: ${alignr}${cpu cpu0}% ${if_match ${cpu cpu0} <= 19}${color green}${cpubar 10,100 cpu0}${color}${endif}${if_match ${cpu cpu0} >=20}${if_match ${cpu cpu0} <=49}${color yellow}${cpubar 10,100 cpu0}${color}${endif}${endif}${if_match ${cpu cpu0} >=50}${if_match ${cpu cpu0} <=74}${color orange}${cpubar 10,100 cpu0}${color}${endif}${endif}${if_match ${cpu cpu0} >= 75}${if_match ${cpu cpu0} <=100}${color red}${cpubar 10,100 cpu0}${color}${endif}${endif}
${alignr}${freq_g 0}GHz
#
#Power: ${alignr}${battery_short} ${if_match ${battery_percent BAT0} <= 10}${color red}${battery_bar 10,100 BAT0}${color}${endif}${if_match ${battery_percent BAT0} >= 11}${if_match ${battery_percent BAT0} <=49}${color orange}${battery_bar 10,100 BAT0}${color}${endif}${endif}${if_match ${battery_percent BAT0} >= 50}${if_match ${battery_percent BAT0} <=79}${color yellow}${battery_bar 10,100 BAT0}${color}${endif}${endif}${if_match ${battery_percent BAT0} >= 80}${if_match ${battery_percent BAT0} <=100}${color green}${battery_bar 10,100 BAT0}${color}${endif}${endif}
${alignr}${battery_time}
#
Memory: ${alignr}${memperc}% ${if_match ${memperc} <= 24}${color green}${membar 10,100}${color}${endif}${if_match ${memperc} >= 25}${if_match ${memperc} <=49}${color yellow}${membar 10,100}${color}${endif}${endif}${if_match ${memperc} >= 50}${if_match ${memperc} <=74}${color orange}${membar 10,100}${color}${endif}${endif}${if_match ${memperc} >= 80}${if_match ${memperc} <=100}${color red}${membar 10,100}${color}${endif}${endif}
${alignr}${mem} / ${memmax}

${color Blue}DISK(S) INFORMATION ${color orange}${hr 2}$color

########## HDD ##########
Total Mounted Drives:${alignr} ${lua mount 1 total}
Disk I/O: ${alignr} ${diskio}
Processes: ${alignr} $processes / $running_processes
#HDD Temp:${alignr} ${if_match ${exec hddtemp /dev/sda -n --unit=F} <= 149}${color green}${exec hddtemp /dev/sda -n --unit=F}${color}${endif}${if_match ${exec hddtemp /dev/sda -n --unit=F} >=150}${color red}${exec hddtemp /dev/sda -n --unit=F}${color}${endif} °F / ${if_match ${exec hddtemp /dev/sda -n --unit=C} <=64}${color green}${exec hddtemp /dev/sda -n --unit=C}${color}${endif}${if_match ${exec hddtemp /dev/sda -n --unit=C} >=65}${color red}${exec hddtemp /dev/sda -n --unit=C}${color}${endif}°C
${stippled_hr 1}
########## REMOVABLE DRIVES ##########
${color orange}System Name${goto 100}Size${alignr}Used%$color
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${alignr}${lua mount 1 use%}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${alignr}${lua mount 2 use%}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${alignr}${lua mount 3 use%}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${alignr}${lua mount 4 use%}
########## NETWORK INFORMATION ##########
${color Blue}NETWORK INFORMATION${color orange}${hr 2}$color

Gateway IP:${alignr}${gw_ip}
DNS:${alignr}${nameserver}
${stippled_hr 1}
#
########## WIFI CONNECTION INFO ##########
#${if_existing /proc/net/route wlan0}${font sans-serif:size=8}WiFi SSID: ${alignr}${wireless_essid wlan0}${font sans-serif:normal:size=8}
#Signal strength: ${alignr} ${if_match ${wireless_link_qual wlan0} <= 10}${color red}${wireless_link_qual wlan0}%${color}${endif}${if_match ${wireless_link_qual wlan0} >= 11}${if_match ${wireless_link_qual wlan0} <=49}${color orange}${wireless_link_qual wlan0}%${color}${endif}${endif}${if_match ${wireless_link_qual wlan0} >=50}${if_match ${wireless_link_qual wlan0} <=74}${color yellow}${wireless_link_qual wlan0}%${color}${endif}${endif}${if_match ${wireless_link_qual wlan0} >= 75}${if_match ${wireless_link_qual wlan0} <=100}${color green}${wireless_link_qual wlan0}%${color}${endif}${endif}
#IP address: $alignr ${addr wlan0}
${if_existing /proc/net/route enp3s0}${font sans-serif:size=8}WiFi SSID: ${alignr}${wireless_essid enp3s0}${font sans-serif:normal:size=8}
Signal strength: ${alignr} ${if_match ${wireless_link_qual enp3s0} <= 10}${color red}${wireless_link_qual enp3s0}%${color}${endif}${if_match ${wireless_link_qual enp3s0} >= 11}${if_match ${wireless_link_qual enp3s0} <=49}${color orange}${wireless_link_qual enp3s0}%${color}${endif}${endif}${if_match ${wireless_link_qual enp3s0} >=50}${if_match ${wireless_link_qual enp3s0} <=74}${color yellow}${wireless_link_qual enp3s0}%${color}${endif}${endif}${if_match ${wireless_link_qual enp3s0} >= 75}${if_match ${wireless_link_qual enp3s0} <=100}${color green}${wireless_link_qual enp3s0}%${color}${endif}${endif}
IP address: $alignr ${addr enp3s0}
${voffset 4}${font Poky:size=13}${font}${voffset -8}Public IP: ${alignr}${execi 3600 wget -q -O /dev/stdout http://checkip.dyndns.org/ | cut -d : -f 2- | cut -d \< -f -1}
#Speed: $alignr ${wireless_bitrate wlan0}
#Down: ${downspeed wlan0} ${alignr} Up: ${upspeed wlan0}
#Total: ${totaldown wlan0} ${alignr} Total: ${totalup wlan0}
Speed: $alignr ${wireless_bitrate enp3s0}
Down: ${downspeed enp3s0} ${alignr} Up: ${upspeed enp3s0}
Total: ${totaldown enp3s0} ${alignr} Total: ${totalup enp3s0}
${endif}
########## LAN CONNECTION INFO ##########
${if_existing /proc/net/route enp3s0} ${font sans-serif:italic:size=8} $alignc Wired (LAN) - Connected
#${font sans-serif:normal:size=8}
#IP address: $alignr ${addr enp3s0}
#Down: ${downspeed enp3s0} ${alignr}Up: ${upspeed enp3s0}
#Total: ${totaldown enp3s0} ${alignr}Total: {totalup enp3s0}
IP address: $alignr ${addr enp3s0}
Down: ${downspeed enp3s0} ${alignr}Up: ${upspeed enp3s0}
Total: ${totaldown enp3s0} ${alignr}Total: {totalup enp3s0}
${endif}

Offline

#6724 2013-11-23 03:28:36

sjv047
Member
Registered: 2013-11-20
Posts: 23

Re: Conky v1.9 Thread

Nalk,

Thanks for pointing out a pretty wierd line item... I've deleted it, and all's well there... Thanks again for showing me. I have also changed my text_buffer_size to 256... Have no idea why it was so high, but nevertheless...Done!

As to the overlap that I was originally talking about, I've posted whatit looks like (Down Speed). Although it isn't a really big deal, and I'm sure I can live with it... but it is something that I noticed, and because of that, I now have a new challenge to figure out what THE HECK is happening...

Selection_004_zps56de65bc.jpg

Last edited by sjv047 (2013-11-23 03:36:00)

Offline

Be excellent to each other!

#6725 2013-11-23 04:11:02

liquibyte
#! Member
From: N42°34'30.2664",W71°59'
Registered: 2013-11-04
Posts: 67
Website

Re: Conky v1.9 Thread

I think you might have some problems with your fonts.  Try running fc-cache -vf in a terminal to rebuild your font cache and restart conky and see if that does anything.  Have you been getting any font errors or maybe theme errors lately?

8qa8.png

Last edited by liquibyte (2013-11-23 04:11:57)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo