Conky e xfce problemino

Postate qui per tutte le discussioni legate a Linux in generale.

Moderatore: Staff

Regole del forum
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Gnu/Linux in genere, se l'argomento è specifico alla Slackware usate uno dei forum Slackware o Slackware64.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Rispondi
Avatar utente
Codemaster71
Linux 0.x
Linux 0.x
Messaggi: 42
Iscritto il: ven 29 feb 2008, 23:37

Conky e xfce problemino

Messaggio da Codemaster71 »

Allora ragazzi dovrei fare una cosa... Avete presente questa configurazione di conky:

Immagine

Siccome il plugin presente in questa configurazione si collega ad amarok per avere info su playlist, musica in ascolto ecc, ed io uso xfce... Vorrei sapere se c'è un modo per avere la medesima configurazione con xmms. O ci riesco così oppure trovo un modo per far partire amarok in xfce... :doubt:
Comunque ecco il file conkyrc dello screen:

Codice: Seleziona tutto

# Conky configuration
background yes
use_xft yes
xftfont Monospace:size=9
xftalpha 0.8
out_to_console no
update_interval 2
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 5
border_margin 4
border_width 1
default_color grey
default_shade_color black
default_outline_color black
alignment top_right
gap_x 10
gap_y 47
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer no

TEXT
${color white}$alignc$sysname $kernel on $machine
${color white}$alignc${exec whoami} @ $nodename
$color$stippled_hr
${color}Date: ${color white}${time %A,%d %B}
${color}Time: ${color white}${time %k:%M:%S}${alignr}${color}Uptime: ${color white}$uptime
$color$stippled_hr
${alignc}Temperatures
${alignc}CPU: ${color white}${i2c 9191-0290 temp 2}°C$color - MB: ${color white}${i2c 9191-0290 temp 1}°C
$color$stippled_hr
${color}CPU:${color white} ${cpu cpu1}% ${cpubar cpu1}
${color}RAM:${color white} $memperc%  $mem/$memmax $membar
${color}Swap: ${color white}$swapperc% $swap/$swapmax ${swapbar}
$color$stippled_hr
${alignc}File systems
${color}/dev/sda1${color white} ${fs_used_perc /}%   ${fs_used /}/${fs_size /}   ${fs_bar /}
${color}/dev/sda3${color white} ${fs_used_perc /media/stuff/}% ${fs_used /media/stuff/}/${fs_size /media/stuff/} ${fs_bar /media/stuff/}
$color$stippled_hr${if_running amarokapp}
${color}${alignc}Now Playing${color white}
${alignc}${execi 10 ~/.conky/amarok artist}
${alignc}${execi 10 ~/.conky/amarok title}
${execibar 1 ~/.conky/amarok progress}
${alignc}"${execi 10 ~/.conky/amarok album}"
${alignc}${execi 10 ~/.conky/amarok year} - ${color white}${alignc}${execi 10 ~/.conky/amarok genre}
$color$stippled_hr
${alignc}Collection Information
Artists: ${color white}${execi 10 ~/.conky/amarok totalArtists} $color${alignr}Compilations: ${color white}${execi 10 ~/.conky/amarok totalCompilations}$color
Albums:  ${color white}${execi 10 ~/.conky/amarok totalAlbums} $color${alignr}Genres: ${color white}${execi 10 ~/.conky/amarok totalGenres}$color
Tracks:  ${color white}${execi 10 ~/.conky/amarok totalTracks}
$color$stippled_hr
${alignc}Collection Statisctics
Most songs by ${color white}${execi 10 ~/.conky/amarok most_songs_by_artist} $alignr${color}(${color white}${execi 10 ~/.conky/amarok most_songs_by_artist_n}${color})
Most songs are ${color white}${execi 10 ~/.conky/amarok most_songs_are_genre} $alignr${color}(${color white}${execi 10 ~/.conky/amarok most_songs_are_genre_n}${color})
Most songs during ${color white}${execi 10 ~/.conky/amarok most_songs_during_year} $alignr${color}(${color white}${execi 10 ~/.conky/amarok most_songs_during_year_n}${color})
Most albums by ${color white}${execi 10 ~/.conky/amarok most_albums_by_artist} $alignr${color}(${color white}${execi 10 ~/.conky/amarok most_albums_by_artist_n}${color})
Most albums are ${color white}${execi 10 ~/.conky/amarok most_albums_are_genre} $alignr${color}(${color white}${execi 10 ~/.conky/amarok most_albums_are_genre_n}${color})
Most albums during ${color white}${execi 10 ~/.conky/amarok most_albums_during_year} $alignr${color}(${color white}${execi 10 ~/.conky/amarok most_albums_during_year_n}${color})$endif
E lo script da aggiungere ad amarok per far funzionare il tutto:

Codice: Seleziona tutto

#!/bin/bash
# amaroK info display script by eirc <eirc.eirc@gmail.com>
#
# requirements: amaroK (!)
# for Collection stats to work amarok must be using
# mySQL to store it's collection

case "$1" in

# Now Playing Info
artist) dcop amarok player artist ;;
title)  dcop amarok player title ;;
album)  dcop amarok player album ;;
year)   dcop amarok player year ;;
genre)  dcop amarok player genre ;;
progress)
    curr=`dcop amarok player trackCurrentTime`
    tot=`dcop amarok player trackTotalTime`
    if (( $tot )); then
        expr $curr \* 100  / $tot
    fi
    ;;

# Collection Info
totalArtists)      dcop amarok collection totalArtists ;;
totalAlbums)       dcop amarok collection totalAlbums ;;
totalTracks)       dcop amarok collection totalTracks ;;
totalGenres)       dcop amarok collection totalGenres ;;
totalCompilations) dcop amarok collection totalCompilations ;;

# Collection Stats
most_songs_by_artist) dcop amarok collection query 'SELECT t1.name FROM artist t1 INNER JOIN tags t2 ON t1.id = t2.artist GROUP BY t2.artist ORDER BY COUNT(t2.artist) DESC LIMIT 1;' ;;
most_songs_by_artist_n) dcop amarok collection query 'SELECT count(t2.artist) FROM artist t1 INNER JOIN tags t2 ON t1.id = t2.artist GROUP BY t2.artist ORDER BY COUNT(t2.artist) DESC LIMIT 1;' ;;
most_songs_are_genre) dcop amarok collection query 'SELECT t1.name FROM genre t1 INNER JOIN tags t2 ON t1.id = t2.genre GROUP BY t2.genre ORDER BY COUNT(t2.genre) DESC LIMIT 1;' ;;
most_songs_are_genre_n) dcop amarok collection query 'SELECT count(t2.genre) FROM genre t1 INNER JOIN tags t2 ON t1.id = t2.genre GROUP BY t2.genre ORDER BY COUNT(t2.genre) DESC LIMIT 1;' ;;
most_songs_during_year) dcop amarok collection query 'SELECT t1.name FROM year t1 INNER JOIN tags t2 ON t1.id = t2.year GROUP BY t2.year ORDER BY COUNT(t2.year) DESC LIMIT 1;' ;;
most_songs_during_year_n) dcop amarok collection query 'SELECT count(t2.year) FROM year t1 INNER JOIN tags t2 ON t1.id = t2.year GROUP BY t2.year ORDER BY COUNT(t2.year) DESC LIMIT 1;' ;;
most_albums_by_artist) dcop amarok collection query 'SELECT name FROM artist WHERE id=(SELECT t1.artist from (SELECT artist FROM tags GROUP BY album) AS t1 GROUP BY t1.artist ORDER BY count(artist) DESC LIMIT 1);' ;;
most_albums_by_artist_n) dcop amarok collection query 'SELECT count(artist) from (SELECT artist FROM tags GROUP BY album) AS t1 GROUP BY t1.artist ORDER BY count(artist) DESC LIMIT 1;' ;;
most_albums_are_genre) dcop amarok collection query 'SELECT name FROM genre WHERE id=(SELECT t1.genre from (SELECT genre FROM tags GROUP BY album) AS t1 GROUP BY t1.genre ORDER BY count(genre) DESC LIMIT 1);' ;;
most_albums_are_genre_n) dcop amarok collection query 'SELECT count(genre) from (SELECT genre FROM tags GROUP BY album) AS t1 GROUP BY t1.genre ORDER BY count(genre) DESC LIMIT 1;' ;;
most_albums_during_year) dcop amarok collection query 'SELECT name FROM year WHERE id=(SELECT t1.year from (SELECT year FROM tags GROUP BY album) AS t1 GROUP BY t1.year ORDER BY count(year) DESC LIMIT 1);' ;;
most_albums_during_year_n) dcop amarok collection query 'SELECT count(year) from (SELECT year FROM tags GROUP BY album) AS t1 GROUP BY t1.year ORDER BY count(year) DESC LIMIT 1;' ;;

