#!/bin/sh

if [ -z "$*" ]; then
    magnet="$(xclip -out clipboard)"
else
    magnet=$*
fi

x=$(printf "MOVIES\\nSoftwares" | dmenu -p "Select Directory :" | tr -d '\n')

notify-send "Torrent:Rukk ja cheecha Download ho rha hai"
echo "$magnet"
aria2c -d $x --seed-time=0 "$magnet" && notify-send "Torrent:cheecha download hogyi" || notify-send -u critical "Torrent:cheecha error!!"
