Код: Выделить всё
#!/bin/sh
export BC_ENV_ARGS=-l
CHNG='/apps/compiz/plugins/winrules/screen0/options'
SIZEX=`feh -l "$@" |cut -f 3|sed 1d`
SZY=$((`feh -l "$@" |cut -f 4|sed 1d`+80))
SZX=$(echo "$SIZEX / ($SZY / 800)" | bc | cut -d . -f 1)
if [ $SZY -ge 800 ]; then
if [ $SZX -ge 1280 ]; then
gconftool-2 --type list --set $CHNG/size_matches --list-type string [name=gthumb]
gconftool-2 --type list --set $CHNG/size_width_values --list-type int [1275]
gconftool-2 --type list --set $CHNG/size_height_values --list-type int [781]
gthumb "$@"
fi
fi
if [ $SZY -ge 800 ]; then
if [ $SZX -lt 1280 ]; then
gconftool-2 --type list --set $CHNG/size_matches --list-type string [name=gthumb]
gconftool-2 --type list --set $CHNG/size_width_values --list-type int [$SZX]
gconftool-2 --type list --set $CHNG/size_height_values --list-type int [781]
gthumb "$@"
fi
fi
if [ $SZY -lt 800 ]; then
if [ $SIZEX -ge 540 ]; then
gconftool-2 --type list --set $CHNG/size_matches --list-type string [name=gthumb]
gconftool-2 --type list --set $CHNG/size_width_values --list-type int [$SIZEX]
gconftool-2 --type list --set $CHNG/size_height_values --list-type int [$SZY]
gthumb "$@"
fi
fi
if [ $SZY -lt 800 ]; then
if [ $SIZEX -lt 540 ]; then
gconftool-2 --type list --set $CHNG/size_matches --list-type string [name=gthumb]
gconftool-2 --type list --set $CHNG/size_width_values --list-type int [540]
gconftool-2 --type list --set $CHNG/size_height_values --list-type int [$SZY]
gthumb "$@"
fi
fi
И всякие сиды-авки идут лесом, к сожаленью, при замене ими ничего не работает.