nixos-config/scripts/down_meme
2023-10-06 23:07:15 -03:00

20 lines
306 B
Bash
Executable file

#!/bin/sh
DIR=$(mktemp -d)
cd "$DIR"
yt-dlp --merge-output-format mp4 "$(wl-paste)"
FILENAME="$(ls | head -n1)"
mkdir -p "$HOME/Downloads/Memes"
cp "$FILENAME" "$HOME/Downloads/Memes/$FILENAME"
wl-copy-file "$HOME/Downloads/Memes/$FILENAME"
notify-send "Meme downloaded" "$FILENAME"
rm -rf "$DIR"