From 4ba50116d9228496ebbb32bfa2bc0ef7c5fefc8e Mon Sep 17 00:00:00 2001 From: Arjun Karangiya Date: Tue, 29 Mar 2022 06:54:57 +0530 Subject: Shortcuts in vim command line from bm-dirs/files (#1073) This will allow using the mappings in the vim command line. Here the leader is ";" So here `:e ;cfz` typed fast will expand into `:e /home/user/.config/zsh/.zshrc`. This is more helpful with :sp, :vs, :cd or anywhere where a file or a directory is expected in the vim command line. --- .config/nvim/init.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.config') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 09610fd..5707eae 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -149,3 +149,8 @@ function! ToggleHiddenAll() endif endfunction nnoremap h :call ToggleHiddenAll() +" Load command shortcuts generated from bm-dirs and bm-files via shortcuts script. +" Here leader is ";". +" So ":vs ;cfz" will expand into ":vs /home//.config/zsh/.zshrc" +" if typed fast without the timeout. +source ~/.config/nvim/shortcuts.vim -- cgit v1.3.1 From 953d85619a8637e64da5344e727f443046187c74 Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Tue, 29 Mar 2022 03:28:41 +0200 Subject: Replace youtube-dl with yt-dlp system-wide (#1019) * Replace youtube-dl with yt-dlp in qndl * Replace youtube-dl with yt-dlp in dmenuhandler * Replace youtube-dl with yt-dlp in newsboat config * Replace youtube-dl with yt-dlp in aliasrc Co-authored-by: Luke Smith --- .config/newsboat/config | 2 +- .config/shell/aliasrc | 2 +- .local/bin/dmenuhandler | 6 +++--- .local/bin/qndl | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to '.config') diff --git a/.config/newsboat/config b/.config/newsboat/config index 69d8960..b7a78da 100644 --- a/.config/newsboat/config +++ b/.config/newsboat/config @@ -32,7 +32,7 @@ color article white default bold browser linkhandler macro , open-in-browser macro t set browser "qndl" ; open-in-browser ; set browser linkhandler -macro a set browser "tsp youtube-dl --add-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler +macro a set browser "tsp yt-dlp --embed-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler macro v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler macro w set browser "lynx" ; open-in-browser ; set browser linkhandler macro d set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index a5cd9e1..27d4527 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -18,7 +18,7 @@ alias \ rm="rm -vI" \ bc="bc -ql" \ mkd="mkdir -pv" \ - yt="youtube-dl --add-metadata -i" \ + yt="yt-dlp --embed-metadata -i" \ yta="yt -x -f bestaudio/best" \ ffmpeg="ffmpeg -hide_banner" diff --git a/.local/bin/dmenuhandler b/.local/bin/dmenuhandler index ce9159d..3e5055f 100755 --- a/.local/bin/dmenuhandler +++ b/.local/bin/dmenuhandler @@ -4,13 +4,13 @@ # some choice programs to use to open it. feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}" -case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dl\\nqueue yt-dl audio" | dmenu -i -p "Open it with?")" in +case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dlp\\nqueue yt-dlp audio" | dmenu -i -p "Open it with?")" in "Copy URL") echo "$feed" | xclip -selection clipboard ;; mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;; "mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;; "mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;; - "queue yt-dl") qndl "$feed" >/dev/null 2>&1 ;; - "queue yt-dl audio") qndl "$feed" 'youtube-dl --add-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;; + "queue yt-dlp") qndl "$feed" >/dev/null 2>&1 ;; + "queue yt-dlp audio") qndl "$feed" 'yt-dlp --embed-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;; "queue download") qndl "$feed" 'curl -LO' >/dev/null 2>&1 ;; PDF) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; sxiv) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; diff --git a/.local/bin/qndl b/.local/bin/qndl index f6fbe87..48bc61e 100755 --- a/.local/bin/qndl +++ b/.local/bin/qndl @@ -5,7 +5,7 @@ base="$(basename "$1")" notify-send "⏳ Queuing $base..." cmd="$2" -[ -z "$cmd" ] && cmd="youtube-dl --add-metadata -ic" +[ -z "$cmd" ] && cmd="yt-dlp --embed-metadata -ic" idnum="$(tsp $cmd "$1")" realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")" tsp -D "$idnum" mv "$base" "$realname" -- cgit v1.3.1