esac
Se riusciste a trovarmi una soluzione sareste fantastici [-o<

Grazie

Avatar utente
danix
Staff
Staff
Messaggi: 3289
Iscritto il: ven 27 ott 2006, 19:32
Nome Cognome: Danilo M.
Slackware: 64 current
Kernel: 6.12.13 x86_64
Desktop: i3
Località: Verona (VR)
Contatta:

Re: Conky e xfce problemino

Messaggio da danix »

cercando "conky xmms" in google il primo risultato viene dal wiki di gentoo e mi sembra possa esserti utile... comunque un consiglio, invece di xmms prova ad usare audacious... è molto meglio...

anzi, mi correggo...
per xmms (e anche per audacious se ti interessa) puoi guardare la pagina delle variabili di conky... dovrebbe esserci tutto quello di cui hai bisogno...

Spero di esserti stato utile in qualche modo...


Ciau
danix
danix ha scritto:non sono molto presente sul forum, e di ciò mi scuso con tutti

Avatar utente
Codemaster71
Linux 0.x
Linux 0.x
Messaggi: 42
Iscritto il: ven 29 feb 2008, 23:37

Re: Conky e xfce problemino

Messaggio da Codemaster71 »

Molte grazie, con i tuoi consigli ho creato questa configurazione, anche se non so se l'ho fatta giusta visto che non so praticamente niente di come si scrive questo file... ecco ti faccio vedere, dimmi se secondo te funzionerebbe...

Codice: Seleziona tutto

# Conky configuration
background yes
use_xft yes
xftfont Monospace:size=9
xftalpha 0.8
out_to_console no
update_interval 2
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 5
border_margin 4
border_width 1
default_color grey
default_shade_color black
default_outline_color black
alignment top_left
gap_x 10
gap_y 47
no_buffers no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer no

TEXT
${color white}$alignc$sysname $kernel on $machine
${color white}$alignc${exec whoami} @ $nodename
$color$stippled_hr
${color}Date: ${color white}${time %A,%d %B}
${color}Time: ${color white}${time %k:%M:%S}${alignr}${color}Uptime: ${color white}$uptime
$color$stippled_hr
${alignc}Temperatures
${alignc}CPU: ${color white}${i2c 9191-0290 temp 2}°C$color - MB: ${color white}${i2c 9191-0290 temp 1}°C
$color$stippled_hr
${color}CPU:${color white} ${cpu cpu1}% ${cpubar cpu1}
${color}RAM:${color white} $memperc%  $mem/$memmax $membar
${color}Swap: ${color white}$swapperc% $swap/$swapmax ${swapbar}
$color$stippled_hr
${alignc}File systems
${color}/dev/sda1${color white} ${fs_used_perc /}%   ${fs_used /}/${fs_size /}   ${fs_bar /}
${color}/dev/sda3${color white} ${fs_used_perc /media/stuff/}% ${fs_used /media/stuff/}/${fs_size /media/stuff/} ${fs_bar /media/stuff/}
$color$stippled_hr${if_running audacious}
${color}${alignc}Now Playing${color white}
${alignc}${audacious_title}
${execibar 1 audacious_bar (5),(232)}
Bitrate: ${color white}${execi 10 audacious_bitrate} $color${alignr}Channels: ${color white}${execi 10 audacious_channels}$color
Frequency:  ${color white}${execi 10 audacious_frequency} $color${alignr}Time: ${color white}${execi 10 audacious_position/audacious_length}$color
Status:  ${color white}${execi 10 audacious_status}$endif


Avatar utente
danix
Staff
Staff
Messaggi: 3289
Iscritto il: ven 27 ott 2006, 19:32
Nome Cognome: Danilo M.
Slackware: 64 current
Kernel: 6.12.13 x86_64
Desktop: i3
Località: Verona (VR)
Contatta:

Re: Conky e xfce problemino

Messaggio da danix »

in teoria dovrebbe funzionare, solo che io non ho mai avuto fortuna con if-endif in conky, non mi hanno mai funzionato... infatti lasciavo sempre visibili le righe riguardanti il player... :D

Comunque prova tu stesso, lancia conky con questa config da una shell, se non va ti dirà lui dov'è l'errore... ;)


