+ Custom rename command (the built-in one sucks)

This commit is contained in:
ziro 2020-05-16 15:34:07 +07:00
parent ce4151cedd
commit e00cbc72a0

View file

@ -12,7 +12,9 @@ set smartcase true
cmd open ${{ cmd open ${{
case $(file --mime-type "$f" -bL) in case $(file --mime-type "$f" -bL) in
text/*|application/json) $EDITOR "$f";; text/*|application/json) $EDITOR "$f";;
video/*|image/*/application/pdf) xdg-open "$f" & disown;; image/*) feh -g 1280x720 --scale-down "$f" &;;
video/*) mpv "$f" --quiet > /dev/null & ;;
application/pdf) zathura "$f" & ;;
*) xdg-open "$f" ;; *) xdg-open "$f" ;;
esac esac
}} }}
@ -25,6 +27,8 @@ cmd q :quit
cmd chmod $chmod "$*" "$f" cmd chmod $chmod "$*" "$f"
cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
# printf "Mode Bits: " # printf "Mode Bits: "
# read ans # read ans
# #