Klimi's new dotfiles with stow.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 lines
536 B

#!/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