Version 3 of Gnocl JukeBox

Updated 2011-03-17 14:26:59 by escargo

WJG (17/03/11) I don't like bloatware. I like things simple, like me. The media players that ship with our Distros are just too complicated and well, annoying. I wanted to listen to my favourite audio tracks whilst working this morning and was so fed up of fiddling with apps that I thought: "Gnocl has built-in sound playback, let's build a custom jukebox!" So, here it is.

#---------------
# playOGG.tcl
#---------------
#!/bin/sh
#\
exec tclsh "$0" "$@"

package require Gnocl

set box [gnocl::box -orientation vertical]

set i 0
foreach track [lsort [glob *.ogg]] {
        set b($i) [gnocl::button \
                -icon %#Cdrom \
                -text $track \
                -onClicked "gnocl::sound \"$track\""]
        $box add $b($i)
        incr i
}

gnocl::window -child $box
gnocl::mainLoop