![]() |
Powerlaunch and Offline Mode
I'm trying to write a script for Powerlaunch where if the power button is pressed twice in a row within two seconds it will disable the wifi by putting the unit into "Offline"/"Flight Mode" and then active Powerlaunch's "Soft Poweroff" command.
Here's how the script will work: When the Power Button is Pressed: - If a specific timer is counting down, execute the command for "offline mode" and for "soft poweroff" -If the timer is not counting down, start it counting down from 2 seconds. Does anyone know the specific command or programs to run to execute the "offline mode" and the "soft poweroff" |
Re: Powerlaunch and Offline Mode
You can look in systemui.conf for what the menu uses. 'call system.device.offline_mode' and 'softpoweroff' should work
|
Re: Powerlaunch and Offline Mode
Does anyone know what kind of scripting powerline is based on? I'm familiar with Visual Basic programming and this is a bit different.
|
Re: Powerlaunch and Offline Mode
It's based on itself (and not any other scripting language I know of, except inasmuch as glade is used for the UI). I assume you've looked at the documentation here...
|
Re: Powerlaunch and Offline Mode
OK, I've got powerlaunch mostly figured out. I was able to insert a suspend mode option that does what I want in the pop up power menu. I did that by editing systemui.conf and adding the following into line 9 after the word "treeview" and before "tklock"
Code:
suspend "Suspend Mode" Code:
suspend = call system.device.offline_mode; call system.device.softpoweroff; hide Code:
[suspend_mode] |
Re: Powerlaunch and Offline Mode
Quote:
For your double tap, maybe something like this (I haven't tried this) Code:
[suspend_mode] |
Re: Powerlaunch and Offline Mode
Forgive me if this is OT, but I have my device set up to softpower and go offline on a power doubleclick. I was able to get this working by editing the /etc/mce/mce.ini file. Specifically the PowerKeyDoubleAction=softpoweroff and ConnectivityPolicyBattery=forceoffline keys. I have sliderotate installed and I noticed that the script made changes to this file to enable the rotating. (Which I didn't want) I'm not sure if the file existed before I installed sliderotate however. Hope this was usefull.
|
Re: Powerlaunch and Offline Mode
Yes, that file does exist in a clean flash, and you can make whatever changes to it in the absence or presence of sliderotate. But this thread is about using powerlaunch, which replaces mce entirely, and has its own config files.
|
All times are GMT. The time now is 06:37. |
vBulletin® Version 3.8.8