Posta il tuo .conkyrc & png ""Leggete in 1°Pagina conkyForecast""

Il ritrovo della comunità dove confrontarsi e discutere sulle notizie dal mondo dell'informatica, di Ubuntu e di tutto quello che la riguarda, novità, pettegolezzi e quant'altro.
Avatar utente
Diabolik62
Tenace Tecnocrate
Tenace Tecnocrate
Messaggi: 16046
Iscrizione: domenica 20 dicembre 2009, 16:29
Distribuzione: wind 10049 archfce4.12

Re: Posta il tuo .conkyrc & png

Messaggio da Diabolik62 »

l'hai reso eseguibile?
dai questo comando
sudo chmod a+x conkyForecast.py
ame esce cosi il conky
e mi manca un sh ip
Immagine
Avatar utente
Bigre
Prode Principiante
Messaggi: 175
Iscrizione: giovedì 10 settembre 2009, 22:03

Re: Posta il tuo .conkyrc & png

Messaggio da Bigre »

quel comando l'ho dato.. già prima funzionava, ma continuando a darmi queste righe d'errore ho pensato che c'era qualcosa che non andava..
e cosa sarebbe questo sh ip?
come potrei aggiungerlo?
Avatar utente
Diabolik62
Tenace Tecnocrate
Tenace Tecnocrate
Messaggi: 16046
Iscrizione: domenica 20 dicembre 2009, 16:29
Distribuzione: wind 10049 archfce4.12

Re: Posta il tuo .conkyrc & png

Messaggio da Diabolik62 »

