set promptfmt "\033[35;1m%u@%h\033[0m \033[36;1m%d\033[0m\033[1m%f\033[0m" set cursorpreviewfmt "\033[7m" set dircounts set info size set ratios 3:8:7 set scrolloff 3 map d map dd cut map dD delete map s shell map S $$SHELL map a rename map A :rename; cmd-end map C bulkrename map I :rename; cmd-home map r push :open-with map redraw map gh cd ~/ map gi $lf -remote "send $id cd /run/media/$USER" map gm cd /mnt map gs cd /smb map bg &set-wallpaper "$fx" cmd open ${{ realfile="$(readlink -f -- "$fx")" if file -bi -- "$realfile" | grep -vq "charset=binary"; then $EDITOR -- "$fx" else mime="$(file -b --mime-type -- "$realfile")" case "$mime" in audio/*) if (type handlr 1>/dev/null 2>&1 && handlr get "$mime" 2>/dev/null | grep -qi "mpv") || (type xdg-open 1>/dev/null 2>&1 && xdg-mime query default "$mime" 2>/dev/null | grep -qi "mpv"); then "$(command -v io.mpv.Mpv mpv | head -1)" -- "$fx" elif type handlr 1>/dev/null 2>&1; then setsid -f handlr open -- "$fx" elif type xdg-open 1>/dev/null 2>&1; then setsid -f xdg-open "$fx" fi;; image/*) if (type handlr 1>/dev/null 2>&1 && handlr get "$mime" 2>/dev/null | grep -qi "sxiv") || (type xdg-open 1>/dev/null 2>&1 && xdg-mime query default "$mime" 2>/dev/null | grep -qi "sxiv"); then setsid -f sxiv-rifle "$f" elif type handlr 1>/dev/null 2>&1; then setsid -f handlr open -- "$fx" elif type xdg-open 1>/dev/null 2>&1; then setsid -f xdg-open "$fx" fi;; text/*) $EDITOR -- "$fx";; *) if type handlr 1>/dev/null 2>&1; then handlr open -- "$fx" elif type xdg-open 1>/dev/null 2>&1; then xdg-open "$fx" fi esac fi }} cmd open-with %setsid -f "$@" -- "$fx" 1>/dev/null 2>&1 cmd bulkrename ${{ printf '%s\n' "$fx" | vidir - }} cmd on-cd &{{ space_avail="$(df -h --output="avail" "$PWD" | awk 'FNR==2 {print $1}')" space_total="$(df -h --output="size" "$PWD" | awk 'FNR==2 {print $1}')" printf "\033]0;(%s/%s) %s - LF\007" "$space_avail" "$space_total" "$PWD" 1>/dev/tty }} on-cd