From 1e52dd3bc62e45ba8b52e6f83feecb75234ed8f3 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 6 Jan 2022 14:14:21 +0000 Subject: music collection via dmenu --- music.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 music.sh diff --git a/music.sh b/music.sh new file mode 100755 index 0000000..9027c22 --- /dev/null +++ b/music.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +set -xe + +# nicked from https://hmbrg.xyz/log/2021/listen-to-audio-collection-via-dmenu-mpv/ +# ALl credit to them! Thank you. + +### ----------------------------------------------------------------- +### Global variables: +### ----------------------------------------------------------------- +DIR=~/annex/Music +PLAYER=mpv +DMENU='dmenu -i -l 30 -nb yellow -nf black' + +### ----------------------------------------------------------------- +### Select the subdirectory from which you want to play the MP3 file: +### ----------------------------------------------------------------- +albums=$(ls -1 "$DIR" | $DMENU -p "Select subdir: ") + +### ----------------------------------------------------------------- +### Select the subdirectory from which you want to play the MP3 file: +### ----------------------------------------------------------------- +album=$(ls -1 "$DIR/$albums" | $DMENU -p "Select album: ") + +### ----------------------------------------------------------------- +### Select MP3 file to play back: +### ----------------------------------------------------------------- +mp3=$(ls -1 "$DIR/$albums/$album/" | $DMENU -p "MP3 to play back: ") + +### ----------------------------------------------------------------- +### Play back selected MP3 file: +### ----------------------------------------------------------------- +$PLAYER "$DIR/$albums/$album/$mp3" --no-video + -- cgit v1.2.3 From 0de1dd4efc60be36b7516342c5644c09095702da Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 6 Jan 2022 14:23:13 +0000 Subject: removed debug settingsW --- music.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/music.sh b/music.sh index 9027c22..c9c5842 100755 --- a/music.sh +++ b/music.sh @@ -1,7 +1,5 @@ #!/bin/sh -set -xe - # nicked from https://hmbrg.xyz/log/2021/listen-to-audio-collection-via-dmenu-mpv/ # ALl credit to them! Thank you. @@ -10,7 +8,7 @@ set -xe ### ----------------------------------------------------------------- DIR=~/annex/Music PLAYER=mpv -DMENU='dmenu -i -l 30 -nb yellow -nf black' +DMENU='dmenu -i -l 30 -nb #b96dbf -nf white' ### ----------------------------------------------------------------- ### Select the subdirectory from which you want to play the MP3 file: -- cgit v1.2.3