Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 28 Nov 2014, 04:55
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Simple GTKDialog Music Player
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
svanya

Joined: 29 Sep 2014
Posts: 3

PostPosted: Mon 17 Nov 2014, 20:34    Post subject:  Simple GTKDialog Music Player
Subject description: run it, choose a directory, "shuffle/loop plays" that directory with mplayer
 

Hi, All.

For me the best part of puppy is the speed at which apps open, aka. no frills approach.

With that in mind I wrote the following.

Copy it to a shell script,
set permissions to runable,
open it,
select a directory,
click the OK button on the GTKDialog window
and
it will open a terminal with mplayer loaded with all of the mp3, wav, and wma files (recursively loaded) in that directory as a looped/shuffled playlist.

To close the app, close the mplayer window then click CANCEL on the GTKDialog window.

Note: if unhappy with a certain song, just select the mplayer/terminal window and push ENTER and it will go to the next song;
if unhappy with the entire folder close the mplayer/term window and select a different directory.

I run 7 desktops so am leaving this as an item on the desktop and then use if it from there.

-peace

Code:

#! /bin/bash

export MAIN_DIALOG='
 <vbox>
  <frame Player>
  <text>
      <label>Choose a Directory</label>
  </text>
      <hbox>
      <entry accept="directory">
        <label>Select a Directory</label>
        <variable>FILE_DIRECTORY</variable>
      </entry>
      <button>
        <input file stock="gtk-open"></input>
        <variable>FILE_BROWSE_DIRECTORY</variable>
        <action type="fileselect">FILE_DIRECTORY</action>
      </button>
    </hbox>
  </frame>
  <hbox>
      <button use-stock="true" label="gtk-ok">
         <variable>OKBUTTON</variable>
   <action>rxvt -hold -e find "$FILE_DIRECTORY" -regextype posix-awk -regex "(.*.mp3|.*.wav|.*.wma)" -exec mplayer -shuffle -loop 0 {} +</action>
      </button>
      <button cancel></button>
  </hbox>
 </vbox>
'

gtkdialog --program=MAIN_DIALOG


PS. I understand this is extensible via various filetype filters, taking out the shuffle and loop, etc. But for me, this is enough for now.

Ciao!/Chow! Very Happy And have fun.
Back to top
View user's profile Send private message 
trapster


Joined: 28 Nov 2005
Posts: 2029
Location: Maine, USA

PostPosted: Mon 17 Nov 2014, 21:20    Post subject:  

Awesome!!
Very simple.

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
starhawk

Joined: 22 Nov 2010
Posts: 3144
Location: Everybody knows this is nowhere...

PostPosted: Mon 17 Nov 2014, 21:31    Post subject:  

I'd love to see a screenshot of this in operation...

Wink

_________________

Back to top
View user's profile Send private message 
svanya

Joined: 29 Sep 2014
Posts: 3

PostPosted: Mon 17 Nov 2014, 22:16    Post subject: Screenshot(s)  

Here are attached, pix (in order) of the windows that open, sorry folks this is in reverse order, i.e. the topmost is what it looks like once you select a directory, the second on is the windows manager once you click the folder icon, and the last one is the app itself.

Hope this helps.

Chow!
Gtkmusicplayer3.png
 Description   Mplayer once it opens...
 Filesize   23.75 KB
 Viewed   58 Time(s)

Gtkmusicplayer3.png

Gtkmusicplayer2.png
 Description   Once you click the folder icon, your windows manager opens, in my case ROX
 Filesize   82.59 KB
 Viewed   59 Time(s)

Gtkmusicplayer2.png

Gtkmusicplayer.jpg
 Description   The Initial App Window
 Filesize   23.09 KB
 Viewed   59 Time(s)

Gtkmusicplayer.jpg

Back to top
View user's profile Send private message 
starhawk

Joined: 22 Nov 2010
Posts: 3144
Location: Everybody knows this is nowhere...

PostPosted: Mon 17 Nov 2014, 22:17    Post subject:  

OK, so it's basically a console player.

Sorry, I'm out... can't stand that stuff for some reason.

_________________

Back to top
View user's profile Send private message 
sfs

Joined: 02 Nov 2013
Posts: 26
Location: Russia

PostPosted: Tue 18 Nov 2014, 08:29    Post subject:  

mplayer -> madplay (150k) ?
gtkdialog -> yad --notification ?
post 23

_________________
PuppyRus-Arch
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0534s ][ Queries: 12 (0.0035s) ][ GZIP on ]