cercalo dove hai preso il conky  :-[ :(
deegan
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 2639
Iscrizione: lunedì 28 aprile 2008, 12:42
Distribuzione: Ubuntu 20.04
Sesso: Maschile
Località: Varese

Re: Posta il tuo .conkyrc & png

Messaggio da deegan »

Ecco come viene!!!  8)

Solo che avviando Rhythmbox la barra del spectrum non fà una piega........... >:(

Immagine

Codice: Seleziona tutto

# — SETTINGS — #
background no
update_interval 0.1    #0.5
cpu_avg_samples 2
net_avg_samples 2
double_buffer yes
no_buffers yes
text_buffer_size 1920
imlib_cache_size 0

# — WINDOW — #
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

# — BORDER — #
border_inner_margin 1
border_outer_margin 0

# — SIZE — #
minimum_size 1920
maximum_width 1920

# — ALIGNMENT — #
alignment bottom_left
gap_x 4
gap_y -10

# — GRAPHIC — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
#default_bar_size 40 8
#default_shade_color
own_window_colour 333

# — TEXT — #
use_xft yes
xftfont Dejavu Sans:size=8:condensed
xftalpha 1.0
uppercase no
override_utf8_locale yes
default_color ecedee

# — Colors — # 
color1 606060


# -- Lua Load -- # conky -c ~/audio_spectrum1.2/conkyrc


lua_load  $HOME/audio_spectrum1.2/audio_spectrum.lua


#arguments for the spectrum function are:
#theme		: default, circle or widget
#x, y		: (from top left corner of conky window)
			  #x,y are left bottom of graph for default or widget
			  #x,y are center of circle for circle _equalizer
#fft 		: (0/1) 1 to perfom a FTT analysis on audio
#nb_cols 	: (1-255)
#col_width	: (>0)	  
#col_spacing: (>=0)
#nb_rows	: (>0)
#row_height	: (>0)
#row_spacing: (>=0), 

#next arguments are only for default and circle 
#bar_color		: color of bars in the graph
#bar_alpha		: (0-1) alpha of bars in the graph
#peak_color		: color for peak in the graph
#peak_alpha		:(0-1)

#next argument is only for circle and for widget on circle
#radius 		: (>0) radius of circle



# reminder, arguments on one line:
# x,y, fft, nb_cols, col_width,col_spacing,nb_rows,row_height,row_spacing [,bar_color,bar_alpha,peak_color, peak_alpha [, radius]]


##### DON'T USE TABULATION BETWEEN ARGUMENTS, JUST SPACES #####

#example for a circle
#lua_draw_hook_pre spectrum   circle   1150 100   1   100 10 2   100 2 2   0000FF 0.5 FF0000 1   25
lua_draw_hook_pre spectrum   circle   1650 40   1   20 10 2    20 5 0    0000FF 0.5 FF0000 1   25

#example for a bar graph
#lua_draw_hook_pre spectrum    default  1150 100    1   50 10 2    10 5 2    FF00FF 0.5 FFFF00 1

#for bargraph widget, colors and other parameters have to be set in the spectrum function in the lua script
#because they are too many
#bargraph widget on circle
#lua_draw_hook_pre spectrum widget 200 200 1 25 10 0 10 5 -1 nil nil nil nil 25
#bargraph widget on line
#lua_draw_hook_pre spectrum widget 10 300 1 20 10 1 10 4 1 
#lua_draw_hook_pre spectrum widget 10 300 1 30 10 2 20 5 2   

#lua_draw_hook_pre mytest
TEXT

Codice: Seleziona tutto

deegan@lucid-lynx:~$ conky -c ~/audio_spectrum1.2/conkyrc
Conky: desktop window (22000b8) is subwindow of root window (a5)
Conky: window type - override
Conky: drawing to created window (0x3800001)
Conky: drawing to double buffer
audio_spectrum.lua

Codice: Seleziona tutto

require 'cairo'

--[[AUDIO SPECTRUM ANALYSER by wlourf 10 March 2010 http://u-scripts.blogspot.com/
	It use some librairies and some portions of code from Impulse Screenlet for gnome.
	Thanks to Ian Halpern http://impulse.ian-halpern.com/ for this ;-)
	
	Requirements
	libfftw3-3 libpulse0
	
	You also need impulse.so and libimpulse.so from Impulse project (they are in the equalizer.tar.gz archive)
	Save them in this script folder.
	
	(The impulse library creates a pulse audio connection context that reads the output stream from pulseaudio 
	in a thread natively which can then be read from python.
	You can specify impulse to either output the raw stream or output the fft of the raw stream.)
	
	v1.0 21 Feb. 2010 
	v1.1 28 Feb. 2010 integration of Bargraph widget + use of a pipe for the python script
	v1.2 10 March 2010 integration of Bargraph widget 1.3 with circular widget
	  				   the conky can be call with absolute path : conky -c /path/conkyrc
]]



--[[ BARGRAPH WIDGET
	v1.3 by wlourf (03 march 2010)
	This widget draw a simple bar like (old) equalizers on hi-fi systems.
	http://u-scripts.blogspot.com/
	
	The arguments are :
	- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'...
	  or you can set it to "" if you want to display a numeric value with arg=numeric_value
    - "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. 
      If you would not use an argument in the Conky variable, use ''.
	- "max" is the maximum value of the bar. If the Conky variable outputs a percentage, use 100.
	- "nb_blocks" is the umber of block to draw
	- "cap" id the cap of a block, possibles values are CAIRO_LINE_CAP_ROUND , CAIRO_LINE_CAP_SQUARE or CAIRO_LINE_CAP_BUTT
	  see http://www.cairographics.org/samples/set_line_cap/
	- "xb" and "yb" are the coordinates of the bottom left point of the bar, or the center of the circle if radius>0
	- "w" and "h" are the width and the height of a block (without caps), w has no effect for "circle" bar
	- "space" is the space betwwen two blocks, can be null or negative
	- "bgc" and "bga" are background colors and alpha when the block is not LIGHT OFF
	- "fgc" and "fga" are foreground colors and alpha when the block is not LIGHT ON
	- "alc" and "ala" are foreground colors and alpha when the block is not LIGHT ON and ALARM ON
	- "alarm" is the value where blocks LIGHT ON are in a different color (values from 0 to 100)
	- "led_effect" true or false : to show a block with a led effect
	- "led_alpha" alpha of the center of the led (values from 0 to 1)
	- "smooth" true or false : colors in the bar has a smooth effect
	- "mid_color",mid_alpha" : colors of the center of the bar (mid_color can to be set to nil)
	- "rotation" : angle of rotation of the bar (values are 0 to 360 degrees). 0 = vertical bar, 90 = horizontal bar
	- "radius" : draw the bar on a circle (it's no more a circle, radius = 0 to keep bars)
	- "angle_bar"  : if radius>0 angle_bar is the angle of the bar
v1.0 (10 Feb. 2010) original release
v1.1 (13 Feb. 2010) numeric values can be passed instead conky stats with parameters name="", arg = numeric_value	
v1.2 (28 Feb. 2010) just renamed the widget to bargraph
v1.3 (03 March 2010) added parameters radius & angle_bar to draw the bar in a circular way
]]


function bar_graph(name, arg, max, nb_blocks, cap, xb, yb, w, h, space, bgc, bga, fgc, fga,alc,ala,alarm,led_effect,led_alpha,smooth,mid_color,mid_alpha,rotation,radius, angle_bar)
 	local function rgb_to_r_g_b(colour, alpha)
		return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
	end

	local function setup_bar_graph()

		local value = 0
		if name ~="" then
			local str = conky_parse(string.format('${%s %s}', name, arg))
			value = tonumber(str)
		else
			value = arg
		end
		if value==nil then value =0 end
		local pct = 100*value/max
		local pcb = 100/nb_blocks
		
		cairo_set_line_width (cr, h)
		cairo_set_line_cap  (cr, cap)
		
		local angle_rot= rotation*math.pi/180
		local alpha_bar = (angle_bar*math.pi/180)/2
		for pt = 1,nb_blocks do  
			local light_on=false
			--set colors
			local col,alpha = bgc,bga
			if pct>=(100/nb_blocks/2) then --start after an half bloc
				if pct>=(pcb*(pt-1)) then 
					light_on=true
					col,alpha = fgc,fga
					if pct>=alarm and (pcb*pt)>alarm then col,alpha = alc,ala end
				end
			end

			--vertical points
			local x1=xb
			local y1=yb-pt*(h+space)
			local radius0 = yb-y1
	
			local x2=xb+radius0*math.sin(angle_rot)
			local y2=yb-radius0*math.cos(angle_rot)
			
			--line on angle_rot
			local a1=(y2-yb)/(x2-xb)
			local b1=y2-a1*x2

			--line perpendicular to angle_rot
			local a2=-1/a1
			local b2=y2-a2*x2
			
			--dots on perpendicular
			local xx0,xx1,yy0,yy1=0,0,0,0
			if rotation == 90  or rotation == 270 then
				xx0,xx1=x2,x2
				yy0=yb
				yy1=yb+w
			else
				xx0,xx1=x2,x2+w*math.cos(angle_rot)
				yy0=xx0*a2+b2
				yy1=xx1*a2+b2
			end

			local xc,yc
			--perpendicular segment
			if alpha_bar == 0 then
				cairo_move_to (cr, xx0 ,yy0)
				cairo_line_to (cr, xx1 ,yy1)
				xc,yc=(xx0+xx1)/2,(yy0+yy1)/2
			else			
				cairo_arc( cr,
					xb,
					yb,
					radius+(h+space)*(pt)-h/2,
					( -alpha_bar -math.pi/2+angle_rot) ,
					( alpha_bar -math.pi/2+angle_rot) 
				)
				xc=xb+	(radius+(h+space)*(pt))*math.sin(angle_rot)
				yc=yb-	(radius+(h+space)*(pt))*math.cos(angle_rot)			
			end
		
			--colors
			if light_on and led_effect then
				local pat = cairo_pattern_create_radial (xc, yc, 0, xc,yc,w/1.5)
				cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col,led_alpha))
				cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col,alpha))
				cairo_set_source (cr, pat)
				cairo_pattern_destroy(pat)
			else
				cairo_set_source_rgba(cr, rgb_to_r_g_b(col,alpha))
			end 

			if light_on and smooth then
				local radius = (nb_blocks+1)*(h+space)
				if pt==1 then 
					xc0,yc0=xc,yc --remember the center of first block
				end
				cairo_move_to(cr,xc0,yc0)
				local pat = cairo_pattern_create_radial (xc0, yc0, 0, xc0,yc0,radius)
				cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(fgc,fga))
				cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(alc,ala))
				if mid_color ~=nil then
					cairo_pattern_add_color_stop_rgba (pat, 0.5,rgb_to_r_g_b(mid_color,mid_alpha))
				end
				cairo_set_source (cr, pat)
				cairo_pattern_destroy(pat)
			end 
		
			cairo_stroke (cr);

		end
	end
	
	--prevent segmentation error
	local updates=tonumber(conky_parse('${updates}'))
	if updates> 3 then
		setup_bar_graph()
	end	
