|
|
ru.linux- RU.LINUX --------------------------------------------------------------------- From : igor goryachev 2:5020/400 25 May 2002 02:04:28 To : Alexander Stavitsky Subject : Re: now-playing for mpg123 -------------------------------------------------------------------------------- On Sun, 19 May 2002 10:37:04 +0400, Alexander Stavitsky "AS" wrote: AS> Всем кто просил now-playing для mpg123... а для xmms ещё проще: качаем xmmsctrl с http://www.docs.uu.se/~adavid и пишем вот такой скриптик: ============== #!/bin/sh # string to add before title npPrefix="np:" # string to add atfer title if xmms is stopped npStopped="[stopped]" # string to add atfer title if xmms is paused npPaused="[paused]" # string to add atfer title if xmms is not active npDead="xmms is not active" # recodes title from $npRecodeFrom to $npRecodeTo if set # npRecode = [iconv|recode|xcode] npRecode=xcode npRecodeFrom=cp1251 npRecodeTo=koi8-r # replaces soft CR if "yes" npSoftCR=yes #################################################################### npTitle=`xmmsctrl title` if xmmsctrl running; then case "$npRecode" in iconv) npTitle=`echo $npTitle | iconv -f $npRecodeFrom -t $npRecodeTo` ;; recode) npTitle=`echo $npTitle | recode -fp $npRecodeFrom..$npRecodeTo` ;; xcode) npTitle=`echo $npTitle | xcode 2>/dev/null` esac if [ $npSoftCR = "yes" ] ; then npTitle=`echo $npTitle | tr H H` fi if xmmsctrl paused; then npString="$npPrefix $npTitle $npPaused"; else if xmmsctrl playing; then npString="$npPrefix $npTitle"; else npString="$npPrefix $npTitle $npStopped"; fi fi else npString="$npPrefix $npDead"; fi echo -n $npString ============== -- With best regards, fern. e-mail: fern@udaff.com | icq: 849342 | url: http://fern.udaff.com/ --- ifmail v.2.15dev5 * Origin: powered by SuSE Linux 7.3 (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.linux/21159c7a4640.html, оценка из 5, голосов 10
|