Klimi's new dotfiles with stow.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

14 rindas
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