From: Andre Ramnitz Date: Mon, 28 Apr 2025 10:59:44 +0000 (+0200) Subject: lf: clear marked files with ',' like selections in kakoune X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=f045db5df4e0bb6d7d61a60b2f25409aa1d48802;p=dotfiles.git lf: clear marked files with ',' like selections in kakoune --- diff --git a/dot-config/lf/lfrc b/dot-config/lf/lfrc index 413ca395..448b5a5b 100644 --- a/dot-config/lf/lfrc +++ b/dot-config/lf/lfrc @@ -92,7 +92,7 @@ cmd add-file-and-edit %{{ # set terminal title to current working directory cmd on-cd &{{ - printf "\033]0; $PWD\007" > /dev/tty + printf "\033]0;  | $PWD\007" > /dev/tty }} # extract the current file with the right command @@ -385,6 +385,13 @@ cmd selected-to-new-folder ${{ mv -- $fx "$newd" }} +# clipboard interaction +cmd yank-file $printf '%s' "$f" | wl-copy +cmd yank-paths $printf '%s' "$fx" | wl-copy +cmd yank-dirname &printf '%s' "$PWD" | wl-copy +cmd yank-basename &basename -a -- $fx | head -c-1 | wl-copy +cmd yank-basename-without-extension &basename -a -- $fx | sed -E 's/\.[^.]+$//' | head -c-1 | wl-copy + # ------------------------------------ commands: # helpers cmd open-with-gui &$@ $fx # opens asynchronously, intended for GUI applications @@ -437,7 +444,6 @@ map aw :apply-wallpaper # c = change map cd push :cd map cw : rename -map cy yank-file $printf '%s' "$f" | wl-copy -p -n map cm chmod # d = delete @@ -511,6 +517,13 @@ map xo $mimeopen --ask $f map xs $$f map xa !$f +# Y = Yank into clipboard +map Yf : yank-file +map Yp : yank-paths +map Yd : yank-dirname +map Yb : yank-basename +map YB : yank-basename-without-extension + # z = ??? zp = set info perm:user:group @@ -525,6 +538,7 @@ map filter # various commands map open +map , clear map unselect map ~ toggle_preview map C edit-config