Man, am I the greatest

This commit is contained in:
λmolinae 2025-06-07 06:27:03 +00:00
parent 696dcd1d27
commit 0b4e7f9185
13 changed files with 163 additions and 163 deletions

View file

@ -11,30 +11,13 @@ set cleaner ctpvclear
# show hidden files
set hidden true
# interpreter for shell commands
set shell sh
# set '-eu' options for shell commands
# These options are used to have safer shell commands. Option '-e' is used to
# exit on error and option '-u' is used to give error for unset variables.
# Option '-f' disables pathname expansion which can be useful when $f, $fs, and
# $fx variables contain names with '*' or '?' characters. However, this option
# is used selectively within individual commands as it can be limiting at
# times.
set shellopts '-eu'
# set internal field separator (IFS) to "\n" for shell commands
# This is useful to automatically split file names in $fs and $fx properly
# since default file separator used in these variables (i.e. 'filesep' option)
# is newline. You need to consider the values of these options and create your
# commands accordingly.
set ifs "\n"
# leave some space at the top and the bottom of the screen
set scrolloff 10
# Use the `dim` attribute instead of underline for the cursor in the preview pane
set cursorpreviewfmt "\033[7;2m"
set drawbox
# use enter for shell commands
map <enter> shell
@ -68,14 +51,6 @@ map a :push %mkdir<space>
cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
map r push :rename<space>
# make sure trash folder exists
# %mkdir -p ~/.trash
# move current file or selected files to trash folder
# (also see 'man mv' for backup/overwrite options)
# cmd trash %set -f; mv $fx ~/.trash
# define a custom 'delete' command
cmd delete ${{
set -f
printf "$fx\n"
@ -84,8 +59,6 @@ cmd delete ${{
[ "$ans" = "y" ] && rm -rf $fx
}}
# use '<delete>' key for either 'trash' or 'delete' command
# map <delete> trash
map <delete> delete
# extract the current file with the right command
@ -97,28 +70,17 @@ cmd extract ${{
*.tar.gz|*.tgz) tar xzvf $f;;
*.tar.xz|*.txz) tar xJvf $f;;
*.zip) unzip $f;;
*.rar) unrar x $f;;
*.7z) 7z x $f;;
#*.rar) unrar x $f;;
#*.7z) 7z x $f;;
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
map E extract
cmd mkexec ${{
chmod u+x $fx
printf "$fx is now executable"
}}
# 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
}}
map V mkexec
cmd setbg "$1"
map b $setbg $f