end



-----------------------END OF BARGRAPH WIDGET --------------------







------------[[ two useful functions ]]------------------

function string:split(delimiter)
  local result = { }
  local from  = 1
  local delim_from, delim_to = string.find( self, delimiter, from  )
  while delim_from do
    table.insert( result, string.sub( self, from , delim_from-1 ) )
    from  = delim_to + 1
    delim_from, delim_to = string.find( self, delimiter, from  )
  end
  table.insert( result, string.sub( self, from  ) )
  return result
end



function rgb_to_r_g_b(colour,alpha)
	return {((colour / 0x10000)% 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255.,alpha}
end

------------[[ end of two useful functions ]]------------------



------------ HERE ARE THE THEMES -----------------------------
---------Function which call the bargraph widget

function draw_widget(x,y,audio_sample_array,n_cols,col_width,col_spacing, n_rows, row_height , row_spacing,radius)

	local blocks = 20
	local cap_round = CAIRO_LINE_CAP_ROUND
	local cap_square = CAIRO_LINE_CAP_SQUARE
	local cap_butt = CAIRO_LINE_CAP_BUTT
	local w,h=col_width,row_height
	local s=row_spacing
	local bgc,bga = 0x666666, 0.5
	local fgc,fga = 0x0000FF, 1
	local alc,ala = 0xFF0000, 1
	local mid_color,mid_alpha = 0xFFFF00, 1.0
	local led_effect, led_alpha = true ,  1.0
	local alarm = 80
	local smooth = true
	local angle_rot = 0
	local angle_bar=360/n_cols

	freq = #audio_sample_array / n_cols
	
	last_i=1
	local col_n=0
	
	for i=math.floor(freq),#audio_sample_array, freq do 

		i=math.floor(i)
		--sometimes first col = 1, first col has to be set to 0 with the offset "col_min" 
		col = math.floor(i / freq)
		if i==math.floor(freq) then col_min = col end
		col=col-col_min

		--sum all the frequencies in the range
		local sum=0
		local idx=0
		for j=last_i,i do
			if audio_sample_array[j] == nil then audio_sample_array[j]=0 end
			sum=sum+audio_sample_array[j]
			idx=idx+1
		end
		--sum = sum / (i-last_i+1)
		if sum>1 then sum=1 end
		last_i=i+1
		rows = math.floor( sum * n_rows )

		if rows > peak_heights[i] then
			peak_heights[i] = rows
			peak_acceleration[i] = 0
		else
			peak_acceleration[ i ] = peak_acceleration[ i ] + .1
			peak_heights[ i ] = peak_heights[ i ] - peak_acceleration[ i ]
		end
		
		if peak_heights[ i ] < 0 then
			peak_heights[ i ] = 0
		end

		local xb=x + col_n * ( w+col_spacing )
		local yb=y -- h+row_spacing 
	
		--reminder bar_graph(name, arg, max, nb_blocks, cap, xb, yb, w, h, space, bgc, bga, fgc, fga,alc,ala,alarm,led_effect,led_alpha,
		--		smooth,mid_color,mid_alpha,rotation,radius,angle_bar)		
		if radius==nil then radius=0 end
		if radius==0 then
		bar_graph('', rows, n_rows, blocks, cap_butt, xb, yb, w, h, row_spacing, bgc, bga, fgc, fga,alc,ala,alarm,led_effect,led_alpha,
				smooth,mid_color,mid_alpha,angle_rot,0,0)
		else
			bar_graph('', rows, n_rows, blocks, cap_butt, x, y, w, h, row_spacing, bgc, bga, fgc, fga,alc,ala,alarm,led_effect,led_alpha,
				smooth,mid_color,mid_alpha,angle_rot,radius,angle_bar)
			angle_rot=angle_rot+angle_bar
		end		
		col_n=col_n+1
	end
	
end




--Function which draw the circle equalizer

function draw_circle_lcd(x,y,radius,audio_sample_array,n_cols,col_width,col_spacing, n_rows, row_height , row_spacing , bar_ca, peak_ca, radius)

	freq = #audio_sample_array / n_cols
	l = #audio_sample_array
	last_i=1
	
	cairo_set_line_width(cr, row_height)

	for i=1, n_cols do  

		--sum all the frequencies in the range
		local sum=0
		for j=last_i,i*freq do
			j=math.floor(j)
			if audio_sample_array[j] == nil then audio_sample_array[j]=0 end
			sum=sum+audio_sample_array[j]
		end
		last_i=i*freq+1
		if sum>1 then sum=1 end
		rows = math.floor( sum * n_rows )

		cairo_set_source_rgba(cr, bar_ca[ 1 ], bar_ca[ 2 ], bar_ca[ 3 ], bar_ca[ 4 ] )

		if rows > peak_heights[i] then
			peak_heights[i] = rows
			peak_acceleration[i] = 0
		else
			peak_acceleration[ i ] = peak_acceleration[ i ] + .1
			peak_heights[ i ] = peak_heights[ i ] - peak_acceleration[ i ]
		end
		if peak_heights[ i ] < 0 then
			peak_heights[ i ] = 0
		end
		--print (sum, n_rows, rows)
		for row=0,rows do
			cairo_arc( cr,
				x,
				y,
				radius+(row_height+row_spacing)*(row+1),
				( math.pi*2 / n_cols ) * ( i + col_spacing/col_width),
				( math.pi*2 / n_cols ) * ( i + 1 )
			)
			cairo_stroke(cr)
		end
		cairo_set_source_rgba(cr, peak_ca[ 1 ], peak_ca[ 2 ], peak_ca[ 3 ], peak_ca[ 4 ] )
			cairo_arc( cr,
				x,
				y,
				radius+(row_height+row_spacing)*(1+peak_heights[ i ]) , --(rows+1),
				( math.pi*2 / n_cols ) * ( i + col_spacing/col_width),
				( math.pi*2 / n_cols ) * ( i + 1 )
			)

		cairo_stroke(cr)
	end
end

---fucntion which draw a regular equalizer

function draw_default(x,y,audio_sample_array,n_cols,col_width,col_spacing, n_rows, row_height , row_spacing , bar_ca, peak_ca)

	freq = #audio_sample_array / n_cols
	
	last_i=1
	
	for i=math.floor(freq),#audio_sample_array, freq do 

		i=math.floor(i)
		--sometimes first col = 1, first col has to be set to 0 with the offset "col_min" 
		col = math.floor(i / freq)
		if i==math.floor(freq) then col_min = col end
		col=col-col_min

		--sum all the frequencies in the range
		
		local sum=0
		local idx=0
		for j=last_i,i do
			if audio_sample_array[j] == nil then audio_sample_array[j]=0 end
			sum=sum+audio_sample_array[j]
			idx=idx+1
		end
		if sum>1 then sum=1 end
		last_i=i+1
		rows = math.floor( sum * n_rows )

		cairo_set_source_rgba(cr, bar_ca[ 1 ], bar_ca[ 2 ], bar_ca[ 3 ], bar_ca[ 4 ] )

		if rows > peak_heights[i] then
			peak_heights[i] = rows
			peak_acceleration[i] = 0
		else
			peak_acceleration[ i ] = peak_acceleration[ i ] + .1
			peak_heights[ i ] = peak_heights[ i ] - peak_acceleration[ i ]
		end
		if peak_heights[ i ] < 0 then
			peak_heights[ i ] = 0
		end

		for row=0,rows do
			cairo_rectangle(cr,
				x + col * ( col_width + col_spacing ),
				y - row * ( row_height + row_spacing ),
				col_width, -row_height
			)
		end
		cairo_fill(cr )
		cairo_set_source_rgba(cr, peak_ca[ 1 ], peak_ca[ 2 ], peak_ca[ 3 ], peak_ca[ 4 ] )

		cairo_rectangle(cr,
			x + col * ( col_width + col_spacing ),
			y - peak_heights[ i ] * ( row_height + row_spacing ),
			col_width, -row_height
		)

		cairo_fill(cr )
	end
end


--End of 'themes'




--Main function here

function conky_spectrum(theme, x, y, fft, n_cols, col_width, col_spacing, n_rows, row_height, row_spacing, bar_color, bar_alpha, peak_color, peak_alpha,radius)
	if conky_window == nil then return end
	
	
	--this is a global variable
	if impulse_pipe == nil then
		local s=conky_config
		local pos=(s:reverse(s)):find("/")
		if pos==nil then pos=0 end
		lua_script_dir= s:sub(1 ,#s-pos+1)

		impulse_pipe = io.popen('python ' .. lua_script_dir .. 'impulse.py ' .. fft .. ' ' .. lua_script_dir, "r")

		peak_heights = {}
		peak_acceleration = {}
		for i =1,255 do
			peak_heights[i] = 0
			peak_acceleration[i] = 0
		end	

	end
	
	local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
	cr = cairo_create(cs)

	local impulse =  impulse_pipe:read()
	--print (impulse)
	
	if impulse=="-1" then
		print ("Argument missing")
	else
		if bar_color  == "nil" then bar_color = nil  end
		if bar_alpha  == "nil" then bar_alpha = nil  end
		if peak_color == "nil" then peak_color = nil end
		if peak_alpha == "nil" then peak_alpha = nil end
		
		if bar_color ~=nil and bar_alpha ~=nil then
			bar_color_alpha= rgb_to_r_g_b("0x" .. bar_color,bar_alpha)
		end
		if peak_color ~=nil and peak_alpha ~=nil then
			peak_color_alpha= rgb_to_r_g_b("0x" .. peak_color,peak_alpha)
		end
		
		impulse=string.sub(impulse, 2, -2)
		local audio_sample_array = string.split(impulse,",")

		if theme=="circle" then
			draw_circle_lcd(x,y,radius,audio_sample_array,n_cols,col_width,col_spacing, n_rows, row_height ,
				row_spacing , bar_color_alpha, peak_color_alpha,radius)
		elseif theme=="widget" then
			draw_widget (x,y,audio_sample_array,n_cols,col_width,col_spacing, n_rows, row_height , row_spacing, radius)
		else
			draw_default(x,y,audio_sample_array,n_cols,col_width,col_spacing, n_rows, row_height , row_spacing , 
				bar_color_alpha, peak_color_alpha)
		end

	end
	
	cairo_destroy(cr)
	cairo_surface_destroy(cs)
		
end
impulse.py

Codice: Seleziona tutto

#!/usr/bin/env python

import sys,os

if __name__ == "__main__":

	if len(sys.argv)!=3:
		print -1
	else:
		os.chdir(sys.argv[2])
		import  impulse
		fft=(sys.argv[1]=="1")
		while True:
			print impulse.getSnapshot( fft )
Ultima modifica di deegan il giovedì 29 aprile 2010, 18:08, modificato 1 volta in totale.
MB* ASUS TUF Gaming Z690 SV* EVGA RTX 3080 Ti CPU* i7-12700K
RAM* Vengeance RGB PRO 32GB 3600MHz SSD* Samsung 980 PRO 2TB
Avatar utente
Jaguaro
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 299
Iscrizione: martedì 9 febbraio 2010, 10:25
Località: Prealpi
Contatti:

Re: Posta il tuo .conkyrc & png

Messaggio da Jaguaro »

Diabolik62 ha scritto:
Jaguaro ha scritto: ciao,

mi date qualche instradamento "infarinatura" per LUA


sono in alto mare

dove scarico
cosa devo installare
che file modificare o smanettare


grazie

ciao

J.
devi solo inserire il percorso del lua prima di TEXT
postami un esempio che non ho capito...probabilmente leggiucchiando qua e la ho fatto parecchia confusione,

l'idea (probabilmente confusa) che mi ero fatto è che dovevo scarica qualcosa, e creare un file a sè per il LUA con un'altra estensione.

grazie di tutto

ciao

J.
http://mountaincafe.altervista.org/ ---- www.verticalmente.net

Fin al quaranta de masc bisogna minga mùla i strasc...:-D
deegan
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 2639
Iscrizione: lunedì 28 aprile 2008, 12:42
Distribuzione: Ubuntu 20.04
Sesso: Maschile
Località: Varese

Re: Posta il tuo .conkyrc & png

Messaggio da deegan »

Jaguaro ha scritto:
Diabolik62 ha scritto:
Jaguaro ha scritto: ciao,

mi date qualche instradamento "infarinatura" per LUA


sono in alto mare

dove scarico
cosa devo installare
che file modificare o smanettare


grazie

ciao

J.
devi solo inserire il percorso del lua prima di TEXT
postami un esempio che non ho capito...probabilmente leggiucchiando qua e la ho fatto parecchia confusione,

l'idea (probabilmente confusa) che mi ero fatto è che dovevo scarica qualcosa, e creare un file a sè per il LUA con un'altra estensione.

grazie di tutto

ciao

J.

lua_load  $HOME/percorso/tuo file.lua
TEXT
MB* ASUS TUF Gaming Z690 SV* EVGA RTX 3080 Ti CPU* i7-12700K
RAM* Vengeance RGB PRO 32GB 3600MHz SSD* Samsung 980 PRO 2TB
MadnessMike
Prode Principiante
Messaggi: 60
Iscrizione: sabato 8 novembre 2008, 16:53

Re: Posta il tuo .conkyrc & png

Messaggio da MadnessMike »

Nulla di elaborato; ma tutte le stringhe sono in dialetto veneto, il che lo fa incredibilmente "boaro" :D

Immagine

Codice: Seleziona tutto

# border margins
border_margin 5

# border width
border_width 1

# Default colors and also border colors
default_color white
#default_shade_color white
#default_outline_color white
own_window_colour white
color1 white
color2 yellow
color3 black
color4 grey
color5 green
color6 purple
color7 red
color8 blue
color9 pink

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 35
gap_y 30

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer none

TEXT
${color4}CHE ORA XE? ${color}${hr 2}
${voffset 200}
${color4}CÀSSEŁOTO ${color}${hr 2}
${voffset 2}${font OpenLogos:size=16}u${font}  Rilassio:  ${alignr}Ubuntu 10.04 (lucid)
${voffset 2}${font OpenLogos:size=16}t${font}  Kernel:  ${alignr}${kernel}
${voffset 4}${font StyleBats:size=16}A${font}  Torsoło uno: ${alignr}${cpu cpu1}%  ${cpugraph cpu1 8,130}
${voffset 4}${font StyleBats:size=16}A${font}  Torsoło do: ${alignr}${cpu cpu2}%  ${cpugraph cpu2 8,130}
${voffset 4}${font StyleBats:size=16}Y${font}  Memoria:${alignr}${memperc}%  ${membar 8,130}${color}
${voffset 4}${font StyleBats:size=16}J${font}  Suàp:   ${alignr}${swapperc}%  ${swapbar 8,130}${color}

${color4}TÓNDOŁI ${color}${hr 2}
${voffset 4}${font StyleBats:size=16}J${font}   ${voffset -5}Topinàre:
${voffset 4}${fs_used /home}/${fs_size /home}${alignr}${fs_bar 8,130 /home}${color}
${font StyleBats:size=16}J${font}   ${voffset -5}Raìxe:
${voffset 4}${fs_used /}/${fs_size /}${alignr}${fs_bar 8,130 /}${color}
#${font StyleBats:size=16}J${font}   ${voffset -5}Altre robe:
#${voffset 4}${fs_used /media/Shared}/${fs_size /media/Shared}${alignr}${fs_bar 8,70 /media/Shared}${color}

${color4}SCARPÌA ${color}${hr 2}
${voffset 2}${font PizzaDude Bullets:size=14}v${font}  Su: ${alignr}${upspeedf eth0} KiB/s  ${upspeedgraph eth0 8,130}
${voffset 4}${font PizzaDude Bullets:size=14}r${font}  Zo: ${alignr}${downspeedf eth0} KiB/s  ${downspeedgraph eth0 8,130}
${voffset 4}${font PizzaDude Bullets:size=14}M${font}  Cargài: ${alignr}${totalup eth0}
${voffset 4}${font PizzaDude Bullets:size=14}S${font}  Scargài: ${alignr}${totaldown eth0}

${color4}ŁA PERLA DE NONO BEPI ${color}${hr 2}
${voffset 2}${execi 120 fortune -s | fold -w48}
Avatar utente
Diabolik62
Tenace Tecnocrate
Tenace Tecnocrate
Messaggi: 16046
Iscrizione: domenica 20 dicembre 2009, 16:29
Distribuzione: wind 10049 archfce4.12

Re: Posta il tuo .conkyrc & png

Messaggio da Diabolik62 »

@deegancome hai fattto
a far funzionare lo spectrum
deegan
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 2639
Iscrizione: lunedì 28 aprile 2008, 12:42
Distribuzione: Ubuntu 20.04
Sesso: Maschile
Località: Varese

Re: Posta il tuo .conkyrc & png

Messaggio da deegan »

Non funziona nulla....
Si lo spectrum mi viene visualizzato nel conky, ma avviando:

Rhythmbox
Vlc
You Tube

Non dà nessun movimento.... (nono)
Diabolik62 ha scritto: @deegan come hai fattto
a far funzionare lo spectrum

Codice: Seleziona tutto

conky -c /home/deegan/.scripts/equalizzatore/conkyrc 
    ;)
MB* ASUS TUF Gaming Z690 SV* EVGA RTX 3080 Ti CPU* i7-12700K
RAM* Vengeance RGB PRO 32GB 3600MHz SSD* Samsung 980 PRO 2TB
Nickname.
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 611
Iscrizione: sabato 4 luglio 2009, 18:34

Re: Posta il tuo .conkyrc & png

Messaggio da Nickname. »

Ho preso il solito file conkyrc che uso sempre e ho modificato quello che viene dopo TEXT . . . . . ma questa volta capita che, in modo casuale, intorno al conky compare per un istante un rettangolo nero, che ha le stesse dimensioni.

Non credo dipenda dal refresh, perché non lo fa costantemente. . .

Potete dare un' occhiata al file? Grazie ;)

Codice: Seleziona tutto

# ${addr eth0} 
 
# set to yes if you want Conky to be forked in the background
background no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=10
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
#minimum_size 200 100
#maximum_width 300

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 8

# border margins
border_margin 4

# border width
border_width 1

# Default colors and also border colors
default_color black
#default_shade_color grey
#default_outline_color white

# own window options
own_window      yes
own_window_transparent   yes
own_window_type      override
#own_window_hints   undecorated,below,sticky,skip_taskbar,skip_pager

# Text alignment, other possible values are commented
#alignment top_left
#alignment top_right
#alignment bottom_left
alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 10
gap_y 10

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 1

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer right

# colours
color0  FFFFFF #ee376b

color1 FFFFFF #4B4B4B #CFCFCF 
# light blue
color2 6892C6
# orange 
color3 FC8820
# green
color4 78BF39
# red
color5 CC0000
# grey
color6 666666

color7 9933FF #FFFFFF



TEXT
${texeci 600 feh --bg-scale '/home/asus/Sfondi/Modificati/[Fake Panel Mod] Wall tree.jpg'}
${alignc}${color0}Time: ${color7}${time %H:%M}${color0}  |  Updates: ${color7}${execi 3600 aptitude search "~U" | wc -l | tail}${color0}   Uptime: ${color7}${uptime}${color0}  |  Cpu: ${color7}${cpu}%${color0}  Ram: ${color7}${memperc}%${color0}  Swap: ${color7}${swapperc}%${color0}  Disk: ${color7}${fs_used_perc /}%${color0}  |  Cpu: ${color7}${execi 1 sensors | grep "Core 1" | cut -c15-18 ;}°C${color0}  Disk: ${color7}${execi 1 nc localhost 7634 | cut -d'|' -f4 ;}°C${color0}  |  ${if_existing /proc/net/route eth0}Up: ${color7}${upspeedgraph eth0 10,50  22240a 9933FF}${color0}  Down: ${color7}${downspeedgraph eth0 10,50 22240a 9933FF}${color0}  Public Ip: ${color7}${addr eth0} ${else}Network Unavailable${endif}${alignc}
Avatar utente
MrMars
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1860
Iscrizione: giovedì 29 ottobre 2009, 14:15
Contatti:

Re: Posta il tuo .conkyrc & png

Messaggio da MrMars »

> Nick█ ha scritto: Ho preso il solito file conkyrc che uso sempre e ho modificato quello che viene dopo TEXT . . . . . ma questa volta capita che, in modo casuale, intorno al conky compare per un istante un rettangolo nero, che ha le stesse dimensioni.

Non credo dipenda dal refresh, perché non lo fa costantemente. . .

Potete dare un' occhiata al file? Grazie ;)
L'ho provato.
Credo lampeggi (a me niente quadri neri, ma lampeggia) perché hai messo no_buffers yes
cambialo con double_buffer yes
Nickname.
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 611
Iscrizione: sabato 4 luglio 2009, 18:34

Re: Posta il tuo .conkyrc & png

Messaggio da Nickname. »

C'è già double_buffer yes  ???
Avatar utente
MrMars
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1860
Iscrizione: giovedì 29 ottobre 2009, 14:15
Contatti:

Re: Posta il tuo .conkyrc & png

Messaggio da MrMars »

> Nick█ ha scritto: C'è già double_buffer yes  ???
Sotto c'è anche no_buffers yes
mi sa che vanno in conflitto :)
Nickname.
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 611
Iscrizione: sabato 4 luglio 2009, 18:34

Re: Posta il tuo .conkyrc & png

Messaggio da Nickname. »

Mi sa che hai ragione (rotfl)

Però lo fa ancora . . .
Avatar utente
MrMars
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1860
Iscrizione: giovedì 29 ottobre 2009, 14:15
Contatti:

Re: Posta il tuo .conkyrc & png

Messaggio da MrMars »

> Nick█ ha scritto: Mi sa che hai ragione (rotfl)

Però lo fa ancora . . .
Ora che leggo meglio, hai le impostazioni window_
doppie! ma hai fatto copia-incolla pesante? ;D

Comunque boh, pensa che come ti ho scritto, a me dà altri problemi, ma non il quadro nero... :)
(comunque avevo commentato la riga di feh, perché non volevo disegnasse :) )
Nickname.
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 611
Iscrizione: sabato 4 luglio 2009, 18:34

Re: Posta il tuo .conkyrc & png

Messaggio da Nickname. »

Allora, ho tolto i doppioni >:(

Ora è così, ma lo fa ancora >:(

Codice: Seleziona tutto

# ${addr eth0} 
 
# set to yes if you want Conky to be forked in the background
background no

# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=10
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
#minimum_size 200 100
#maximum_width 300

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 8

# border margins
border_margin 4

# border width
border_width 1

# Default colors and also border colors
default_color black
#default_shade_color grey
#default_outline_color white

# Text alignment, other possible values are commented
#alignment top_left
#alignment top_right
#alignment bottom_left
alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 10
gap_y 10

# set to yes if you want all text to be in uppercase
uppercase no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 1

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2

# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer right

# colours
color0  FFFFFF #ee376b

color1 FFFFFF #4B4B4B #CFCFCF 
# light blue
color2 6892C6
# orange 
color3 FC8820
# green
color4 78BF39
# red
color5 CC0000
# grey
color6 666666

color7 9933FF #FFFFFF


#${alignc}${color0}${scroll 100 ${rss  http://rss.feedsportal.com/c/32604/f/493129/index.rss 1 item_titles 1}}
TEXT
${texeci 600 feh --bg-scale '/home/asus/Sfondi/Modificati/[Fake Panel Mod] Wall tree.jpg'}
${alignc}${color0}Time: ${color7}${time %H:%M}${color0}  |  Updates: ${color7}${execi 3600 aptitude search "~U" | wc -l | tail}${color0}   Uptime: ${color7}${uptime}${color0}  |  Cpu: ${color7}${cpu}%${color0}  Ram: ${color7}${memperc}%${color0}  Swap: ${color7}${swapperc}%${color0}  Disk: ${color7}${fs_used_perc /}%${color0}  |  Cpu: ${color7}${execi 1 sensors | grep "Core 1" | cut -c15-18 ;}°C${color0}  Disk: ${color7}${execi 1 nc localhost 7634 | cut -d'|' -f4 ;}°C${color0}  |  ${if_existing /proc/net/route eth0}Up: ${color7}${upspeedgraph eth0 10,50  22240a 9933FF}${color0}  Down: ${color7}${downspeedgraph eth0 10,50 22240a 9933FF}${color0}  Public Ip: ${color7}${addr eth0} ${else}Network Unavailable${endif}${alignc}
Ultima modifica di Anonymous il venerdì 30 aprile 2010, 19:49, modificato 1 volta in totale.
deegan
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 2639
Iscrizione: lunedì 28 aprile 2008, 12:42
Distribuzione: Ubuntu 20.04
Sesso: Maschile
Località: Varese

Re: Posta il tuo .conkyrc & png

Messaggio da deegan »

#> Nick█

Prova così:

Codice: Seleziona tutto

 

background no

use_xft yes
xftfont DejaVu Sans:size=10
xftalpha 0.8
text_buffer_size 2048

update_interval 0.1

total_run_times 0

own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

double_buffer yes
no_buffers yes

minimum_size 200 100
maximum_width 300

imlib_cache_size 0

draw_shades no

draw_outline no

draw_borders no

stippled_borders 8


border_margin 4

border_width 1

default_color black

alignment bottom_right

gap_x 10
gap_y 10

uppercase no
xftalpha 1.0
cpu_avg_samples 2

net_avg_samples 2

override_utf8_locale yes

use_spacer right

color0  FFFFFF #ee376b
color1 FFFFFF #4B4B4B #CFCFCF 
color2 6892C6
color3 FC8820
color4 78BF39
color5 CC0000
color6 666666
color7 9933FF #FFFFFF

TEXT
MB* ASUS TUF Gaming Z690 SV* EVGA RTX 3080 Ti CPU* i7-12700K
RAM* Vengeance RGB PRO 32GB 3600MHz SSD* Samsung 980 PRO 2TB
Nickname.
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 611
Iscrizione: sabato 4 luglio 2009, 18:34

Re: Posta il tuo .conkyrc & png

Messaggio da Nickname. »

Ho aggiunto le righe dopo TEXT e commentato minimum_size e maximum_width altrimenti non lo vedevo più. . . . . però lo fa ancora. . . . e con l'update a 0.1 è mooolto più evidente. . . . .

Posso sapere perchè hai decommentato tutto? :)
deegan
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 2639
Iscrizione: lunedì 28 aprile 2008, 12:42
Distribuzione: Ubuntu 20.04
Sesso: Maschile
Località: Varese

Re: Posta il tuo .conkyrc & png

Messaggio da deegan »

Qualche modifica......  ;D

Immagine
MB* ASUS TUF Gaming Z690 SV* EVGA RTX 3080 Ti CPU* i7-12700K
RAM* Vengeance RGB PRO 32GB 3600MHz SSD* Samsung 980 PRO 2TB
Avatar utente
ifeelsohappy
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 836
Iscrizione: mercoledì 17 giugno 2009, 11:53

Re: Posta il tuo .conkyrc & png

Messaggio da ifeelsohappy »

@deegan
Posteresti il .conkyrc?
Ho sentito il rombo di un tuono che ha urlato un avvertimento, ho sentito il frastuono di un’onda che poteva sommergere il mondo intero, una forte pioggia cadrà(Dylan)
Galleggiando in oceani deserti, ho fatto di tutto per sorridere, finchè i tuoi occhi melodiosi e le tue dita mi attirarono affettuosamente alla tua isola (T. Buckley)
Chiusa

Ritorna a “Bar Ubuntu”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 12 ospiti