Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 16/08/2006, à 14:31

AToMiSeR

[Résolu] Conky et Amarok

Bon alors j'ai un probleme un peu space !! lol j'ai passer 4h dessus sans succés.

Alors voici le code source .conkyrc qui fonctionne parfaitement.

# 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

J'ai voulus recuperer la partie pour Amarok :

${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

Voici mon .conkyrc que j'ai modifié pour avoir le petit script pour amarok :

background yes
cpu_avg_samples 2
net_avg_samples 2
out_to_console no 
font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1
use_xft no
xftfont  -artwiz-edges-medium-*-*-*-10-*-*-*-*-*-iso8859-1 
own_window_transparent yes
xftalpha 0.8
update_interval 1
own_window yes 
own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
stippled_borders 2
border_margin 4
border_width 1
default_color lightslategrey
default_shade_color white
default_outline_color white
alignment top_left
minimum_size 10 10
gap_x 25
gap_y 120
use_spacer no
no_buffers yes
uppercase no
min_port_monitors 8
min_port_monitor_connections 64
pad_percents 2
default_color black

TEXT
${color #1d6c8d}Bonjour $nodename - $sysname $kernel ${alignr}$color${time %H:%M:%S}
${stippled_hr}
${color #1d6c8d}Uptime:$color $uptime ${color #1d6c8d} ${alignr}Load:$color $loadavg
${color #1d6c8d}CPU Usage:$color ${cpu}% ${color #1d6c8d}${cpubar}
${cpugraph 0 32, 280 1d6c8d 1d6c8d}
${color #1d6c8d}RAM Usage:$color $mem/$memmax - $memperc% ${color #1d6c8d}$membar
${color #1d6c8d}Swap Usage:$color $swap/$swapmax - $swapperc% ${color #1d6c8d}${swapbar}
${stippled_hr}
${color #1d6c8d}Procs:$color $processes ${color #1d6c8d}Running:$color $running_processes ${color #1d6c8d}
${color #1d6c8d}Net Down:$color ${downspeed eth0} Ko/s${color #1d6c8d} ${alignr}Net Up:$color ${upspeed eth0} Ko/s
${stippled_hr}
${color #1d6c8d}File systems (free space):
 ${color #1d6c8d}/${offset 49}$color${fs_free /}${alignr}${color #1d6c8d}${fs_bar 5,140 /} $color${fs_free_perc /}%
 ${color #1d6c8d}/home${offset 24}$color${fs_free /home}  ${alignr}${color #1d6c8d}${fs_bar 5,140 /home} $color${fs_free_perc /home}%
 ${color #1d6c8d}HDA${offset 24}$color${fs_free /mnt/hda}  ${alignr}${color #1d6c8d}${fs_bar 5,140 /mnt/hda} $color${fs_free_perc /mnt/hda}% 
${color #1d6c8d}HDB${offset 24}$color${fs_free /mnt/hdb}  ${alignr}${color #1d6c8d}${fs_bar 5,140 /mnt/hdb} $color${fs_free_perc /mnt/hdb}%
 ${color #1d6c8d}Musique${offset 24}$color${fs_free /mnt/hdb/mp3}  ${alignr}${color #1d6c8d}${fs_bar 5,140 /mnt/hdb/mp3} $color${fs_free_perc /mnt/hdb/mp3}%
${stippled_hr}
${color #1d6c8d}Top Processes:
${color #1d6c8d}Name   ${alignr}           PID     CPU%   MEM%
$color ${top name 1} ${alignr}${top pid 1} ${top cpu 1} ${top mem 1}
$color ${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2}
$color ${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3}
${color #1d6c8d}Mem usage
$color ${top_mem name 1} ${alignr}${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
$color ${top_mem name 2} ${alignr}${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
$color ${top_mem name 3} ${alignr}${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${stippled_hr} 
${color #1d6c8d}Port(s)${alignr}#Connections
$color ALL:     ${alignr}$color ${tcp_portmon 1 65535 count}
$color torrent: ${alignr}$color ${tcp_portmon 2300 2400 count}
$color SSH: ${alignr}$color ${tcp_portmon 22 22 count}
${stippled_hr}
${if_running amarok}
${color}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}
${stippled_hr}
$color Collection Information
$color Artists: ${color white}${execi 10 ~/.conky/amarok totalArtists} Compilations: ${color white}${execi 10 ~/.conky/amarok totalCompilations}$color
$color Albums:  ${color white}${execi 10 ~/.conky/amarok totalAlbums} Genres: ${color white}${execi 10 ~/.conky/amarok totalGenres}$color
$color Tracks:  ${color white}${execi 10 ~/.conky/amarok totalTracks}
${stippled_hr}
$color Collection Statisctics
$color Most songs by ${color white}${execi 10 ~/.conky/amarok most_songs_by_artist} ${color}(${color white}${execi 10 ~/.conky/amarok most_songs_by_artist_n}${color})
$color Most songs are ${color white}${execi 10 ~/.conky/amarok most_songs_are_genre} ${color}(${color white}${execi 10 ~/.conky/amarok most_songs_are_genre_n}${color})
$color Most songs during ${color white}${execi 10 ~/.conky/amarok most_songs_during_year} ${color}(${color white}${execi 10 ~/.conky/amarok most_songs_during_year_n}${color})
$color Most albums by ${color white}${execi 10 ~/.conky/amarok most_albums_by_artist} ${color}(${color white}${execi 10 ~/.conky/amarok most_albums_by_artist_n}${color})
$color Most albums are ${color white}${execi 10 ~/.conky/amarok most_albums_are_genre} ${color}(${color white}${execi 10 ~/.conky/amarok most_albums_are_genre_n}${color})
$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

Bon donc dans le script j'ai modifié ceci :

${if_running amarok}

à la place de "amarokapp" j'ai mis "amarok" logique.

Donc mon probleme est pourquoi quand j'utilise le script par default sa fonctionne tres tres bien, la je recupere la partie pour amarok et je l'integre dans mon .conkyrc perso, des que je lance amarok mon conky disparait mais il est toujours lancer.

Voici aussi le script amarok pour ceux que sa interesse. :

http://conky.sourceforge.net/screenshots.html

Dernière modification par AToMiSeR (Le 10/10/2006, à 23:29)

Hors ligne

#2 Le 17/08/2006, à 02:10

AToMiSeR

Re : [Résolu] Conky et Amarok

Bon alors apparament c'est la suite qui fonctionne pas "Collection Information" et "Collection Statistique" mais le lecteur fonctionne donc voici le code à inserer pour ceux qui veulent le lecteur (c'est le plus interressant du script)

${if_running amarok}
${color}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}$endif

N'oublier pas le script qui s'accompagne dispo sur: http://conky.sourceforge.net/screenshots.html

Voila cependant si quelqu'un à une idée pour le probleme de la suite du code, merci de poster.

Hors ligne

#3 Le 17/08/2006, à 02:43

AToMiSeR

Re : [Résolu] Conky et Amarok

http://doc.ubuntu-fr.org/applications/conky#scripts_pour_votre_.conkyrc

Voila sa c'est fait ! tongue

Hors ligne