From 5c8d46a4e7c68e0c4b359ce35efcf7cd8b4dd721 Mon Sep 17 00:00:00 2001 From: TheYellowArchitect Date: Sat, 11 May 2024 12:53:48 +0000 Subject: [PATCH] Added 5 new mappings, 3 of which pipe to clipboard (#1373) 1. Copies the selected filename instead of the filepath, and pipes it to clipboard. 2. Copies the selected filename and if it matches the yt-dlp downloaded video format [1234567891011], gets the full youtube URL and pipes it to clipboard. 3. Copies the selected filename and if it matches the yt-dlp downloaded video format [1234567891011], gets the full piped.video URL and pipes it to the clipboard. (piped.video is a mirror of youtube, even includes comments) 4. Opens current folder in full picture mode. Think windows large icons mode. Good for browsing quickly through image albums. 5. Ctrl+l to unselect all selections so the behaviour matches the terminal. --- .config/lf/lfrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index e783d728..bb15c62d 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -162,7 +162,14 @@ map V push :!nvim map W $setsid -f $TERMINAL >/dev/null 2>&1 -map Y $printf "%s" "$fx" | xclip -selection clipboard +map U $printf "%s" "$fx" | xclip -selection clipboard +map u $printf "%s" "$fx" | sed 's/.*\///' | xclip -selection clipboard +map . $printf "%s" "$fx" | sed -E 's/^.+\[/https:\/\/www.youtube.com\/watch?v=/' | sed -E 's/\]\..+//' | xclip -selection clipboard +map $printf "%s" "$fx" | sed -E 's/^.+\[/https:\/\/piped.video\/watch?v=/' | sed -E 's/\]\..+//' | xclip -selection clipboard +map T $sxiv -t "$(pwd)" # opens thumbnail mode +map unselect + + # Source Bookmarks source "~/.config/lf/shortcutrc"