Ciau
danix
danix ha scritto:non sono molto presente sul forum, e di ciò mi scuso con tutti

Avatar utente
Codemaster71
Linux 0.x
Linux 0.x
Messaggi: 42
Iscritto il: ven 29 feb 2008, 23:37

Re: Conky e xfce problemino

Messaggio da Codemaster71 »

danix85 ha scritto:in teoria dovrebbe funzionare, solo che io non ho mai avuto fortuna con if-endif in conky, non mi hanno mai funzionato... infatti lasciavo sempre visibili le righe riguardanti il player... :D

Comunque prova tu stesso, lancia conky con questa config da una shell, se non va ti dirà lui dov'è l'errore... ;)


Ciau
E per quanto riguarda l'avvio automatico all'avvio di xfce come faccio?

Avatar utente
danix
Staff
Staff
Messaggi: 3289
Iscritto il: ven 27 ott 2006, 19:32
Nome Cognome: Danilo M.
Slackware: 64 current
Kernel: 6.12.13 x86_64
Desktop: i3
Località: Verona (VR)
Contatta:

Re: Conky e xfce problemino

Messaggio da danix »

Menu --> Impostazioni --> Applicazioni avviate automaticamente

e imposti da li tutte le applicazioni che verranno eseguite all'avvio di xfce... ;)
danix
danix ha scritto:non sono molto presente sul forum, e di ciò mi scuso con tutti

Avatar utente
Codemaster71
Linux 0.x
Linux 0.x
Messaggi: 42
Iscritto il: ven 29 feb 2008, 23:37

Re: Conky e xfce problemino

Messaggio da Codemaster71 »

Ok, ho installato conky, l'ho configurato a dovere ecc... ma adesso houn'altro problema! Da root la funzione per mettere le info di audacious funziona benissimo, con l'untente normale no! Ho provato in tutte le maniere, ma quale può essere il problema?

PS: Un'altra cosa, ma come mai quando (sermpre con l'altro utente) sposto le icone appena riavvio xfce mi si spostano di nuovo a sinistra dello schermo? Io voglio lasciarle dove sono! Da root ci rimangono!

Avatar utente
Codemaster71
Linux 0.x
Linux 0.x
Messaggi: 42
Iscritto il: ven 29 feb 2008, 23:37

Re: Conky e xfce problemino

Messaggio da Codemaster71 »

Nessuno mi può aiutare? :(

Avatar utente
Codemaster71
Linux 0.x
Linux 0.x
Messaggi: 42
Iscritto il: ven 29 feb 2008, 23:37

Re: Conky e xfce problemino

Messaggio da Codemaster71 »

Ragazzi ho notato una cosa, non è la funzione il problema, ma l'if, infatti levandolo allavvio di audacious le info appaiono in conky!

Rispondi