Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| conky_scripts_multimedia [Le 09/06/2010, 16:43] – code bar de progression rhythmbox TheCaméléon | conky_scripts_multimedia [Le 10/03/2023, 22:28] (Version actuelle) – nettoyage L'Africain | ||
|---|---|---|---|
| Ligne 25: | Ligne 25: | ||
| ${alignc}${exec rhythmbox-client --print-playing-format "%ta - %at"} | ${alignc}${exec rhythmbox-client --print-playing-format "%ta - %at"} | ||
| ${alignc}${exec rhythmbox-client --print-playing-format "%tn - %tt"} | ${alignc}${exec rhythmbox-client --print-playing-format "%tn - %tt"} | ||
| + | </ | ||
| + | |||
| + | Les différents scripts conky pour Rhythmbox lancent Rhythmbox pour récupérer des informations sur le morceau en cours. Cela peut ralentir votre ordinateur, et laisse Rhythmbox en marche, ce qui n'est pas forcément utile. On peut remédier à ce problème en insérant le code suivant autour des commandes qui récupèrent les informations sur Rhythmbox. | ||
| + | < | ||
| + | ${if_running rhythmbox} | ||
| + | # commandes en relations avec Rhythmbox | ||
| + | $endif | ||
| </ | </ | ||
| Ligne 33: | Ligne 40: | ||
| < | < | ||
| #!/bin/bash | #!/bin/bash | ||
| - | # Par TheCaméléon | ||
| - | # http:// | ||
| album=$(rhythmbox-client --print-playing-format "%ta - %at") | album=$(rhythmbox-client --print-playing-format "%ta - %at") | ||
| Ligne 41: | Ligne 46: | ||
| if test -s " | if test -s " | ||
| then | then | ||
| - | cp " | + | ln -sf " |
| else | else | ||
| Ligne 54: | Ligne 59: | ||
| < | < | ||
| <note tip> | <note tip> | ||
| - | |||
| ==== Afficher une barre de progression ==== | ==== Afficher une barre de progression ==== | ||
| - | **conky_rythmbox_bar** | + | **conky_rhythmbox_bar**((corrigez le script si nécessaire)) |
| < | < | ||
| #!/bin/bash | #!/bin/bash | ||
| - | # Par TheCaméléon | + | #Par Ph3nix_ |
| - | # http:// | + | |
| - | + | ||
| - | tps=$(rhythmbox-client --print-playing-format " | + | |
| - | tps_tot=$(rhythmbox-client --print-playing-format " | + | |
| - | + | ||
| - | FORMAT=" | + | |
| - | + | ||
| - | if [[ $tps =~ $FORMAT ]] ; then | + | |
| - | MM=${BASH_REMATCH[2]: | + | |
| - | SS=${BASH_REMATCH[3]} | + | |
| - | (( tps_sec = ((MM * 60) + SS) * 100 )) | + | |
| - | else | + | |
| - | tps_sec=" | + | |
| - | fi | + | |
| - | + | ||
| - | if [[ $tps_tot =~ $FORMAT ]] ; then | + | |
| - | MM=${BASH_REMATCH[2]: | + | |
| - | SS=${BASH_REMATCH[3]} | + | |
| - | (( tps_tot_sec = (MM * 60) + SS )) | + | |
| - | else | + | |
| - | tps_tot_sec=" | + | |
| - | fi | + | |
| - | + | ||
| - | tps_frac=`echo $tps_sec / $tps_tot_sec | bc -l` | + | |
| - | echo $tps_frac | + | convert_sec() { |
| + | min=`echo $1 | cut -d':' | ||
| + | sec=`echo $1 | cut -d':' | ||
| + | [ ${sec:0:1} = ' | ||
| + | res=$((min*60+sec)) | ||
| + | } | ||
| + | convert_sec $(rhythmbox-client --print-playing-format " | ||
| + | now=$res | ||
| + | convert_sec $(rhythmbox-client --print-playing-format " | ||
| + | [ $res -eq 0 ] && echo 0 && exit | ||
| + | echo ` echo " | ||
| </ | </ | ||
| **.conkyrc** | **.conkyrc** | ||
| Ligne 93: | Ligne 83: | ||
| </ | </ | ||
| - | ===== AmaroK ===== | + | {{ :conky: |
| - | + | ||
| - | Si vous desirez voir sur votre Conky, ce que vous ecoutez sur [[: | + | |
| - | + | ||
| - | < | + | |
| - | ${if_running amarok} | + | |
| - | ${color}AmaroK${color white} | + | |
| - | ${alignc}${execi 10 ~/.conky/amarok artist} | + | |
| - | ${alignc}${execi 10 ~/.conky/ | + | |
| - | ${execibar 1 ~/ | + | |
| - | ${alignc}" | + | |
| - | ${alignc}${execi 10 ~/ | + | |
| - | </ | + | |
| - | + | ||
| - | <note tip> | + | |
| - | Pour faire fonctionner ce script, j'ai dû remplacer à la première ligne " | + | |
| - | </ | + | |
| - | + | ||
| - | Ensuite vous créez un dossier caché dans le home nommé " | + | |
| - | + | ||
| - | Créez un dossier caché dans le home: | + | |
| - | < | + | |
| - | + | ||
| - | Aller dans ce dossier : | + | |
| - | < | + | |
| - | + | ||
| - | Puis créez un fichier nommé " | + | |
| - | < | + | |
| - | + | ||
| - | Et ajouter : | + | |
| - | + | ||
| - | < | + | |
| - | # amaroK info display script by eirc < | + | |
| - | + | ||
| - | case " | + | |
| - | + | ||
| - | # Now Playing Info | + | |
| - | artist) dcop amarok player artist ;; | + | |
| - | title) | + | |
| - | album) | + | |
| - | year) dcop amarok player year ;; | + | |
| - | genre) | + | |
| - | progress) | + | |
| - | curr=`dcop amarok player trackCurrentTime` | + | |
| - | tot=`dcop amarok player trackTotalTime` | + | |
| - | if (( $tot )); then | + | |
| - | expr $curr \* 100 / $tot | + | |
| - | fi | + | |
| - | ;; | + | |
| - | + | ||
| - | esac </ | + | |
| - | + | ||
| - | <note tip> | + | |
| - | Le script précédent n'a pas fonctionné pour moi sous Karmic/ | + | |
| - | < | + | |
| - | + | ||
| - | export DISPLAY=: | + | |
| - | + | ||
| - | NOWPLAYING=`qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.GetMetadata` | + | |
| - | + | ||
| - | if [ $? = 0 ] && [ -n " | + | |
| - | case " | + | |
| - | album ) echo " | + | |
| - | artist ) echo " | + | |
| - | genre ) echo " | + | |
| - | rating ) echo " | + | |
| - | title ) echo " | + | |
| - | track ) echo " | + | |
| - | year ) echo " | + | |
| - | progress) | + | |
| - | curr=`qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.PositionGet` | + | |
| - | tot=`echo " | + | |
| - | echo `expr $curr \* 100 / $tot` | + | |
| - | ;; | + | |
| - | esac | + | |
| - | fi</ | + | |
| - | </ | + | |
| - | + | ||
| - | < | + | |
| - | + | ||
| - | Voila :) | + | |
| ===== Audacious (v1.2) ===== | ===== Audacious (v1.2) ===== | ||
| - | <note important> | + | <note important> |
| - | [[: | + | [[: |
| Pour cela, il faut rajouter des "exec audtool < | Pour cela, il faut rajouter des "exec audtool < | ||
| Ligne 200: | Ligne 110: | ||
| Moi j'ai une formule simple pour éviter le message d' | Moi j'ai une formule simple pour éviter le message d' | ||
| ${if_running audacious} | ${if_running audacious} | ||
| - | on pourra " | + | on pourra " |
| mais ça je sais pas faire. | mais ça je sais pas faire. | ||
| Ligne 211: | Ligne 121: | ||
| ${color #C0C8CD} ${exec audtool --current-song-bitrate-kbps} kbps * ${exec audtool --current-song-length} ${execbar expr 100 \* $(audtool --current-song-output-length-seconds) \/ $(audtool --current-song-length-seconds)} | ${color #C0C8CD} ${exec audtool --current-song-bitrate-kbps} kbps * ${exec audtool --current-song-length} ${execbar expr 100 \* $(audtool --current-song-output-length-seconds) \/ $(audtool --current-song-length-seconds)} | ||
| ${color black}${hr 2}$endif</ | ${color black}${hr 2}$endif</ | ||
| + | Selon les versions d' | ||
| + | ==== Afficher la pochette du CD avec Audacious ==== | ||
| - | ===== gmusicbrowser ===== | + | Si vous souhaitez rajouter la pochette du CD, voici un petit script |
| - | + | ||
| - | Conky peut afficher les informations de lecture de [[http:// | + | |
| - | Pas de panique cependant, un How-To est disponible [[http:// | + | |
| - | + | ||
| - | + | ||
| - | ===== Exaile ===== | + | |
| - | + | ||
| - | + | ||
| - | **Première possibilité | + | |
| - | + | ||
| - | Avec ConkyExaile & Conky : | + | |
| - | + | ||
| - | Ouvrez votre terminal puis tapez dans l' | + | |
| < | < | ||
| - | sudo wget -q http://www.kaivalagi.com/ | + | #!/bin/bash |
| - | wget -q http:// | + | IFS=$' |
| - | sudo apt-get update && sudo apt-get install conkyexaile | + | coverPath=$HOME$(audtool |
| - | </code> | + | image=$(ls |
| - | pour jaunty | + | fullPath=$coverPath/$image |
| - | < | + | |
| - | sudo wget -q http://www.kaivalagi.com/ | + | |
| - | wget -q http:// | + | |
| - | sudo apt-get update && sudo apt-get install conkyexaile | + | |
| - | </code> | + | |
| - | Pour afficher le titre, l' | + | if test -s "$fullPath" |
| + | then | ||
| + | ln -sf " | ||
| - | Lorsque vous lancez [[:Exaile]] et que vous lancez une musique celle-ci s' | + | else |
| + | if test -s " | ||
| + | then | ||
| + | rm " | ||
| + | fi | ||
| + | fi | ||
| - | //Remplacez les fonts, couleurs, par ce que vous souhaitez...// | ||
| - | |||
| - | < | ||
| - | ${if_existing / | ||
| - | ${color4}${font Deejay Supreme: | ||
| - | ${voffset 5}${color1}${font Zero Twos: | ||
| - | ${color1}${font Zero Twos: | ||
| - | ${color1}${font Zero Twos: | ||
| - | $endif | ||
| </ | </ | ||
| - | //Pourquoi ne pas utiliser le processus ? | + | Pour le **.conkyrc** il suffit d'utiliser le code vu plus haut |
| - | Tout simplement car cela ne fonctionne pas, même avec le bon (il faut faire des modifications de Exaile en lui même), par conséquent ceci est le meilleur moyen trouvé.// | + | ===== gmusicbrowser ===== |
| + | Conky peut afficher les informations de lecture de [[http:// | ||
| + | Pas de panique cependant, un How-To est disponible [[http:// | ||
| - | **Deuxième possibilité :** | ||
| - | |||
| - | Pour afficher le titre, l' | ||
| - | |||
| - | < | ||
| - | Musique en cours : | ||
| - | ${color #B44F47} ${exec exaile --get-title} $color de ${color #B44F47} ${exec exaile --get-artist} | ||
| - | $color sur l' | ||
| - | </ | ||
| ---- | ---- | ||
| - | // | + | // |
