[music_dmenu.sh]: Add music_dmenu.sh

This commit is contained in:
2024-12-19 17:51:22 +00:00
parent 77db4d39d8
commit b32ca11042
2 changed files with 22 additions and 0 deletions

View File

@ -22,6 +22,7 @@
- `hugo_post.sh`: simple script to create a new Hugo post with the directory structure `/content/blog/Post Title/index.md` instead of the default
`/content/blog/Post Title.md` created when you run the command `hugo new content`.
- `list_manual_pkgs.sh`: one-line script to list only the names of packages manually installed with the xbps package manager (the default Void package manager).
- `music_dmenu.sh`: script to play a specific artist, album, or track selected with dmenu
- `play_music.sh`: simple script to play music albums based off the supplied artist & album name.
- `qutebrowser_search.sh`: script that finds all the search engines defined in the qutebrowser `config.py` configuration file and makes them available for
searching via dmenu, i.e. allow web searching with qutebrowser without having to wait for it to start up before you start your search.

21
music_dmenu.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# Script to play a specific artist, album, or track selected with dmenu
music_dir="$HOME/media/music"
answer="$(printf "Artist\nAlbum\nTrack" | dmenu -p "Play music by:")"
artist="$(ls "$music_dir" | dmenu -p "Artist:")"
if [ "$answer" = "Artist" ]; then
setsid umpv "$music_dir/$artist" &
else
album="$(ls "$music_dir/$artist" | dmenu -p "Album:")"
if [ "$answer" = "Album" ]; then
setsid umpv "$music_dir/$artist/$album" &
else
track="$(ls "$music_dir/$artist/$album" | dmenu -p "Track:")"
setsid umpv "$music_dir/$artist/$album/$track" &
fi
fi