View Single Post
Posts: 270 | Thanked: 37 times | Joined on Sep 2010
#359
Originally Posted by tan View Post
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.

but your files are inserted in optimize on repository? I have optimize 0.0.1-2.