SEARCH

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

You are not logged in.

#7526 2014-05-16 05:08:44

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: Conky v1.9 Thread

Sector11 wrote:
ansem_of_nexus wrote:

I think that the sensor part of this script is a no go

'sensors' are so machine specific ... too bad it looked like it was turning into something.

Well with a few changes it maybe possible to collect the information from inxi.  The problem with that though would be the conversion into useful information. You don't want an exec to be getting your temps for you. It is to taxing on CPU, even with execi.

Last edited by ansem_of_nexus (2014-05-16 06:38:48)


You can find my work here

Make everything ok button

Offline

Help fund CrunchBang, donate to the project!

#7527 2014-05-16 14:59:59

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

Re: Conky v1.9 Thread

ansem_of_nexus wrote:

Well with a few changes it maybe possible to collect the information from inxi.  The problem with that though would be the conversion into useful information. You don't want an exec to be getting your temps for you. It is to taxing on CPU, even with execi.

That rules out 'sensors' - sample

${exec sensors | grep -n 'temp1' | sed -n 2p | awk -F'+' '{print $2}' | awk -F' ' '{print $1}'}

but allows for hwmon and platform, samples:

${hwmon 1 temp 1}
${platform w83627ehf.656 temp 1}

exec, and derivatives, certainly add to the CPU uses percentage.


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

Offline

#7528 2014-05-16 18:37:36

dxm
Member
Registered: 2014-05-07
Posts: 11

Re: Conky v1.9 Thread

Has anyone had any luck getting a Conky dock/status bar to stick to the bottom edge of the screen in i3?

I'm basically having the exact same problem as this person. Someone has posted saying it looks like a bug in conky, buuut I wondered if anyone had managed to find a solution?

Cheers!

Offline

#7529 2014-05-17 11:16:32

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

Re: Conky v1.9 Thread

Making it "dock" type or "panel" doesn't automatically stick it to the border of the screen.
"alignment bottom_middle" also doesn't make it stick to the bottom middle of the screen, it just means, that every positioning made in Conky will be based at the bottom middle of the screen.

Next, you need

border width 0
border_inner_margin 4
border_outer_margin 1

If your Conky would be 1000px wide, then you need

gap_x -500
gap_y 0

; you aligning to the bottom middle of the screen, remember?

Then you must configure i3 window manager to not tile it anywhere else, but bottom middle screen... or not tile it at all.

Did you ask uncle Google?
I'm not in tiling with WM, but I've found this in an instant: http://i3wm.org/docs/user-contributed/conky-i3bar.html

Last edited by dk75 (2014-05-17 11:35:49)


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

#7530 2014-05-18 15:00:42

dlm955
#! CrunchBanger
From: Mansfield,Ohio USA
Registered: 2011-07-23
Posts: 128

Re: Conky v1.9 Thread

network conky
This conky changes depending on connection type  wireless wired no connection
netbarconkyrc

# conky configuration
#
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
#
# For ideas about how to modify conky, please see:
# http://crunchbanglinux.org/forums/topic/59/my-conky-config/
#
# For help with conky, please see:
# http://crunchbanglinux.org/forums/topic/2047/conky-help/
#
# The Fonts used LCDMono2 and PizzaDude Bullets can be found at dafont.com
##############################################################################
#
# thanks go to mrpeachy for lua....VinDSL for cal code....
# Mk32 from Ubuntu forums for ifup/else config [stuff after text]  --  http://ubuntuforums.org/showthread.php?t=281865&page=2270&p=12966974#post12966974
# Sector11 because mrpeachy said it's all his fault {ROFL} the line to use draw_bg to draw divider lines
# 
# Enjoy! :)
##############################################
# Settings
##############################################
background yes
use_xft yes
xftfont LCDMono2:Normal:size=9
xftalpha 1
text_buffer_size 10000
max_specials 10000
max_user_text 10000
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
#own_window_argb_visual yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 0
maximum_width 200
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
border_inner_margin 5
border_outer_margin 1
default_color 00ff00
default_shade_color 000000
default_outline_color 828282
alignment top_right
gap_x 20
gap_y 40
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
imlib_cache_size 0
###############################
########### colors ############
color0 FFFFFF
color1 333333
color2 555555
color3 999999
color4 FF0000
color5 00FF00
color6 0000FF
color7 FFFF00
color8 00FFFF
color9 000000
###############################################
### THANK YOU MRPEACHY for such a great lua ###
### this conky only works because of this lua ###
## Set the path to your script here.
lua_load /home/dlm955/conky/allcombined.lua
## lua funcions
#${lua draw_bg corner_radius x_position y_position width height color alpha}
#${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}
#${lua luacal x_position y_position font title_fontsize title_color title_alpha dates_fontsize dates_color dates_alpha highlight_fontsize highlight_color highlight_alpha colum_gap title_gap row_gap start_day}
#note for calendar start day... 0=sunday, 1=monday
#note for calendar font... if font has name with space, substitute _ for space, eg Liberation_Mono

##############################################
#  Output
##############################################
TEXT

