antiright-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Antiright-devel] antiright/src ACE


From: Jeffrey Bedard
Subject: [Antiright-devel] antiright/src ACE
Date: Tue, 28 Dec 2004 21:45:24 -0500

CVSROOT:        /cvsroot/antiright
Module name:    antiright
Branch:         
Changes by:     Jeffrey Bedard <address@hidden> 04/12/29 02:33:48

Modified files:
        src            : ACE 

Log message:
        Re-added the BitchX jukebox functionality in a much cleaner fashion.  
The user is now prompted once if he or she wishes to use the bitchx aliases.  
/amp prints the song, and /amn goes to the next song.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/antiright/antiright/src/ACE.diff?tr1=1.33&tr2=1.34&r1=text&r2=text

Patches:
Index: antiright/src/ACE
diff -u antiright/src/ACE:1.33 antiright/src/ACE:1.34
--- antiright/src/ACE:1.33      Tue Dec 28 03:04:53 2004
+++ antiright/src/ACE   Wed Dec 29 02:33:47 2004
@@ -284,18 +284,37 @@
 {
     kill $(ps xa | grep JUKE | grep -v grep | awk '{print $1}')
 }
+Juke_Song()
+{
+       # This was written by Bain <address@hidden>
+       perl -e 'my $a; while(<>) { next 
if(!/Playing/);($a)=$_=~/^(?:\b\w+\b|\s){8}(.*?).{3}$/ } print "Playing $a\n";'\
+       ~/.antiright_mp3s
+}
+Install_BitchX()
+{
+       echo '^alias amp {exec -o ACE -A Juke_Song}' >> ~/.bitchxrc
+       echo '^alias amn {exec -o killall -SIGINT mpg123}' >> ~/.bitchxrc
+}
 Juke()
 {
+       if [ ! -f ~/.antiright_bitchx_done ]; then
+               touch ~/.antiright_bitchx_done
+               $ARSHELL -Al "Install AntiRight's BitchX aliases?" \
+               "ACE -A Install_BitchX \# Yes" "echo No" -E
+       fi
        local mp3player="$(ACE -r mp3_player)"
        local mp3dir="$(ACE -r mp3_dir)"
-       local stop_play="killall $mp3player"
-       local play_next="killall $mp3player; $mp3player -Z $mp3dir/*.mp3"
+       local stop_play="killall $mp3player; rm -f ~/.antiright_mp3s"
+       local play_next="killall $mp3player; $mp3player -Z $mp3dir/*.mp3 2> 
~/.antiright_mp3s"
        local killjukebox="ACE -A KillJuke"
+       rm -f ~/.antiright_mp3s
+       touch ~/.antiright_mp3s
        $ARSHELL -W JUKE\
-       -Ai "$KillJuke" $bmdir/antiright/close.xbm\
+       -Ai "$killjukebox" $bmdir/antiright/close.xbm\
        -Ai "$stop_play" $bmdir/antiright/stop.xbm\
        -Ai "$play_next" $bmdir/antiright/play.xbm\
-       -geometry -0+0 -xrm "*overrideRedirect: True" 
+       -geometry -0+0 -xrm "*overrideRedirect: True" &
+       tail -F ~/.antiright_mp3s       
 }
 Jukebox()
 {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]