Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Fast icon converter (to xpm).< Next Oldest | Next Newest >
jpeters Offline





Group: Members
Posts: 804
Joined: April 2006
Posted: Nov. 14 2007,08:27 QUOTE

#!/bin/bash
     
  # requires imagemagick.uci
     
  #makes sure imagemagick is loaded; if not, loads it:
     
  #***  EDIT  path to imagemagick.uci ******
  [ -d /opt/imagemagick ] || mydsl-load /mnt/hda3/imagemagick.uci
     
     
  echo -n 'icon to convert? '
  read ICON
     
  #converts to .xpm file and places in dfm icon folder:
 
     
   #***  EDIT  path to $ICON ****
  IPATH='/mnt/hda3/Downloads'
     
     [ -f /$IPATH/$ICON ] && sudo /opt/imagemagick/bin/convert $IPATH/$ICON /usr/share/dfm/icons/${ICON%.*}.xpm
Back to top
Profile PM 
jpeters Offline





Group: Members
Posts: 804
Joined: April 2006
Posted: Nov. 15 2007,15:37 QUOTE

Edited the script so that it replaces the former icon name with .xpm vs just adding it on.
Back to top
Profile PM 
jpeters Offline





Group: Members
Posts: 804
Joined: April 2006
Posted: Nov. 17 2007,19:11 QUOTE

Edit:  Put in IPATH var to simplify path edit.
Back to top
Profile PM 
jpeters Offline





Group: Members
Posts: 804
Joined: April 2006
Posted: Dec. 03 2007,20:59 QUOTE

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
Back to top
Profile PM 
john.martzouco Offline





Group: Members
Posts: 253
Joined: Nov. 2007
Posted: Dec. 30 2007,21:44 QUOTE

Thanks J,

I just used this with drag and drop and it was very helpful.
Back to top
Profile PM 
5 replies since Nov. 14 2007,08:27 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Fast icon converter (to xpm).

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code