| Category: | Audio Related Programs |
| Author/Contact Info | If you have any suggestion, please email me at throttlehackcrack(_at_)yahoo(_dot_)it . (instead of (_at_) use @, the same for ( |
| Description: | Well, I often listen to music when I'm working, so I put xmms in background and I play all the mp3s that i have. But I don't like all of them, so i have to resume XMMS' icon (in fluxbox it's a bit boring) and change song. So i wrote this little script. It doesn't occupy much space on the screen, so you can have this in the foreground without problem, and you can change song whenever you want, without having to resume xmms (that must be started before you run this script).
This was my first working (and someway useful) perl script. I wrote it this summer. It needs Tk to work properly, so install it. |
#!/usr/bin/perl #XMMS Controller (C)2004 by Throttle #This program is free software. You can use, copy, modificate, distrib +ute it under #the terms of GNU GPL version 2 or later. The software is provided wit +h no warranty. use strict; use Tk; my $window = MainWindow->new(-title=>"XMMS Controller"); $window->Button(-text=>"Prev", -command=> sub{click(1)})->pack(-side=> +'left'); $window->Button(-text=>"Play", -command=> sub{click(2)})->pack(-side=> +'left'); $window->Button(-text=>"Pause", -command=> sub{click(3)})->pack(-side= +>'left'); $window->Button(-text=>"Next", -command=> sub{click(4)})->pack(-side=> +'left'); $window->Button(-text=>"Exit", -command=>[$window=>'destroy'])->pack; MainLoop; sub click { my $todo = shift; if($todo == 1) {system "xmms -r";} if($todo == 2) {system "xmms -p";} if($todo == 3) {system "xmms -u";} if($todo == 4) {system "xmms -f";} } |
|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XMMS Controller
by Chady (Priest) on Nov 04, 2004 at 07:33 UTC |