You are not logged in.
This is a response to the problem of icons overlapping the text labels in Easy Mode -since one of the updates or if you have a European model with the larger icon sizes.
Current version 1.3
From http://forum.eeeuser.com/viewtopic.php?id=21124 in order to better keep track of latest changes to script.
Thanks to Jefficus for original script, and solenostomus and Niel1952 for suggestions and improvements.
The script is below. It has been tested on only a few machines so far so please backup your /opt/xandros/share/AsusLauncher folder first! (It should work as intended but it might not look good on some icons, depending on size and position etc)
Alternatively, make a new temporary folder, change ICONDIR to point to that folder and copy in accessibility_icon_background.png, business_icon_background.png, home_icon_background.png & student_icon_background.png then if you put any name_norm.png in this folder and run the script it will only convert those icons.
The more testers though, the better. Thanks.
#! /bin/bash
##########################################################################
# By SteveLawUK based on a script by Jeff Smith <jeff.smith@usask.ca> #
# The script will search through every *_norm.png 120x120 icon in the #
# AsusLauncher folder (can be changed) and resize to 130x130 producing #
# the highlight icons to go with them. #
# #
# Version 1.3 BETA #
# #
# Thanks to solenostomus and Niel1952 for help and feedback #
##########################################################################
# This is the folder containing the background and _norm icons - change if you want to keep your AsusLauncher folder safe
ICONDIR="/opt/xandros/share/AsusLauncher"
ENDNAME="_hi.png"
cd $ICONDIR
accessibility_icon="accessibility_icon_background.png"
business_icon="business_icon_background.png"
home_icon="home_icon_background.png"
student_icon="student_icon_background.png"
# Check for existence of background icons
if [ ! -e "$accessibility_icon" -o ! -e "$business_icon" -o ! -e "$home_icon" -o ! -e "$student_icon" -o ! -e "$home_icon" ]; then
echo "Cannot find the background icons"
echo "Please save the files in $ICONDIR"
exit 1
fi
# Check size of background icons and resize if necessary
if [ `identify -format '%wx%h' $accessibility_icon` = "120x120" ]; then
convert $accessibility_icon -resize 130x130 $accessibility_icon
echo "Resized $accessibility_icon"
fi
if [ `identify -format '%wx%h' $business_icon` = "120x120" ]; then
convert $business_icon -resize 130x130 $business_icon
echo "Resized $business_icon"
fi
if [ `identify -format '%wx%h' $home_icon` = "120x120" ]; then
convert $home_icon -resize 130x130 $home_icon
echo "Resized $home_icon"
fi
if [ `identify -format '%wx%h' $student_icon` = "120x120" ]; then
convert $student_icon -resize 130x130 $student_icon
echo "Resized $student_icon"
fi
# Get all files that end with "_norm.png"
for i in *_norm.png
do
FILENAME=$i
# Only apply it images that are 120x120 in size
if [ `identify -format '%wx%h' $FILENAME` = "120x120" ]; then
# Copy a backup of the old icon first
cp -p $FILENAME ${FILENAME}_backup
echo "Converting $FILENAME"
NEWNAME=${FILENAME/_norm.png/}$ENDNAME
# Make the new base (norm) icon 130x130 and shift it up from the centre (to clear the text)
convert $FILENAME -repage 130x130+5-10 -background none -flatten $FILENAME
# Now make all the new highlight icons from the new base icon
convert $accessibility_icon -draw "image over 0,0,130,130 $FILENAME" accessibility_$NEWNAME
convert $business_icon -draw "image over 0,0,130,130 $FILENAME" business_$NEWNAME
convert $home_icon -draw "image over 0,0,130,130 $FILENAME" home_$NEWNAME
convert $student_icon -draw "image over 0,0,130,130 $FILENAME" student_$NEWNAME
convert $home_icon -draw "image over 0,0,130,130 $FILENAME" $NEWNAME
fi
doneLast edited by SteveLawUK (2008-03-24 5:02:18 am)
Offline
To run SteveLawUK's script:
NB: You must have ImageMagick Installed!
1. Make a backup copy of the AsusLauncher folder.
2. Open terminal (Ctrl+Alt+t).
3. Open a text editor by typing the following code in terminal:
sudo kwrite /home/user/iconconvert.sh
Press [ENTER].
4. Block and copy the code (excluding "Code:") from SteveLawUK's post into the text editor. Save /home/user/iconconvert.sh and exit the text editor.
5. Make the file executable by typing in terminal:
sudo chmod a+x /home/user/iconconvert.sh
Press [ENTER].
6. Run /home/user/iconconvert.sh by typing in terminal:
sudo /home/user/iconconvert.sh
Press [ENTER].
7. Reboot your machine or restart the GUI.
Last edited by Niel1952 (2008-03-24 8:55:03 am)
Offline
Got any screenshots before I try it?
Offline
What do you want a screenshot of? It moves any icons which are 120x120 fractionally up and resizes them to 130x130 so that the text is below the icon.
Offline
If you have this problem (look at the Firefox icon)![]()
Then the script should change it to this![]()
(Or something like, I set that up just for you!)
Last edited by SteveLawUK (2008-03-24 9:37:42 am)
Offline
Niel1952 wrote:
What do you want a screenshot of? It moves any icons which are 120x120 fractionally up and resizes them to 130x130 so that the text is below the icon.
Ah, I see. I thought you were scaling them down. You know, to sizes like 48x48. Great work though
Pictures say more than words obviously.
Offline
It should be quite easy to adapt the script to scale the icons down but you may be constrained by the size and placement of the text.
Offline
You could scale them down if you want, just play around with the numbers.
Offline
I updated the wiki http://wiki.eeeuser.com/howto:customizeeasymodeicons
and added a new section
"The Semi-automated Way (by script)"
It includes a modified version of the script first posted here by SteveLawUK.
My new version switched tactics - I no longer loop over all icons in the system folder, but all work is done in a working folder.
Recenty when I wanted to install a new icon I found myself in the position that I had one file and needed to created all of the others from it.
The new script (uploaded to the wiki) takes one file as an argument and does the rest.
At the end the user can choose to have the files installed in the system AsusLauncher folder.
Please check the wiki and correct it if I made a mistake. I am new to Wikis and can only hope I did everything right. Correct me if I'm wrong ;-}
Cheers
Offline
Can we put this script right a the end of Jeff's script so all is automated ?
Offline
doucettom wrote:
Can we put this script right a the end of Jeff's script so all is automated ?
The original purpose of the script was to update all icons 120x120 to 130x130 to take account of the ASUS update.
After that I found no further use for the automated version which trawls over an entire directory. These days I need a script which takes a downloaded GIF/JPG/PNG and creates a set of ASUSLauncher icons from it. That's what my script (in the wiki) is for.
Offline