Created
March 18, 2015 16:13
-
-
Save masterzorag/44a0825d269096abb0a2 to your computer and use it in GitHub Desktop.
A gtk+ GUI (gtkdialog) to play multimedia (mplayer) in a folder-selection from terminals.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
### a gtk+ GUI (gtkdialog) to play multimedia (mplayer) in a folder-selection ### | |
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>xterm -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 -c --program=MAIN_DIALOG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment