summaryrefslogtreecommitdiff
path: root/launch/music
blob: cb782577d4dbf8395ddda99f64091be3cf3b43df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
albumsdir=/media/4tbhdd/Music
dmenucolors="-l 25"

playsong() {
	list="`find $albumsdir -type f -name '*mka' | sort | sed 's/.*\/\(.*\) - \(.*\)\/[0-9]*: \(.*\).mka$/\3\t\1\t\2/' | awk -F '\t' '{ printf "%-120s  %-60s  %s\n", $1, $2, $3 }'`"
	selection="`echo "$list" | dmenu $dmenucolors -p 'Song:'`"
	selection="`echo "$selection" | sed 's/\(.*\)   *\(.*\)   *\(.*\)/\2 - \3\/[0-9]*: \1-/'`"
	echo "$selection"
}

playalbum() {
	list="`find $albumsdir -type d -mindepth 1 -maxdepth 1 | sort`"
}

playartist() {
	list="`find $albumsdir -type d -mindepth 1 -maxdepth 1 | sed 's/ - .*//' | sort | uniq`"
	artist=
	list="`find $albumsdir -type d -name "$artist*" | sort`"
}

playshuffle() {
	list="`find $albumsdir -type f -name "*mka" | sort -R`"
}

playsong
#play="`echo "$list" | grep "$selection"`"
#echo "$play"