scripts: add meme download script
This commit is contained in:
		
							parent
							
								
									e64d87ae1c
								
							
						
					
					
						commit
						670ae65181
					
				
					 3 changed files with 19 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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"
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue