Pages : 1
#1 Le 23/01/2007, à 14:11
- Struddel
Script banshee/conky
Hello !
N'ayant trouvé aucun script pour utiliser Banshee dans conky j'en ai fait un à deux sous mais qui a le mérite de marcher.
Seulement je n'ai pas l'affichage correspondant exactement à ce que je veux
Voici mon script (nommé .bansheesc) pour récupérer les infos de banshee :
case "$1" in
artist) banshee --query-artist ;;
title) banshee --query-title ;;
esac
et dans conkyrc je rajoute :
${execi 10 ~/.bansheesc artist} - ${execi 10 ~/.bansheesc title}
Dans conky ça m'affiche
Artist: Machin Chose - Title: Une Chanson
Et j'aimerais ne plus voir apparaître "Artist: " et "Title: ", je veux seulement les infos.
Si quelqu'un sait comment je pourrais faire je lui en serais très reconnaissant !
Dernière modification par Struddel (Le 23/01/2007, à 14:13)
Ratpoison
Hors ligne
#2 Le 14/09/2007, à 16:26
- cob
Re : Script banshee/conky
Salut (avec kek mois de retard ^^),
En s'inspirant du script pour AmaroK (http://doc.ubuntu-fr.org/conky)
Pour ton ~/.conky/banshee
#!/bin/bash
# banshee info display script by cob <cob@wcob.net>
case "$1" in
# Now Playing Info
artist) banshee --query-artist | awk -F": " '{print $2}' ;;
title) banshee --query-title | awk -F": " '{print $2}' ;;
album) banshee --query-album | awk -F": " '{print $2}' ;;
genre) banshee --query-genre | awk -F": " '{print $2}' ;;
progress)
position=`banshee --query-position | awk -F": " '{print $2}'`
duration=`banshee --query-duration | awk -F": " '{print $2}'`
if (( $duration )); then
expr $position \* 100 / $duration
fi
;;
esac
et pour ton ~/.conky/.conkyrc :
${if_running banshe
${color #ffccaa}Banshee
${color #FFFFFF}Artist: ${color #CCCCCC}${execi 10 ~/.conky/banshee artist}
${color #FFFFFF}Titre: ${color #CCCCCC}${execi 10 ~/.conky/banshee title}
${color #FFFFFF}${execibar 1 ~/.conky/banshee progress}
${color #FFFFFF}Album: ${color #CCCCCC}${execi 10 ~/.conky/banshee album}
${color #FFFFFF}Genre: ${color #CCCCCC}${execi 10 ~/.conky/banshee genre}$endif
Pages : 1