scripts: add meme download script
This commit is contained in:
parent
e64d87ae1c
commit
670ae65181
|
@ -24,6 +24,7 @@ create_scripts
|
|||
{
|
||||
br = [ ];
|
||||
bmenu = [ final.bemenu final.dhist fish j4-dmenu-desktop jq sway ];
|
||||
down_meme = [ wl-clipboard yt-dlp libnotify ];
|
||||
wl-copy-file = [ wl-clipboard fish ];
|
||||
_diffr = [ diffr ];
|
||||
_thunar-terminal = [ final.terminal ];
|
||||
|
|
17
scripts/down_meme
Executable file
17
scripts/down_meme
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
DIR=$(mktemp -d)
|
||||
|
||||
cd "$DIR"
|
||||
|
||||
yt-dlp --merge-output-format mp4 "$(wl-paste)"
|
||||
|
||||
FILENAME="$(ls)"
|
||||
|
||||
cp * "$HOME/Downloads/Memes/$FILENAME"
|
||||
|
||||
wl-copy-file "$HOME/Downloads/Memes/$FILENAME"
|
||||
|
||||
notify-send "Meme downloaded" "$FILENAME"
|
||||
|
||||
rm -rf "$DIR"
|
|
@ -6,6 +6,7 @@ in {
|
|||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
down_meme
|
||||
yt-dlp
|
||||
ffmpeg
|
||||
imagemagick
|
||||
|
|
Loading…
Reference in a new issue