${lua draw_bg 20 0 0 0 0 0x111111 0.9}${lua draw_bg 0 28 30 150 1 0x00FFFF 0.9}
${color8}${font LCDMono2:Normal:size=12}${alignc}NETWORK CONNECTIONS${font}
${color4}${if_empty ${exec cat /proc/net/arp | grep eth0}}${if_empty ${exec cat /proc/net/arp | grep wlan0}}${alignc}No network connection 
${lua draw_bg 0 30 90 150 1 0x00FFFF 0.9}
${else}${color7}Internal IP: ${alignr}${color }${addr wlan0}
${color7}External IP: ${color }${alignr}${execi 1800 wget -O - http://ip.tupeux.com | tail}
${color7}Connected to: ${alignr}${color }${wireless_essid wlan0}
${color7}Signal: ${color }${wireless_link_qual_perc wlan0}${font Andale Mono:size=10} %${font} ${alignr}${color }${wireless_bitrate wlan0}
${lua gradbar 7 110 ${wireless_link_qual_perc wlan0} 100 66 2 10 1 0xFFFFFF 0.3 0x00FF00 1 0xFFFF00 1 0xFF0000 1}
${color7}${font PizzaDude Bullets:size=9}T${font} Down: ${color }${downspeed wlan0}
${lua gradbar 7 143 ${downspeedf wlan0} 4096 66 2 20 1 0xFFFFFF 0.3 0x00FF00 1 0xFFFF00 1 0xFF0000 1}

${color7}${font PizzaDude Bullets:size=9}N${font} Up: ${color }${upspeed wlan0}
${lua gradbar 7 183 ${upspeedf wlan0} 1024 66 2 20 1 0xFFFFFF 0.3 0x00FF00 1 0xFFFF00 1 0xFF0000 1}

${color7}Session Total Down: ${alignr}${color }${totaldown wlan0}
${color7}Session Total Up: ${alignr}${color }${totalup wlan0}
${color7}Connections: ${color4}In:${color}${tcp_portmon 1 32767 count}${alignr}${color4}Out:${color}${tcp_portmon 32768 61000 count}
${lua draw_bg 0 30 270 150 1 0x00FFFF 0.9}${endif}
${else}${color7}LAN IP:${alignr}${color}${addr eth0}
${color7}External IP:${color}${alignr}${execi 1800 curl ifconfig.me}
${color7}${font PizzaDude Bullets:size=9}T${font} Down: ${color }${downspeed eth0} 
${lua gradbar 7 97 ${downspeedf eth0} 4096 66 2 20 1 0xFFFFFF 0.3 0x00FF00 1 0xFFFF00 1 0xFF0000 1}

${color7}${font PizzaDude Bullets:size=9}N${font} Up: ${color }${upspeed eth0}
${lua gradbar 7 140 ${upspeedf eth0} 1024 66 2 20 1 0xFFFFFF 0.3 0x00FF00 1 0xFFFF00 1 0xFF0000 1}

${color7}Session Total Down: ${alignr}${color }${totaldown eth0}
${color7}Session Total Up: ${alignr}${color }${totalup eth0}
${color7}Connections: ${color4}In: ${color }${tcp_portmon 1 32768 count} ${alignr}${color4}Out: ${color }${tcp_portmon 32768 61000 count}
${lua draw_bg 0 30 220 150 1 0x00FFFF 0.9}${endif}
${color8}${font Nimbus Mono L:size=18}${alignc}${time %B %Y}
${font Nimbus Mono L:size=11}${color3}${execpi 60 VinDSL_Cal_9=`date +%-d`; cal -h | sed -e 's/\r//g' -e 's/^/ /g' -e '1d' -e 's/\<'"$VinDSL_Cal_9"'\>/${color FF0000}&${color 999999}/'}


 

allcombined.lua

--[[ 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(bar_startx,bar_starty,number,number_max,divisions,div_width,div_height,div_gap,bg_col,bg_alpha,st_col,st_alpha,mid_col,mid_alpha,end_col,end_alpha)
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
--#########################################################################################################
local number=conky_parse(number)
--set colors
--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
colr=nil
colg=nil
colb=nil
cola=nil
--#########################################################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_draw_bg(r,x,y,w,h,color,alpha)
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
--#########################################################################################################
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)
--#########################################################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luacal(cal_x,cal_y,font,tfontsize,tc,ta,mfontsize,bc,ba,hfontsize,hc,ha,gaph,gapt,gapl,sday)
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
--#########################################################################################################
--####################################################################################################
--title text color
local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b({tc,ta})
--title text font
local tfont=font
--###################################################
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b({bc,ba})
--main body text font
local mfont=font
--###################################################
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b({hc,ha})
--highlight font
local hfont=font
--###################################################
--spacer -- this can help with alignment enter 0, 1 space or 2 spaces between the ""
local spacer=" "
--###################################################
--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, mfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, mfontsize);
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
--#########################################################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luaimage(im_x,im_y,im_w,im_h,file)
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
--#########################################################################################################
if file==nil then print("set image file") end
---------------------------------------------
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
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

  JglqBlps.png      XjssYm7s.png         w3ec5cHs.png

Last edited by dlm955 (2014-05-18 15:13:05)


Give a man a truth and he will think for a day.
Teach a man to reason and he will think for a lifetime!

Offline

#7531 2014-05-18 15:11:36

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Conky v1.9 Thread

dxm wrote:

Has anyone had any luck getting a Conky dock/status bar to stick to the bottom edge of the screen in i3?

I'm basically having the exact same problem as this person. Someone has posted saying it looks like a bug in conky, buuut I wondered if anyone had managed to find a solution?

Cheers!

If you're not using the i3status bar, you can edit your ~/.i3/config file: go to the end of the file & change the lines beginning at "bar {" to:

bar {
        status_command          conky
        position                bottom
        font                    -*-terminus-medium-r-*-*-12-*-*-*-*-*-*-*
}

using whatever font you prefer of course (terminus is lovely and is in the xfonts-terminus package) wink
EDIT: if you use this method, your .conkyrc will have to use the "out_to_console yes" & "out_to_x no" config options: here's mine for reference

out_to_console yes
out_to_x no
background no
update_interval 1
total_run_times 0
use_spacer none

TEXT
CPU ${cpu cpu0}% $offset RAM $mem $offset Downloads ${totaldown wlp2s0} $offset $battery $offset ${time %H:%M}

EDIT 2: that's from my Arch install --- your wireless interface will be wlan0, but I'm sure you know this already wink

Last edited by Head_on_a_Stick (2014-05-18 15:35:58)

Offline

#7532 2014-05-18 15:48:15

dlawrence
New Member
Registered: 2014-05-18
Posts: 3

Re: Conky v1.9 Thread

Hi there! First of all, this is my first time when I'm using something else than Windows(Windows XP to be clearer), so I'm sorry for being a newbie and using your precious time with maybe stupid questions. Also, apologies if my topic isn't where it should be.

Those being said, I need some help with the formatting of a python script's output on my conky.
Most of my conky's code is taken from a conky setup I've found on the internet. Today I thought about putting up a script that would show me on the conky the classes during the day at my high school.

schedule.py

import time
today = time.strftime('%w')
Mon = ['Info', 'Franceza', 'Istorie', 'Romana', 'Fizica']
Tue = ['Engleza', 'Mate', 'Fizica', 'Info', 'Biologie', 'Economie']
Wed = ['Romana', 'Mate', 'Mate', 'Info', 'Info', 'Geografie']
Thu = ['Mate', 'Franceza', 'Romana', 'Fizica', 'Info', 'Chimie']
Fri = ['Info', 'Info', 'Engleza', 'Mate', 'Dirigentie', 'Sport', 'Religie']
Sat = ['YOU SO FREE!!!']
Sun = ['YOU SO FREE!!!']
Orar = [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
for x,d in enumerate(Orar): 
    if x == int(today):
        for y in d:
			print y,'\n'
	break

Sorry if it's newbish, but it's the first way I could think of.

.conkyrc

# Conky settings #
background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2
temperature_unit celsius

double_buffer yes
no_buffers yes
text_buffer_size 2048

gap_x 10
gap_y 30

minimum_size 195 450
maximum_width 195

own_window yes
own_window_type normal
own_window_transparent no
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
alignment tr

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

override_utf8_locale yes
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5
uppercase no

default_color FFFFFF
#color1 DDDDDD
#color2 AAAAAA
#color3 888888
#color4 D54D23

color1 DDDDDD
color2 AAAAAA
color3 888888
color4 D54D23
# Lua Load #
lua_load ~/.lua/scripts/clock_rings.lua
lua_draw_hook_pre clock_rings

TEXT
${font Rational Integer:size=12 weight:bold}${color1}${voffset 100}${goto 28}${time %A}${font Rational Integer:size=20}${alignr}${color2}${time %I}:${time %M}${font Rational Integer:size=10}${color3}${time %P}
${font Rational Integer:size=20 weight:bold}${color1}${time %b}  ${font Rational Integer:size=20}${color2}${time %e}  ${color3}${time %Y}${goto 90}${voffset -12}${color1}${cpugraph 10,80 666666 666666}
${font Ubuntu:size=10}${color4}${goto 65}${voffset -89}${cpu cpu0}%  ${cpu cpu1}%
${goto 70}${font Ubuntu:size=10}${color1}${voffset 65}${top name 1}${alignr}${top cpu 1}%
${goto 70}${font Ubuntu:size=10}${color2}${voffset -5}${top name 2}${alignr}${top cpu 2}%
${goto 70}${font Ubuntu:size=10}${color3}${voffset -5}${top name 3}${alignr}${top cpu 3}%

${font Rational Integer:size=12 weight:bold}${color1}${goto 68}${voffset 38}MEM ${font Ubuntu:size=10}${goto 47}${voffset -15}${color4}${memperc}%
${goto 70}${font Ubuntu:size=10}${color1}${voffset 10}${top_mem name 1}${alignr}${top mem 1}%
${goto 70}${font Ubuntu:size=10}${color2}${voffset -5}${top_mem name 2}${alignr}${top mem 2}%
${goto 70}${font Ubuntu:size=10}${color3}${voffset -5}${top_mem name 3}${alignr}${top mem 3}%
${alignr}${voffset -70}${memgraph 20,80 666666 666666}

${font Rational Integer:size=12 weight:bold}${color1}${goto 68}${voffset 70}DISK ${font Ubuntu:size=10}${goto 47}${voffset -16}${color4}${fs_used_perc /}%
${alignr}${voffset -20}${diskiograph 20,80 666666 666666}
${goto 70}${voffset -1}${font Ubuntu:size=10}${color2}Used:${alignr}${fs_used /}
${goto 70}${voffset -3}${font Ubuntu:size=10}${color2}Free:${alignr}${fs_free /}

${font Rational Integer:size=12 weight:bold}${color1}${goto 68}${voffset 55}DAILY SCHEDULE 
${goto 70}${voffset -1}${font Ubuntu:size=10}${color2}${execpi 300 python ~/.scripts/schedule.py}${alignr}

The output on my conky: http://imgur.com/e8MvbgE
The problem is that all but first course aren't alligned to the right, and I can't find a solution.
What should I change?
Thanks for your time! smile

---
merged into the conky thread by request of dlawrence
-s11

Offline

#7533 2014-05-18 15:56:49

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Conky v1.9 Thread

Don't you need your last {alignr} before the text you want aligned?


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#7534 2014-05-18 15:57:43

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Conky v1.9 Thread

Hello dlawrence, welcome to #!
I've never used python but I think you need to put the "${alignr}" bit before you call the script wink
Also, you may want to Report your own post (next to the "Quote" option at the bottom right) and ask a moderator to move this to the Conky support thread...
EDIT: too slow, curses hmm

Last edited by Head_on_a_Stick (2014-05-18 15:58:14)

Offline

#7535 2014-05-18 15:59:37

dlawrence
New Member
Registered: 2014-05-18
Posts: 3

Re: Conky v1.9 Thread

Do you mean?

${alignr}${goto 70}${voffset -1}${font Ubuntu:size=10}${color2}${execpi 300 python ~/.scripts/schedule.py}

Still aligns just the first one.
@Head_on_a_stick: Sure, thanks for telling me. smile

Solved with a simpler Conky. Thanks!

Last edited by dlawrence (2014-05-18 17:34:17)

Offline

#7536 2014-05-18 17:32:00

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

Re: Conky v1.9 Thread

Conky is a line based. So, "${alignr}" is working only with the line it is put on.
Since you already using "${execpi}" function, which is "interval based parsed execute", which means that it parse output of execute to find any Conky function and run it from it, then just add "${alignr}" inside Python output:

print y,'${alignr}\n'

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

#7537 2014-05-18 17:35:29

dlawrence
New Member
Registered: 2014-05-18
Posts: 3

Re: Conky v1.9 Thread

dk75 wrote:

Conky is a line based. So, "${alignr}" is working only with the line it is put on.
Since you already using "${execpi}" function, which is "interval based parsed execute", which means that it parse output of execute to find any Conky function and run it from it, then just add "${alignr}" inside Python output:

print y,'${alignr}\n'

Wow, that's great. Thanks alot! smile

Offline

#7538 2014-05-18 20:57:06

dxm
Member
Registered: 2014-05-07
Posts: 11

Re: Conky v1.9 Thread

Thanks for the help Head_on_a_Stick and dk75! I'll give it a try.

Offline

#7539 2014-05-18 22:39:44

manuel318
New Member
Registered: 2011-07-12
Posts: 8

Re: Conky v1.9 Thread

Just another conky ....
Thanks to sector 11 , bargraph jedy.........
ConkyForecast still working ................
With new kernel linux-3.14.3 ............
http://postimg.org/image/r8erux6l5/

Offline

#7540 2014-05-19 05:57:16

Dobbie03
Resident Metaller
From: New Zealand
Registered: 2009-08-15
Posts: 1,591

Re: Conky v1.9 Thread

Nothing to see here big_smile

Last edited by Dobbie03 (2014-05-19 07:03:23)

Offline

#7541 2014-05-19 09:03:02

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: Conky v1.9 Thread

@Dobbie03 I saw conky manager in the picture you posted before you retracked it, so I checked it out and it seems good. I wanted to come back here and ask your opinion on it.


You can find my work here

Make everything ok button

Offline

#7542 2014-05-20 07:43:27

Dobbie03
Resident Metaller
From: New Zealand
Registered: 2009-08-15
Posts: 1,591

Re: Conky v1.9 Thread

ansem_of_nexus wrote:

@Dobbie03 I saw conky manager in the picture you posted before you retracked it, so I checked it out and it seems good. I wanted to come back here and ask your opinion on it.

I quite like it, makes it easier to stop and start multiple conkys.  I have got lazy using conky manager big_smile

Offline

#7543 2014-05-20 08:12:16

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: Conky v1.9 Thread

Dobbie03 wrote:

I quite like it, makes it easier to stop and start multiple conkys.  I have got lazy using conky manager big_smile

After formatting a copy of my conkys that are completed and setting it up, I am rather enjoying the ease of it. Though set up is a little simple. This makes me wonder why it isn't already in the repositories, since it works perfect after adding in the other repo. (I did mine while offline and it was a snap)

Last edited by ansem_of_nexus (2014-05-20 08:13:36)


You can find my work here

Make everything ok button

Offline

#7544 2014-05-20 09:45:50

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: Conky v1.9 Thread

Wanted to get a real graph conky so I made this one. using system_profile or system_profile_manual the system_graphs will display graphs for cpus, memperc, swapperc, eth0 and wlan0.
first version... the colors are really simple. thinking I should fix that at some point.
2014_05_20_1400577475_1600x900_scrot.jpg
I added my copy of mount.lua in the functions so all you will need to do is call a couple of functions in a normal lua script
system_profile or system_profile_manual before any "if updates > 5"
system_graphs after any "if updates > 5"

function system_profile()
--this function requires inxi and mount.lua from mrpeachy
local updates=tonumber(conky_parse('${updates}'))
if updates == 1 then
c_total={}
p_total=0
conky_get_mounted_data(1)
for i = 1,10 do
c_total[i]=conky_parse("${exec inxi -C | grep 'Clock Speeds:' | awk -F'Clock Speeds:' '{print $2}' | awk -F'"..i..":' '{print $2}'}")
if c_total[i] ~= "" then cores=i end
if conky_mount((i+1),"fsys",8) == "/dev/sda" then p_total=i end
end--for
p_total=p_total+1
net=conky_parse("${exec inxi -n | grep 'IF' | awk -F'IF:' '{print $2}' | awk -F'state' '{print $1}'}")
if string.find(net,"wlan0") ~= nil then wlan0=1 end
if string.find(net,"eth0") ~= nil then eth0=1 end
if cores == nil then cores=0 end
if c_total == nil then c_total=0 end
if p_total == nil then p_total=0 end
if wlan0 == nil then wlan0=0 end
if eth0 == nil then eth0=0 end
print("cores","hdd","eth0","wlan0")
print(cores,p_total,eth0,wlan0)
end--if
--calling strings for use later
if updates > 1 then
cores=2
cpu_strings(cores)
mem_strings()
swap_strings()
if eth0 == 1 then eth0_strings() end
if wlan0 == 1 then wlan0_strings() end
end--if
end--function
function system_profile_manual()
local updates=tonumber(conky_parse('${updates}'))
if updates == 1 then
cores=0		--cpu core count
p_total=0	--partition count
wlan0=0		--if there is a wireless card
eth0=0		--if there is a network card
print("cores","hdd","eth0","wlan0")
print(cores,p_total,eth0,wlan0)
end
if updates > 1 then
cores=2
cpu_strings(cores)
mem_strings()
swap_strings()
if eth0 == 1 then eth0_strings() end
if wlan0 == 1 then wlan0_strings() end
end--if
end
--graphs
function system_graphs(tlx,tly,w,h,table_length)
cpu_tables(table_length,cores)
mem_table(table_length)
swap_table(table_length)
names={"cpu"}
tables={cpu_table}
scales={100}
colors={{.4,.4,1,1}}
fcolors={{0,0,1,1}}
if cores > 1 then
	names[#names+1]="cpu1" ; names[#names+1]="cpu2"
	tables[#tables+1]=cpu1_table ; tables[#tables+1]=cpu2_table
	scales[#scales+1]=100 ; scales[#scales+1]=100
	colors[#colors+1]={.4,.4,1,1} ; colors[#colors+1]={.4,.4,1,1}
	fcolors[#fcolors+1]={0,0,1,1} ; fcolors[#fcolors+1]={0,0,1,1}
end
if cores > 2 then
	names[#names+1]="cpu3"
	tables[#tables+1]=cpu3_table
	scales[#scales+1]=100
	colors[#colors+1]={.4,.4,1,1}
	fcolors[#fcolors+1]={0,0,1,1}
end
if cores > 3 then
	names[#names+1]="cpu4"
	tables[#tables+1]=cpu4_table
	scales[#scales+1]=100
	colors[#colors+1]={.4,.4,1,1}
	fcolors[#fcolors+1]={0,0,1,1}
end
names[#names+1]="mem" ; tables[#tables+1]=memperc_table ; scales[#scales+1]=100 ; colors[#colors+1]={0,1,0,1} ; fcolors[#fcolors+1]={0,.5,0,1}
names[#names+1]="swap" ; tables[#tables+1]=swapperc_table ; scales[#scales+1]=100 ; colors[#colors+1]={1,0,0,1} ; fcolors[#fcolors+1]={.5,0,0,1}
if eth0 == 1 then
	eth0_table()
	names[#names+1]="eth0"
	tables[#tables+1]=eth0_down_table
	scales[#scales+1]=eth0_down_table_scale
	colors[#colors+1]={.4,.4,1,1}
	fcolors[#fcolors+1]={0,0,1,1}
end
if wlan0 == 1 then
	wlan0_table()
	names[#names+1]="wlan0"
	tables[#tables+1]=wlan0_down_table
	scales[#scales+1]=wlan0_down_table_scale
	colors[#colors+1]={0,1,0,1}
	fcolors[#fcolors+1]={0,.5,0,1}
end
for i = 1,#tables do
if cores >= 2 then
	if i == 2 then
	text(tlx,(13+((h+20)*(i-1))),names[i])
	graph(tlx,(tly+((h+20)*(i-1))),(w/2),h,2,{colors[i][1],colors[i][2],colors[i][3],colors[i][4]},table_length,tables[i],scales[i],{fcolors[i][1],fcolors[i][2],fcolors[i][3],fcolors[i][4]})
	else
		if i == 3 then
		text((tlx+(w/2)),(13+((h+20)*(i-2))),names[i])
		graph((tlx+(w/2)),(tly+((h+20)*(i-2))),(w/2),h,2,{colors[i][1],colors[i][2],colors[i][3],colors[i][4]},table_length,tables[i],scales[i],{fcolors[i][1],fcolors[i][2],fcolors[i][3],fcolors[i][4]})
		else
			if cores > 3 then
				if i == 4 then
				text(tlx,(13+((h+20)*(i-2))),names[i])
				graph(tlx,(tly+((h+20)*(i-2))),(w/2),h,2,{colors[i][1],colors[i][2],colors[i][3],colors[i][4]},table_length,tables[i],scales[i],{fcolors[i][1],fcolors[i][2],fcolors[i][3],fcolors[i][4]})
				else
					if i == 5 then
					text((tlx+(w/2)),(13+((h+20)*(i-3))),names[i])
					graph((tlx+(w/2)),(tly+((h+20)*(i-3))),(w/2),h,2,{colors[i][1],colors[i][2],colors[i][3],colors[i][4]},table_length,tables[i],scales[i],{fcolors[i][1],fcolors[i][2],fcolors[i][3],fcolors[i][4]})
					else
						if i > 1 then
						text(tlx,(13+((h+20)*(i-3))),names[i])
						graph(tlx,(tly+((h+20)*(i-3))),w,h,2,{colors[i][1],colors[i][2],colors[i][3],colors[i][4]},table_length,tables[i],scales[i],{fcolors[i][1],fcolors[i][2],fcolors[i][3],fcolors[i][4]})
						else
						text(tlx,(13+((h+20)*(i-1))),names[i])
						graph(tlx,(tly+((h+20)*(i-1))),w,h,2,{colors[i][1],colors[i][2],colors[i][3],colors[i][4]},table_length,tables[i],scales[i],{fcolors[i][1],fcolors[i][2],fcolors[i][3],fcolors[i][4]})
						end--i>1
					end--i=5
				end--i=4
			else
				if i > 1 then
				text(tlx,(13+((h+20)*(i-2))),names[i])
				graph(tlx,(tly+((h+20)*(i-2))),w,h,2,{colors[i][1],colors[i][2],colors[i][3],colors[i][4]},table_length,tables[i],scales[i],{fcolors[i][1],fcolors[i][2],fcolors[i][3],fcolors[i][4]})
				else
				text(tlx,(13+((h+20)*(i-1))),names[i])
				graph(tlx,(tly+((h+20)*(i-1))),w,h,2,{colors[i][1],colors[i][2],colors[i][3],colors[i][4]},table_length,tables[i],scales[i],{fcolors[i][1],fcolors[i][2],fcolors[i][3],fcolors[i][4]})
				end--i>1
			end--if cores > 3 then
		end--i=3
	end--i=2
else
text(tlx,(13+((h+20)*(i-1))),names[i])
graph(tlx,(tly+((h+20)*(i-1))),w,h,2,{colors[i][1],colors[i][2],colors[i][3],colors[i][4]},table_length,tables[i],scales[i],{fcolors[i][1],fcolors[i][2],fcolors[i][3],fcolors[i][4]})
end--if cores >= 2 then
end--for
end--function
function graph(tlx,tly,w,h,lw,lc,table_length,data,scale,fc)
--[[cpu_table(table_length)
graph(
--tlx,tly,w,h,
20,20,150,60,
--lw,lc,
2,{1,1,1,1},
--table_length,data,scale,
10,cpu_avg_table,100
--outline,fc
)]]
cairo_set_source_rgba(cr,.1,.1,.1,1)
cairo_rectangle(cr,tlx,tly,w,h)
cairo_fill(cr)
cairo_set_line_width(cr,lw)
cairo_move_to(cr,(tlx+w),(tly+h))
for i = 1,#data do cairo_line_to(cr,((tlx+w)-(w/(table_length+1)*i)),((tly+h)-(h/scale*data[i]))) end
cairo_line_to(cr,tlx,(tly+h))
if fc ~= nil then cairo_set_source_rgba(cr,fc[1],fc[2],fc[3],fc[4]) ; cairo_fill_preserve(cr) end
cairo_set_source_rgba(cr,lc[1],lc[2],lc[3],lc[4])
cairo_stroke(cr)
cairo_set_line_width(cr,2)
cairo_set_source_rgba(cr,.5,.5,.5,1)
for i = 1,4 do cairo_move_to(cr,tlx,(tly+(h/5*i))) ; cairo_line_to(cr,(tlx+(w/(table_length+1))),(tly+(h/5*i))) ; cairo_stroke(cr) end
cairo_set_line_width(cr,4)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_rectangle(cr,(tlx-2),(tly-2),(w+2),(h+2))
cairo_stroke(cr)
end
--strings
function cpu_strings(cores)
if cores == nil then cores=1 end
cpu=tonumber(conky_parse("${cpu cpu0}"))
	if cpu == nil then cpu=0 end
	if cores >= 2 then
cpu1=tonumber(conky_parse("${cpu cpu1}"))
	if cpu1 == nil then cpu1=0 end
cpu2=tonumber(conky_parse("${cpu cpu2}"))
	if cpu2 == nil then cpu2=0 end
	end
	if cores >= 3 then
cpu3=tonumber(conky_parse("${cpu cpu3}"))
	if cpu3 == nil then cpu3=0 end
	end
	if cores >= 4 then
cpu4=tonumber(conky_parse("${cpu cpu4}"))
	if cpu4 == nil then cpu4=0 end
	end
end--function
function eth0_strings()
eth0_ip=conky_parse("${addr eth0}")
eth0_down=tonumber(conky_parse("${downspeed eth0}"))
eth0_down_value=tonumber(conky_parse("${downspeedf eth0}"))
eth0_up=tonumber(conky_parse("${upspeed eth0}"))
eth0_up_value=tonumber(conky_parse("${upspeedf eth0}"))
end
function mem_strings()
memmax=conky_parse("${memmax}")
memperc=tonumber(conky_parse("${memperc}"))
	if mem_perc == nil then mem_perc=0 end
mem=conky_parse("${mem}")
end
function swap_strings()
swapperc=tonumber(conky_parse("${swapperc}"))
	if swap_perc == nil then swap_perc=0 end
swap=conky_parse("${swap}")
swapmax=conky_parse("${swapmax}")
end
function wlan0_strings()
wlan0_ip=conky_parse("${addr wlan0}")
wlan0_down=tonumber(conky_parse("${downspeed wlan0}"))
wlan0_down_value=tonumber(conky_parse("${downspeedf wlan0}"))
wlan0_up=tonumber(conky_parse("${upspeed wlan0}"))
wlan0_up_value=tonumber(conky_parse("${upspeedf wlan0}"))
end
--tables
function cpu_tables(table_length,cores)
if table_length == nil then table_length=10 end
if cores == nil then cores=1 end
--cpu
if cores >= 1 then
if cpu == nil then cpu=0 ; print("Error:","cpu=nil") end
if cpu_table == nil then cpu_table={} end
for i = 1, tonumber(table_length) do
            if cpu_table[i+1]==nil then cpu_table[i+1]=0 end
cpu_table[i]=cpu_table[i+1]
            if i==table_length then
            cpu_table[table_length]=cpu
            end
end
end
--cpu1
if cores >= 2 then
if cpu1 == nil then cpu1=0 ; print("Error:","cpu1=nil") end
if cpu1_table == nil then cpu1_table={} end
for i = 1, tonumber(table_length) do
            if cpu1_table[i+1]==nil then cpu1_table[i+1]=0 end
cpu1_table[i]=cpu1_table[i+1]
            if i==table_length then
            cpu1_table[table_length]=cpu1
            end
end
end
--cpu2
if cores >= 2 then
if cpu2 == nil then cpu2=0 ; print("Error:","cpu2=nil") end
if cpu2_table == nil then cpu2_table={} end
for i = 1, tonumber(table_length) do
            if cpu2_table[i+1]==nil then cpu2_table[i+1]=0 end
cpu2_table[i]=cpu2_table[i+1]
            if i==table_length then
            cpu2_table[table_length]=cpu2
            end
end
end
--cpu3
if cores >= 3 then
if cpu3 == nil then cpu3=0 ; print("Error:","cpu3=nil") end
if cpu3_table == nil then cpu3_table={} end
for i = 1, tonumber(table_length) do
            if cpu3_table[i+1]==nil then cpu3_table[i+1]=0 end
cpu3_table[i]=cpu3_table[i+1]
            if i==table_length then
            cpu3_table[table_length]=cpu3
            end
end
end
--cpu_4
if cores >= 4 then
if cpu4 == nil then cpu4=0 ; print("Error:","cpu4=nil") end
if cpu4_table == nil then cpu4_table={} end
for i = 1, tonumber(table_length) do
            if cpu4_table[i+1]==nil then cpu4_table[i+1]=0 end
cpu4_table[i]=cpu4_table[i+1]
            if i==table_length then
            cpu4_table[table_length]=cpu4
            end
end
end
end--cpu_tables
function eth0_table(table_length)
if table_length == nil then table_length=10 end
if eth0_down_table == nil then eth0_down_table={} end
if eth0_up_table == nil then eth0_up_table={} end
for i = 1,table_length do if eth0_down_table[i] == nil then eth0_down_table[i]=0 end end
for i = 1,table_length do if eth0_up_table[i] == nil then eth0_up_table[i]=0 end end
if eth0_down == nil then eth0_down=0 end
for i = 1, tonumber(table_length) do
            if eth0_down_table[i+1]==nil then eth0_down_table[i+1]=0 end
eth0_down_table[i]=eth0_down_table[i+1]
            if i==table_length then
            eth0_down_table[table_length]=eth0_down
            end
end
if eth0_up == nil then eth0_up=0 end
for i = 1, tonumber(table_length) do
            if eth0_up_table[i+1]==nil then eth0_up_table[i+1]=0 end
eth0_up_table[i]=eth0_up_table[i+1]
            if i==table_length then
            eth0_up_table[table_length]=eth0_up
            end
end
eth0_down_table_high=0
eth0_down_table_scale=0
for i = 1,table_length do if eth0_down_table[i] > eth0_down_table_high then eth0_down_table_high=eth0_down_table[i] end end
for i = 1,100 do if eth0_down_table_high >= ((i-1)*100) then eth0_down_table_scale=i*100 end end
eth0_up_table_high=0
eth0_up_table_scale=0
for i = 1,table_length do if eth0_up_table[i] > eth0_up_table_high then eth0_up_table_high=eth0_up_table[i] end end
for i = 1,100 do if eth0_up_table_high >= ((i-1)*100) then eth0_up_table_scale=i*100 end end
end--function
function mem_table(table_length)--5/1/14
if memperc == nil then memperc=0 ; print("Error:","memperc=nil") end
if memperc_table == nil then memperc_table={} end
for i = 1, tonumber(table_length) do
            if memperc_table[i+1]==nil then memperc_table[i+1]=0 end
memperc_table[i]=memperc_table[i+1]
            if i==table_length then
            memperc_table[table_length]=memperc
            end
end
end--function
function swap_table(table_length)--5/1/14
if swapperc == nil then swapperc=0 ; print("Error:","swapperc=nil") end
if swapperc_table == nil then swapperc_table={} end
for i = 1, tonumber(table_length) do
            if swapperc_table[i+1]==nil then swapperc_table[i+1]=0 end
swapperc_table[i]=swapperc_table[i+1]
            if i==table_length then
            swapperc_table[table_length]=swapperc
            end
end
end--function
function wlan0_table(table_length)
if table_length == nil then table_length=10 end
if wlan0_down_table == nil then wlan0_down_table={} end
if wlan0_up_table == nil then wlan0_up_table={} end
for i = 1,table_length do if wlan0_down_table[i] == nil then wlan0_down_table[i]=0 end end
for i = 1,table_length do if wlan0_up_table[i] == nil then wlan0_up_table[i]=0 end end
if wlan0_down == nil then wlan0_down=0 end
for i = 1, tonumber(table_length) do
            if wlan0_down_table[i+1]==nil then wlan0_down_table[i+1]=0 end
wlan0_down_table[i]=wlan0_down_table[i+1]
            if i==table_length then
            wlan0_down_table[table_length]=wlan0_down
            end
end
if wlan0_up == nil then wlan0_up=0 end
for i = 1, tonumber(table_length) do
            if wlan0_up_table[i+1]==nil then wlan0_up_table[i+1]=0 end
wlan0_up_table[i]=wlan0_up_table[i+1]
            if i==table_length then
            wlan0_up_table[table_length]=wlan0_up
            end
end
wlan0_down_table_high=0
wlan0_down_table_scale=0
for i = 1,table_length do if wlan0_down_table[i] > wlan0_down_table_high then wlan0_down_table_high=wlan0_down_table[i] end end
for i = 1,100 do if wlan0_down_table_high >= ((i-1)*100) then wlan0_down_table_scale=i*100 end end
wlan0_up_table_high=0
wlan0_up_table_scale=0
for i = 1,table_length do if wlan0_up_table[i] > wlan0_up_table_high then wlan0_up_table_high=wlan0_up_table[i] end end
for i = 1,100 do if wlan0_up_table_high >= ((i-1)*100) then wlan0_up_table_scale=i*100 end end
end
--mount.lua
function conky_get_mounted_data(interval)
--[[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}

]]
if interval == nil then interval=10 end
local updates=tonumber(conky_parse("${updates}"))
if update == 1 then conky_start=1 else conky_start=0 end
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
--for use with "conky_get_mounted_data"
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

You can find my work here

Make everything ok button

Offline

#7545 2014-05-20 15:01:38

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

Re: Conky v1.9 Thread

Are you guys talking about this Conky Manager?

I tried it.  It has some nice conkys but I still had to tweak quite a few of them manually anyway.

OPINION:

I prefer using
- "ssc" scripts to Start/Stop conkys - run it: the conky or conkys are on - run again and it or they are off (OB Menu entries)
- a similar script starts multiple conkys on boot, running it again will kill them all and restart them immediately.
- - good for when I run a bunch od test conkys and want to get back to normal.  big_smile
- - - yea yea, define nromal

Or a zenity script I {cough cough} borrowed from "Voyager Linuxbig_smile

I call it: start-em, here's the original I found:

#!/bin/sh
# License GPL
# by rodofr - Voyager Live
# http://ubuntuforums.org/showthread.php?t=1330313
# now dead and gone --- or --- here - not sure
# http://linux.voyage.hk/
	# Display the action selector
	RET=`yad --list --title "Conky" --checklist --width=280 --height=600 \
		--column "Select" --column "Conky to Start | Stop" \
		FALSE	"Kill-All" \
		FALSE 	"01 Clementine-OV" \
		FALSE 	"02 Clementine-WV" \
		FALSE	"03 HD-Orange" \
		FALSE	"04 HD-Gray" \
		FALSE	"05 Delta-Orange" \
		FALSE	"06 HUD" \
		FALSE	"07 ConkyNotes" \
		FALSE	"08 ConkyZoe" \
		FALSE	"09 ConkyBox" \
		FALSE	"10 DateHD" \
		FALSE	"11 Date-Hour"\
		FALSE	"12 ConkyRss"\
		FALSE	"13 ConkyRss2"\
		FALSE	"14 ConkyCercle" \
		FALSE	"15 Conky-all-gray" \
		FALSE	"16 Conky-Update" \
		FALSE	"17 ConkyBar" \
		FALSE	"18 ConkyLarge" \
		FALSE	"19 ConkyCore" \
		FALSE	"20 ConkyUbuntu" \
		FALSE	"21 ConkyCore2" \
		FALSE	"Kill-All"`

	if echo "$RET" | grep "Kill-All"; then
		exec ~/Konky/scripts/Conky-all-Stop &
	fi
	if echo "$RET" | grep "01 Clementine-OV"; then
		exec ~/Konky/scripts/Clementine-OV &
	fi
	if echo "$RET" | grep "02 Clementine-WV"; then
		exec ~/Konky/scripts/Clementine-WV &
	fi
	if echo "$RET" | grep "03 HD-Orange"; then
		exec ~/Konky/scripts/HD-Orange &
	fi
	if echo "$RET" | grep "04 HD-Gray"; then
		exec ~/Konky/scripts/HD-Gray &
	fi
	if echo "$RET" | grep "05 Delta-Orange"; then
		exec ~/Konky/scripts/Delta-Orange &
	fi
	if echo "$RET" | grep "06 HUD"; then
		exec ~/Konky/scripts/HUD &
	fi
	if echo "$RET" | grep "07 ConkyNotes"; then
		exec ~/Konky/scripts/ConkyNotes &
	fi
	if echo "$RET" | grep "08 ConkyZoe"; then
		exec ~/Konky/scripts/ConkyZoe &
	fi
	if echo "$RET" | grep "09 ConkyBox"; then
		exec ~/Konky/scripts/ConkyBox &
	fi
	if echo "$RET" | grep "10 DateHD"; then
		exec ~/Konky/scripts/DateHD &
	fi
	if echo "$RET" | grep "11 Date-Hour"; then
		exec ~/Konky/scripts/Date-Hour &
	fi
	if echo "$RET" | grep "12 ConkyRss"; then
		exec ~/Konky/scripts/ConkyRss &
	fi
	if echo "$RET" | grep "13 ConkyRss2"; then
		exec ~/Konky/scripts/ConkyRss2 &
	fi
	if echo "$RET" | grep "14 ConkyCercle"; then
		exec ~/Konky/scripts/ConkyCercle &
	fi
	if echo "$RET" | grep "15 Conky-all-gray"; then
		exec ~/Konky/scripts/Conky-all-gray &
	fi
	if echo "$RET" | grep "16 Conky-Update"; then
		exec ~/Konky/scripts/Conky-Update &
	fi
	if echo "$RET" | grep "17 ConkyBar"; then
		exec ~/Konky/scripts/ConkyBar &
	fi
	if echo "$RET" | grep "18 ConkyLarge"; then
		exec ~/Konky/scripts/ConkyLarge &
	fi
	if echo "$RET" | grep "19 ConkyCore"; then
		exec ~/Konky/scripts/ConkyCore &
	fi
	if echo "$RET" | grep "20 ConkyUbuntu"; then
		exec ~/Konky/scripts/ConkyUbuntu &
	fi
	if echo "$RET" | grep "21 ConkyCore2"; then
		exec ~/Konky/scripts/ConkyCore2 &
	fi
	if echo "$RET" | grep "Kill-All"; then
		exec ~/Konky/scripts/Conky-all-Stop &
	if [ $? -eq 1 ];then exit; fi; fi

# Finish
fi

2014_05_20_11_51_17_895x742_Sector11.jpg
IF I tried that with all my conkys the list would go on forever.  However I use it for a select few.  smile

Now since this is a conky thread .... my normal stuff on Desktop 1 today:
2014_05_20_11_59_07_1920x1080_Sector11.jpg


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

Offline

#7546 2014-05-20 16:14:47

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

Re: Conky v1.9 Thread

I think conky-tool is in repos... I use this one because of his function add conky in autostart or not. really nice !
1400602348.png
It's also in my sig

Offline

#7547 2014-05-20 19:19:12

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

Re: Conky v1.9 Thread

ragamatrix wrote:

I think conky-tool is in repos... I use this one because of his function add conky in autostart or not. really nice !
http://pix.tdct.org/upload/thumb/1400602348.png
It's also in my sig


Nope not in the Debian repos ...and not in #! Waldorf repos
However ... it is in your sig ... and now on my HDD.  cool

Thanks, now I have to check that out.
Thank benoitfra for me, what else does he have in http://crunchbanglinux-fr.org/goodies ????

BTW, I would love that wall #! minion wall  big_smile


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

Offline

#7548 2014-05-20 22:54:30

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: Conky v1.9 Thread

English translation of gui not code thou I missed launch (lancer), still not sure where it is.


You can find my work here

Make everything ok button

Offline

#7549 2014-05-21 14:19:24

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

Re: Conky v1.9 Thread

Sector11 wrote:
ragamatrix wrote:

I think conky-tool is in repos... I use this one because of his function add conky in autostart or not. really nice !
http://pix.tdct.org/upload/thumb/1400602348.png
It's also in my sig


Nope not in the Debian repos ...and not in #! Waldorf repos
However ... it is in your sig ... and now on my HDD.  cool

Thanks, now I have to check that out.
Thank benoitfra for me, what else does he have in http://crunchbanglinux-fr.org/goodies ????

BTW, I would love that wall #! minion wall  big_smile

Hi;
I don't know about the bug address url on the french #! but if you're interested in goodies like the Crunch_Control_Center.py script or the ob theme changer, the compiz session stand-alone you can watch : http://crunchbang-fr.org/forum/viewtopi … 850#p28850
http://crunchbang-fr.org/forum/viewtopi … 204#p28204
http://shovel-crew.org/index.php?articl … iz-emerald
And about the minion wall I just put png's on a color background... really simple wink
1400681851.jpg
and the Swiss one you'll like:
1400681939.jpg

Offline

Help fund CrunchBang, donate to the project!

#7550 2014-05-21 18:03:22

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

Re: Conky v1.9 Thread

ragamatrix wrote:

And about the minion wall I just put png's on a color background... really simple wink
http://pix.tdct.org/upload/thumb/1400681851.jpg
and the Swiss one you'll like:
http://pix.tdct.org/upload/thumb/1400681939.jpg


Thanks for the links - and the Swiss wall as well.  My wife loves these little guys ... and they are kinda cute.  big_smile


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

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