View Single Post
Posts: 34 | Thanked: 21 times | Joined on Feb 2008
#18
Originally Posted by icebox View Post
A clean documentation with examples for powerlaunch would be great
Yes, powerlaunch can do this easily. Edit /etc/powerlaunch/powerlaunch.conf (or make a copy to ~/.powerlaunch/powerlaunch.conf before editing). Here's a simple example to mute/unmute on headphone plugging in. You can run any other action you want on headphone plugging in.

Add "default_inherit common.headphone" to the end of main.on_init and add headphone_connected and headphone_disconnected handlers. The beginning of powerlaunch.conf would look like this:

Code:
on_init = load common; load mce; load systemui; load alarm; inherit systemui.ui; call start_apps; default_inherit common.headphone

headphone_connected = call system.volume.unmute
headphone_disconnected = call system.volume.mute
 

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