[music_dmenu.sh]: Add music_dmenu.sh
This commit is contained in:
@ -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
|
- `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`.
|
`/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).
|
- `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.
|
- `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
|
- `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.
|
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
21
music_dmenu.sh
Executable 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
|
Reference in New Issue
Block a user