Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: Script helpis a discussion within the
File Modsforums, a part of the
Okay so I really like my layout and want to use shell scripts to swap out my 'floating' icon depending on what application I want to use. Here's my home...
08-08-2007, 09:58 PM #1Script help
Okay so I really like my layout and want to use shell scripts to swap out my 'floating' icon depending on what application I want to use.
Here's my home screen with VRecorder on it.
Here's a sample script, for NES application:
echo "This will activate the NES"
echo " application in the #11 spot"
echo "It will then restart SpringBoard"
echo "to load the new icon"
cp /var/root/Media/docs/NESDisplayOrder.plist /System/Library/CoreServices/SpringBoard.app/DisplayOrder.plist
kill -9 `ps wwx | grep SpringBoard | grep -v grep | sed -e s/\?.*//`
Everything works great. I snagged it from the iDecor script and it's supposed to locate the SpringBoard application and kill it, forcing a restart which will reload my updated DisplayOrder.plist file and as such, show the new icon on the home screen.
To allow the script to work I've made several versions of my DisplayOrder.plist file and saved them to my iPhone in the /var/root/Media/docs folder. I've also created several shell.sh srcipts that I can simply type "tic.sh" in my terminal window and it will activate my TicTacToe DisplayOrder.plist and (eventually) restart SpringBoard.
Edit2: Allen Porter (creator of Terminal app) replied to my email and provided the quick resolution. Use the 'wwx' for the 'ps' command and it list a wide version. All my scripts work GREAT! Thanks Allen - you ROCK!!
Last edited by CyberGreg; 07-25-2008 at 03:06 PM.
08-09-2007, 01:14 AM #2
Awesome. Looking forward to some more info on this... share some scripts..
↑ ↑ ↓ ↓ ← → ← → B A [select] [start] Kyle Matthews
08-09-2007, 09:14 AM #3
Okay, I believe I have found the cause of the script failure. The number of columns in the iPhone Terminal app is set to 41. This truncates the output of ps and causes the rest of the 'greping' to fail. It would also explain why it works through ssh, the terminal columns is set to 80.
I have contacted the developer to ask for an update. Allen Porter has replied with a resolution.
PF - please delete this post.
Last edited by CyberGreg; 08-09-2007 at 10:36 AM.