Update lfrc

This commit is contained in:
daniele 2024-04-16 22:34:36 +02:00
parent 435074b760
commit 25ec05c49a
Signed by: fuxino
GPG Key ID: 981A2B2A3BBF5514

View File

@ -37,15 +37,6 @@ cmd open &{{
esac esac
}} }}
# define a custom 'delete' command
# cmd delete ${{
# set -f
# printf "$fx\n"
# printf "delete?[y/n]"
# read ans
# [ "$ans" = "y" ] && rm -rf $fx
# }}
# extract the current file with the right command # extract the current file with the right command
# (xkcd link: https://xkcd.com/1168/) # (xkcd link: https://xkcd.com/1168/)
cmd extract ${{ cmd extract ${{
@ -60,24 +51,6 @@ cmd extract ${{
esac esac
}} }}
# compress current file or selected files with tar and gunzip
cmd tar ${{
set -f
mkdir $1
cp -r $fx $1
tar czf $1.tar.gz $1
rm -rf $1
}}
# compress current file or selected files with zip
cmd zip ${{
set -f
mkdir $1
cp -r $fx $1
zip -r $1.zip $1
rm -rf $1
}}
# custom commands # custom commands
# #
# files and dirs # files and dirs
@ -93,6 +66,26 @@ cmd mkfile ${{
touch $ans touch $ans
}} }}
# compress current file or selected files with tar and gunzip
cmd tar ${{
printf "Archive name: "
read ans
mkdir $ans
cp -r $fx $ans
tar czf $ans.tar.gz $ans
rm -rf $ans
}}
# compress current file or selected files with zip
cmd zip ${{
printf "Archive name: "
read ans
mkdir $ans
cp -r $fx $ans
zip -r $ans.zip $ans
rm -rf $ans
}}
# trash management # trash management
cmd trash ${{ cmd trash ${{
files=$(printf "$fx" | tr '\n' ';') files=$(printf "$fx" | tr '\n' ';')
@ -116,6 +109,10 @@ cmd trash-restore ${{
trash-restore trash-restore
}} }}
cmd on-select &{{
lf -remote "send $id set statfmt \"$(eza -ld --color=always "$f")\""
}}
# keybindings # keybindings
# #
# remove some defaults # remove some defaults