#!/bin/sh ## Created by Amdac @ www.amdac.net ## This script requires "youtube-dl" to be installed, available in any distribution's respository ## Downloads go to the /home/user/dump/ directory. url=$(rofi -dmenu -p "PASTE URL" -lines 0 -width 35 -hide-scrollbar -padding 20 -color-normal "#44484f,#eeeeee,#555555,#2233aa,#eeeeee" -color-window "#223844,#ddeeff,#223844") \ && type=$(echo "audio\nvideo\nthumbnail" | rofi -dmenu -p "TYPE" -lines 3 -width 15 -hide-scrollbar -padding 20 -color-normal "#44484f,#eeeeee,#555555,#2233aa,#eeeeee" -color-window "#223844,#ddeeff,#223844") \ && $(notify-send 'Download Started...') case $type in audio) youtube-dl --add-metadata -x --audio-quality 0 --audio-format opus -o '~/dump/%(title)s.%(ext)s' $url ;; video) youtube-dl --add-metadata -f 'bestvideo[height<=1080]' -o '~/dump/%(title)s.%(ext)s' $url ;; thumbnail) youtube-dl --write-thumbnail --skip-download -o '~/dump/%(title)s.%(ext)s' $url ;; esac [[ -n $type ]] && $(notify-send 'Download Complete!')