jpeters

Group: Members
Posts: 804
Joined: April 2006 |
 |
Posted: Dec. 03 2007,20:59 |
 |
Added drop & drag from any icon; converts to .xpm and sends to dfm icon directory.
- - - - - - - - - - - - - - - - - - - - - #!/bin/bash
# Works with drag & drop, argument <path/icon>, or double clicking. # For double clicking, edit icon path in script. # Requires imagemagick.uci
#make sure imagemagick is loaded; if not, load
#*** EDIT mydsl-load path ****** [ -d /opt/imagemagick ] || mydsl-load /mnt/hda3/imagemagick.uci
#*** EDIT path to $ICON (for double clicking) IPATH='/mnt/hda3/Downloads'
if [ "$1" = "" ]; then echo -n 'icon to convert? ' read ICON fi
if [ "$1" != "" ]; then ICAN="$1" ICON=${ICAN##*/} IPATH=$(dirname $1) fi
#convert to .xpm file and place in dfm icon folder
[ -f $IPATH/$ICON ] && sudo /opt/imagemagick/bin/convert $IPATH/$ICON \ /usr/share/dfm/icons/${ICON%.*}.xpm
|