diff options
| author | Robert Günzler <r@gnzler.io> | 2026-04-08 13:18:14 +0900 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-04-08 13:18:14 +0900 |
| commit | b61b58ce2c1371d6f904f108fa7feed3abfbe5c7 (patch) | |
| tree | 008a5cf54ecbfffb97ddac30e44c8ab224395ab0 /bin/play-music | |
| parent | d4620f3ac119263fee90bd819eadaf84fc8d50b7 (diff) | |
*
Automated-commit-by: dots Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bin/play-music')
| -rwxr-xr-x | bin/play-music | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/play-music b/bin/play-music new file mode 100755 index 0000000..14e91f1 --- /dev/null +++ b/bin/play-music @@ -0,0 +1,23 @@ +#!/bin/sh +set -eux + +music_dir=/run/media/robert/fwdrive/music + +mpa() { + mpv --profile=mpa \ + --directory-filter-types=audio \ + --autocreate-playlist=filter \ + --wayland-app-id=mpv.play-music \ + "$@" +} + +case "$1" in +shuffle) + mpa --shuffle $music_dir + ;; +select) + cd $music_dir + subdir=$(find . -type d -printf "%P\n" | shuf | fuzzel -d -w 80) + mpa "$subdir" + ;; +esac |