Xchat-xmms
Jump to navigation
Jump to search
Unix platformai skirtas įskiepis[keisti]
Prieš tai reiktu įdiegti perl Xmms valdymo galimybę:
perl -MCPAN -e "install Bundle::Xmms"
Įskiepio kodas:
use Xmms::Remote (); use MP3::Info (); Xchat::register ("XCHT-XMMS", "0.2"); Xchat::hook_command("music", "humanslave"); $rmt = Xmms::Remote->new(); sub humanslave { $ttl = $rmt->get_playlist_title; $trk = $rmt->get_playlist_pos; $fle = $rmt->get_playlist_file($trk); eval {$tag = MP3::Info::get_mp3tag($fle)}; if ($@) { $alb = "" } else { $alb = $tag->{"ALBUM"}; if ($alb ne "") { $alb = "($alb)" } } Xchat::command("me \klauso \- $ttl\ $alb "); }
Išsaugokite kaip xmms.pl įdėkite į ~/.xchat2/ ir įkraukite.
Parodymas ką groja jūsų xmms komanda /music.
Lengvesnis budas[keisti]
Sis budas aprasytas naudojant xmms song change plugina. Pirmiausia reiktu sukonfiguruoti musu plugina, einame i
xmms > Preferences > General Plugins > Song Change ir spaudziame Configure
Dialoge susirandame "Shell-command to run when xmms starts a new song" i command laukeli irasome:
echo "groja: %n" > ~/.xchat2/xmms
Spaudziame OK. Isijungiame xchat ir einame:
Settings > Advanced > User commands
Ten spaudziame "add new" i ten surasome:
name: np command: exec -o cat ~/.xchat2/xmms
Stai ir viskas.