A while ago I made a tiny function in my ~/.zshrc to download a video from the link in my clipboard. I use this nearly every day to share videos with people without forcing them to watch it on whatever site I found it. What’s a script/alias that you use a lot?
# Download clipboard to tmp with yt-dlp
tmpv() {
cd /tmp/ && yt-dlp "$(wl-paste)"
}
#Create predefined session with multiple tabs/panes (rss, bluetooth, docker...) tmux-start #Create predefined tmux session with ncmpcpp and ueberzug cover music #Comfort ls = "ls --color=auto" please = "sudo !!" #Quick weather check weatherH='curl -s "wttr.in/HomeCity?2QF"' #Download Youtube playlist videos in separate directory indexed by video order in playlist -> lectures, etc ytPlaylist='yt-dlp -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s"' #Download whole album -> podcasts primarily ytAlbum='yt-dlp -x --audio-format mp3 --split-chapters --embed-thumbnail -o "chapter:%(section_title)s.%(ext)s"' # download video -> extract audio -> show notification ytm() { tsp yt-dlp -x --audio-format mp3 --no-playlist -P "~/Music/downloaded" $1 \ --exec "dunstify -i folder-download -t 3000 -r 2598 -u normal %(filepath)q" } # Provide list of optional packages which can be manually selected pacmanOpts() { typeset -a os for o in `expac -S '%o\n' $1` do read -p "Install ${o}? " r [[ ${r,,} =~ ^y(|e|es)$ ]] && os+=( $o ) done sudo pacman -S $1 ${os[@]} } # fkill - kill process fkill() { pid=$(ps -ef | sed 1d | fzf -m --ansi --color fg:-1,bg:-1,hl:46,fg+:40,bg+:233,hl+:46 --color prompt:166,border:46 --height 40% --border=sharp --prompt="➤ " --pointer="➤ " --marker="➤ " | awk '{print $2}') if [ "x$pid" != "x" ] then kill -${1:-9} $pid fi }