View Single Post
Posts: 34 | Thanked: 21 times | Joined on Feb 2008
#6
Originally Posted by MysticKatDaddy View Post
Here is the code for my original idea of a suspend.conf to go in the "/home/user/.powerlaunch/" directory:

Code:
[suspend_mode]
on_init = timer_set back_to_main 2
key_power = call systemui.ui.switch_offline_mode; call systemui.ui.softpoweroff;
back_to_main = switch powerlaunch.main
I don't have the double power button tap working but at least I have a menu option that will shut off the wifi and do a softpoweroff. I still want to figure out the double tap option. I'm having a hard time making a file in my "/home/user/.powerlaunch/" directory that will be automatically loaded by powerlaunch without having to modify any of the core config files. There's also an event for power_key_release that gets in the way too.
To avoid modifying core files, create powerlaunch.conf in ~/.powerlaunch (you can copy one from /etc/powerlaunch if you wish and edit it). In main.on_init, use 'default_inherit suspend.suspend_mode' which will allow your double tap power thing to work from all modes (not sure if that's what you want).

For your double tap, maybe something like this (I haven't tried this)
Code:
[suspend_mode]
on_init = set powerdouble 0
key_power = if $powerdouble suspend waitsuspend
suspend = set powerdouble 0; call systemui.ui.switch_offline_mode; call systemui.ui.softpoweroff
waitsuspend = set powerdouble 1; timer_set clearsuspend 2
clearsuspend = set powerdouble 0
Not sure what you mean by the power key release getting in the way but you can override the default behavior if you want. The default is defined in common.conf.