dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

qndl (370B)


      1 #!/usr/bin/env sh
      2 # $1 is a url; $2 is a command
      3 [ -z "$1" ] && exit
      4 base="$(basename "$1")"
      5 notify-send "⏳ Queuing $base..."
      6 cmd="$2"
      7 [ -z "$cmd" ] && cmd="youtube-dl --add-metadata"
      8 idnum="$(tsp $cmd "$1")"
      9 realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
     10 tsp -D "$idnum" mv "$base" "$realname"
     11 tsp -D "$idnum" notify-send "👍 $realname done."