#!/bin/bash dir=$(find ~/Music/ -maxdepth 1 -type d | dmenu -i -p "Pick a directory") url="$(echo '' | dmenu -p 'Enter a url')" [ -z "$url" ] && exit 0 youtube-dl --extract-audio \ --audio-format mp3 \ -o "$dir/%(title)s.%(ext)s" \ $url