Skip to content

Instantly share code, notes, and snippets.

@sehraramiz
Last active November 27, 2020 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sehraramiz/c60387ac33e115edca24ba6639ba8ffc to your computer and use it in GitHub Desktop.
Save sehraramiz/c60387ac33e115edca24ba6639ba8ffc to your computer and use it in GitHub Desktop.
dmenu dj
#!/bin/bash
MusicDir="$HOME/Music"
declare playlistsNames=$(find $HOME/Music -maxdepth 1 -type f -name "*.xspf" -printf "%f\n" )
choice=$(echo -e "${playlistsNames[@]}" | dmenu -l 10 -p "what's your mood? " -fn 'NotoMonoRegular:bold:pixelsize=30')
if (printf '%s\n' "${playlistsNames[@]}" | grep -xq $choice); then
vlc $MusicDir/$choice
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment