From: Agnibho Mondal Date: Thu, 22 Feb 2018 22:57:23 +0000 (+0530) Subject: Use xdg-open X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=40956ae8f243aa9dc12fd136ea2438ee2248ee93;p=imagecap.git Use xdg-open --- diff --git a/imagecap b/imagecap index 6f2b86b..a5a8f12 100755 --- a/imagecap +++ b/imagecap @@ -22,13 +22,6 @@ # www.agnibho.com SELF="$(realpath "$0")"; -if [ "$VISUAL" ];then - EDIT="$VISUAL"; -elif [ "$EDITOR" ];then - EDIT="$EDITOR"; -else - EDIT="vi"; -fi ARG="$(echo $1 | sed "s/^file:\/\///g")"; DIR="$(dirname "$ARG")"; if [ -n "$ARG" ];then @@ -39,7 +32,7 @@ function update(){ TEMP=$(mktemp); exiftool -S -s -b -comment "$1">$TEMP; ls -l $TEMP; - $EDIT $TEMP; + xdg-open $TEMP; exiftool -overwrite_original_in_place "-comment<=$TEMP" "$1"; rm $TEMP; }