View Single Post
Posts: 376 | Thanked: 511 times | Joined on Aug 2009 @ Greece
#100
A new version (1.1-1) of actman will be soon available in extras-devel. This version:
  • Supports reloading the current activity.
  • Supports saving the current activity without switching.
  • Allows for execution of user scripts uppon change of the activity.
  • Uses dsmetool instead of killall to restart hildon-home.
  • Added a backup configuration file to backup activities.

Please check it and report back success or problems.

In order to run your own scripts you can put them under ~/.activities/scripts/<activity name> or under ~/.activities/scripts/always

The scripts in "always" are always executed while the scripts in "activity name" are executed only when entering or leaving that activity. Each script in there should be executable and should accept one parameter which will be either 'start' or 'stop'. When an activity is activated, all scripts of that activity (and in "always") will be ran with the parameter "start".

When another activity is activated, first the scripts of the former activity will be ran with the parameter "stop" and then the scripts of the new activity will be ran with the parameter "start".

This will allow you to extend it in any way you want in order to start/stop daemons, services, internet connects, or extend it for your own desktop widgets. The current activity name is also passed as an environment variable named "ACTMAN_ACTIVITY".

So go ahead. Use it, abuse it and report back
 

The Following 7 Users Say Thank You to v13 For This Useful Post: