Klimi's new dotfiles with stow.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/sh
|
|
# requires xclip youtube-dl dunstify
|
|
msgId="9910048"
|
|
linkk="$(xclip -o -selection primary)"
|
|
download(){
|
|
dunstify "Started downloading $linkk" -a "Youtube Downloader" -u low -r "$msgId"
|
|
youtube-dl --extract-audio --audio-format vorbis -o '$HOME/Music/nixos/\%(title)s.%(ext)s' $linkk
|
|
dunstify "FINISHED downloading $linkk" -a "Youtube Downloader" -u low -r "$msgId"
|
|
}
|
|
echo "$linkk"
|
|
case "$linkk" in
|
|
*youtube.com*) download;;
|
|
*) dunstify "ERROR!!! ${linkk} is not a valid youtube url" -u critical;;
|
|
esac
|