#!/bin/bash
#
# qiv-command: handler for qiv's 'qiv-command' stuff
#
# notes on what I use this for, and how:
# http://impressive.net/archives/fogo/20020807045115.GB12659@impressive.net
#
# Gerald Oskoboiny, 5 Aug 2002
#
# $Id: qiv-command,v 1.7 2019/10/14 21:34:43 gerald Exp $
#

case "$1" in
1|2|3|4|5|6|7|8|9)
    echo "$@" "$PWD/$2" >> $HOME/misc/temp/qiv-ratings
    ;;

^orig|^o)
    qiv-original $2 &
    ;;

^skip|^s)
    echo NEWNAME=/dev/null
    ;;

^mark*)
    echo "${1#^mark }" "$PWD/$2" >> $HOME/misc/temp/qiv-log
    ;;

^keep|^k)
    mv -i "$2" keep/
    ;;

# usage: ^resize x1200 (where x1200 is some imagemagick geometry)
^resize*)
    resize-images ${1#^resize } "$2" &
    ;;

*)
    echo unsupported qiv-command command: $1
    ;;

esac

#
# changelog:
# $Log: qiv-command,v $
# Revision 1.7  2019/10/14 21:34:43  gerald
# committing uncommitted changes from conky, last mod 2008-11-26 13:07:17Z
#
# Revision 1.6  2008-09-07 07:04:47  gerald
# added ^k and ^o as shorter versions of ^keep and ^orig
#
# Revision 1.5  2008-07-06 09:44:15  gerald
# combined all my favorite qiv-command hacks into one script;
# generalized resizing using ^resize command; made 1-9 log ratings
#
# Revision 1.4  2008-07-06 09:27:06  gerald
# added ^skip and ^keep commands (just discovered qiv's ^ feature)
#
# Revision 1.3  2006/09/14 10:05:44  gerald
# regenerated with new version of captivate
#
# Revision 1.2  2002/08/07 04:57:16  gerald
# added notes on what I use this for, and how
#
# Revision 1.1  2002/08/06 19:21:07  gerald
# handler for qiv's 'qiv-command' stuff
#
#

