Fix bug with files script

master
Miles Alan 5 years ago
parent 8015d49b03
commit 41e2e31f6a
  1. 11
      scripts/appscripts/sxmo_files.sh

@ -3,9 +3,14 @@ EDITOR=vis
cd "/home/$USER/" || exit 1 cd "/home/$USER/" || exit 1
handlefiles() { handlefiles() {
echo "$1" | grep -iE ".(wav|webm|mp4|ogg|opus|m4a|flac|mov|avi)$" && st -e mpv "$@" && exit if echo "$1" | grep -iE ".(wav|webm|mp4|ogg|opus|m4a|flac|mov|avi)$"; then
echo "$1" | grep -iE ".(jpg|png|gif)$" && st -e sxiv "$@" && exit st -e mpv "$@"
st -e sh -ic "$EDITOR $*" && exit elif echo "$1" | grep -iE ".(jpg|png|gif)$"; then
st -e sxiv "$@"
else
st -e sh -ic "$EDITOR $*"
fi
exit 0
} }
while true; do while true; do

Loading…
Cancel
Save