View Single Post
Posts: 34 | Thanked: 21 times | Joined on Feb 2008
#13
Originally Posted by Karel Jansens View Post
so could someone tell me how I can implement softpoweroff with the keypress that I prefer (shortkeypress on powerkey)?
I'll assume you know how to edit config files and get around command line. There's no graphical configuration tool. Try this:

Code:
mkdir ~/.powerlaunch
cp /etc/powerlaunch/powerlaunch.conf ~/.powerlaunch
Now you can edit ~/.powerlaunch.conf as that's the main config file. The section at the top labeled [main] is the primary mode. You probably don't need most of the stuff in there but there's some examples in there such as creating menus or shortcut keys for things you may do often, like running ssh, running top, whatever.

In any case, here's a simple powerlaunch.conf file (you can just replace the entire file with this) and this will have short power key press go to softpoweroff, long power key release to turn it back on, and long power key press to show the menu (I assume that's what you want, unless you don't want the menu at all).

Code:
[main]
on_init = call common.init.main; inherit systemui.ui; call systemui.ui.layout
key_release_power = if $powerkey_short system.device.softpoweroff common.ui.show 
powerkey_long_release = softpoweron