View Single Post
Posts: 22 | Thanked: 5 times | Joined on May 2010
#354
I had a chance to work on the original script, furthermore now you can run the script from systemui using the power button.

In order to do so:

Unzip optimize.zip and place optimize.xml under /etc/systemui/
Remove the .txt extension and place optimize under /home/user/

followed by a

killall systemui


Systemui component (optimize.xml)
Code:
<powerkeymenu path="/">
 <menuitem priority="200" name="Optimize">
  <callback service="com.nokia.xterm" path="/com/nokia/xterm" interface="com.nokia.xterm" method="run_command" bus="session" autostart="true">
   <argument type="string">/bin/sh /home/user/optimize</argument>
  </callback>
 </menuitem>
</powerkeymenu>

Revised optimize (killall) script:
Code:
#!/bin/sh

echo Device is being optimized...

#Refresh the Audio Process to avoid audio glitch
killall -q pulseaudio
sleep 1;

#Refresh the Tracker process
killall -q trackerd
sleep 1;
killall -q tracker-indexer
sleep 1;

#Refresh the browser MicroB
killall -q browser browserd
sleep 1;

#Refresh of the most common applications and UIs
killall -q calendar
sleep 1;
killall -q osso_calculator
sleep 1;
killall -q camera-ui
sleep 1;
killall -q rtcom-call-ui
sleep 1;
killall -q modest
sleep 1;
killall -q rtcom-messaging-ui
sleep 1;
killall -q image-viewer
sleep 1;
killall -q osso_notes
sleep 1;
killall -q osso-addressbook
sleep 1;

#Refresh the all UI Hildon, menus and bars.
killall -q hildon-desktop
sleep 1;
killall -q hildon-status-menu
sleep 1;
killall -q systemui
sleep 1;

#NOTE: Killing the hildon-home process can erase all widgets and that is why it is disabled
#killall -q hildon-home
#sleep 1;

#Refresh other processes
killall -q tonegend
sleep 1;
killall -q mafw-gst-renderer
sleep 1;

Hope you guys find it useful.
Attached Files
File Type: zip optimize.zip (319 Bytes, 125 views)
File Type: txt optimize.txt (1,000 Bytes, 119 views)

Last edited by tan; 2011-06-27 at 21:37.
 

The Following User Says Thank You to tan For This Useful Post: