Problem is : where will you find information to be processed and displayed ?
To know if jack is running you could parse output of "ps aux|grep jack" for instance and use it in a lua script.
But for alsa volume levels for instance (as shown in alsamixer) you should write lua functions using the alsa API. Seems to exist some docs about that in the kernel source, e.g. Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl. To know how to get these docs in the format you want, type "make help" at root of kernel tree.
To give you a clue of how to use lua with conky, here is simple lua script I wrote to get information about brightness of the screen and keyboard illumination of my Thinkpad T61 laptop :
Code:
--Didier Spaier le vendredi 30 octobre 2009
conky_brightness=function()
i=0
for ligne in io.lines("/proc/acpi/video/VID1/LCD0/brightness") do
if (i==1) then j=(string.sub(ligne,10)) end
i=i+1
end
return(j)
end
conky_light=function()
for laligne in io.lines("/proc/acpi/ibm/light") do
l=(string.sub(laligne,10))
if (l=="off") then return(0) else return(1) end
end
end
Then in the first part of ~/.conkyrc I wrote this to call the script:
Code:
lua_load /home/logiciels/lua.conky
And to display output of the functions (in the TEXT section) :
Code:
${color grey}Brillance : ${color}${lua brightness}/100 ${if_match ${lua light}==0}${color grey}clavier non éclairé${color}${else}clavier éclairé$endif
In case you'd find this example useful, whole ~/.conkyrc follows
Code:
cpu_avg_samples 2
top_cpu_separate false
default_color white
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
#font 12x20
if_up_strictness address
net_avg_samples 2
double_buffer yes
out_to_console no
override_utf8_locale
own_window no
#own_window_class Conky
#own_window_transparent yes
#own_window_type desktop
pop3 mail.lixium.fr epsm-didier.spaier apzoqmslwnxb -i 1
update_interval 1
uppercase no
use_spacer left
show_graph_scale yes
show_graph_range yes
short_units yes
use_xft
xftfont DejaVu Sans Mono:size=7
default_bar_size 110 6
lua_load /home/logiciels/lua.conky
TEXT
${color grey}${font DejaVu Sans Mono:size=11}Bureau n° ${color}${desktop}${color grey} de ${color}${desktop_number}${font}
${font DejaVu Sans Mono:size=11}${time %A %e %B %Y %Hh%M }${font}
${if_gw}
${font DejaVu Sans Mono:size=11}${color lightgrey}Non lus ${color}${pop3_unseen mail.lixium.fr epsm-didier.spaier apzoqmslwnxb -i 10}${font}
${endif}
${color grey}En fonction depuis ${color}$uptime
${color grey}Brillance : ${color}${lua brightness}/100 ${if_match ${lua light}==0}${color grey}clavier non éclairé${color}${else}clavier éclairé$endif
$acpiacadapter${color grey} Batterie ${color}${smapi_bat_power 0}W${color grey} charge${color} ${smapi_bat_perc 0}%
${color grey}Températures
processeur ${color}${ibm_temps 0}°C${color grey}
graphique ${color}${nvidia temp}°C/${nvidia threshold}°C${color grey}
batterie ${color}${smapi_bat_temp 0}°C
${if_match $ibm_fan==0}${color grey}Ventilateur ${color}arrêté$else${color grey}Vitesse ventilateur ${color}$ibm_fan tours/minute$endif
${color grey}Nvidia
Fréquence NV/mémoire ${color}${nvidia gpufreq}MHz/${nvidia memfreq}MHz${color grey}
Qualité ${color}${nvidia imagequality}/3
${color grey}Cœur 1 ${color}${freq 1}MHz ${cpu cpu1}%
${color grey}Cœur 2 ${color}${freq 2}MHz ${cpu cpu2}%
${top cpu 1}% ${color lightgrey}pour ${color}${top name 1}
${top cpu 2}% ${color lightgrey}pour ${color}${top name 2}
${color grey}Occupation RAM/Swap ${color}$memperc%/$swapperc%
${top_mem mem 1}%${color lightgrey} pour ${color}${top_mem name 1}
${top_mem mem 2}% ${color lightgrey}pour ${color}${top_mem name 2}
${color grey}Processus${color}$processes ${color grey}Actif(s)${color}$running_processes
${color grey}Partitions
Linux ${color}${fs_used_perc /}% ${fs_bar /}${color grey}
Windows ${color}${fs_used_perc /windows}% ${fs_bar /windows}
${color grey}E/S sur disque${color}
${diskio_read sda}/s${color grey} en lecture${color}
${diskio_write sda}/s${color grey} en écriture${color}${if_up wlan0}${color grey}
IP wifi ${color}${addr wlan0}${color grey}
amont ${color}${upspeed wlan0}${color grey}
aval ${color}${downspeed wlan0}$endif
${if_up eth0}${color grey}IP ethernet ${color}${addr eth0}${color grey}
amont ${color}${upspeed eth0}${color grey}
aval ${color}${downspeed eth0}
$endif
${color grey}Volume général ${color}${mixerbar}
${if_running audacious}${color grey}Vol. Audacious ${color}${audacious_main_volume}% ${audacious_status} plage $audacious_playlist_position $audacious_position${color grey}/${color}$audacious_length ${audacious_bar}
${audacious_title}
$endif
#${if_xmms2_connected}
#${xmms2_status} ${color grey}Plage n° ${color}$xmms2_tracknr $xmms2_elapsed${color grey}/${color}$xmms2_duration ${xmms2_bar 6,220}
#${xmms2_artist}
#${xmms2_album}
#${xmms2_title}
#$endif
${color grey}Paris-Le Bourget le ${color}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ LFPB last_update} TU
${color grey}Température${color}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ LFPB temperature}°C
${color grey}Couverture nuageuse ${color}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ LFPB cloud_cover}
${color grey}Pression ${color}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ LFPB pressure} hPa
${color grey}Vitesse du vent ${color}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ LFPB wind_speed} km/h
${color grey}Direction du vent ${color}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ LFPB wind_dir}
${color grey}Humidité ${color}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ LFPB humidity}%