diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2022-02-10 15:06:51 -0600 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2022-02-10 15:06:51 -0600 |
commit | f010f9b4ef11d3d974ba8d7b8b4b1364e5955d9a (patch) | |
tree | f405f8a072735f54777cb36ca67d816cc6492888 /launch/music | |
parent | 1ffe58f3ee6eeb2d81729eb7c458a8979eb2df68 (diff) | |
download | scripts-f010f9b4ef11d3d974ba8d7b8b4b1364e5955d9a.tar.xz scripts-f010f9b4ef11d3d974ba8d7b8b4b1364e5955d9a.zip |
add music and shows script
Diffstat (limited to 'launch/music')
-rwxr-xr-x | launch/music | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/launch/music b/launch/music new file mode 100755 index 0000000..cb78257 --- /dev/null +++ b/launch/music @@ -0,0 +1,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" |