1
0
Fork 0

use new trash tool

This commit is contained in:
Luca Bilke 2024-05-02 19:43:30 +02:00
parent 9e7c73dde8
commit 90ff8747c0
No known key found for this signature in database
GPG Key ID: AD6630D0A1E650AC
1 changed files with 15 additions and 4 deletions

View File

@ -27,12 +27,23 @@ cmd open-with ${{
}}
cmd trash &{{
for f in $fx; do
trash-put $f &
done
trash-cli put $fx
lf -remote "send load"
}}
cmd trash-restore ${{
fileid=$(
trash-cli list "$PWD" |
fzf -d '\0' \
--with-nth=1 \
--nth=1 \
--preview='printf "Original path: %s\nInfo path: %s\nTrashed on: %s\n" {1} {2} {3}' |
cut -d '' -f 2
)
[ -z "$fileid" ] && exit
trash-cli restore $fileid
}}
cmd lazygit %{{
dir=$(dirname "$(realpath "${f:-_}")"})
if ! git --noglob-pathspecs -C $dir status >/dev/null 2>&1; then
@ -280,7 +291,7 @@ map st :set sortby time; set info time
map sa :set sortby atime; set info atime
map sc :set sortby ctime; set info ctime
map se :set sortby ext; set info
map <c-t> $trash-restore $PWD
map <c-t> trash-restore
map t tag-toggle
map T trash
map u :clear; unselect