You are not logged in.
Pages: 1
I wrote this little script to rename pictures using qiv:
#!/bin/bash
set -e
FILE="$1"
if [ ! -f "$FILE" ] ;then exit 1 ;fi
FILENAME=$(basename "$FILE")
DIRNAME=$(dirname "$FILE")/
EXT="${FILENAME##*.}"
FILENAME="${FILENAME%.*}"
NEWNAME="`zenity --entry --title='New name?' --entry-text="$FILENAME" 2>/dev/null`"
case "$NEWNAME" in
/*) NEWNAME="$NEWNAME"."$EXT" ;;
*) NEWNAME="$DIRNAME""$NEWNAME"."$EXT" ;;
esac
if [ -e "$NEWNAME" ] ;then
echo 'Destination filename ('"$NEWNAME"') exists, abort.'
exit 1
fi
mv -n "$FILE" "$NEWNAME"
echo "NEWNAME=$NEWNAME"It works fine when qiv is in window mode. However, if I call it while qiv is fullscreen X become unresponsive. The zenity window appear, but I cannot write in it I cannot change windows with alt-tab or doing anything a part of going in the console and kill qiv/zenity.
Is there any workaround?
Offline
Pages: 1