maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   [Anounce] [N9] Volume/Power Button Monitor (https://talk.maemo.org/showthread.php?t=82538)

wolke 2013-02-24 02:17

Re: [Anounce] [N9] Volume/Power Button Monitor
 
1 Attachment(s)
here ya go. this is NOT a release, as i havent tested it. literally havent even run it, sorry.

this deb has new conditions: screenUnlocked, appNotFocused
and new buttons: cameraButton {n950}, powerButton


all you do to configure n9bm how i said, is change /home/user/.config/n9-button-monitor.ini

Code:

doubleClickDelayMs=2000
trebleClickDelayMs=3000
action=cmd(SECURITY-LOCK-CMD),powerButton,singleClick,screenUnlocked

by the way, this assumes you HAVE a command that will enter security lock mode. i have no idea how to do that, and it has nothing to do with n9bm.

wolke 2013-02-24 02:30

Re: [Anounce] [N9] Volume/Power Button Monitor
 
ok, i tested it, and it works fine.

turns out double-click-power IS useful. it will work in lock, unlock, and different apps, where the volume buttons already have actions reserved.

it could, for instance, toggle power saving mode when locked, open my most recent pictures in meeseepics if im on the home screen, and toggle silent/ring everywhere else.

solbrit 2013-02-24 16:46

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Thankyou!
I just installed the deb, although no /home/user/.config/n9-button-monitor.conf (or /home/user/.config/n9-button-monitor.ini) is created. Is this normal? Do i grab the one in OP and throw it in there (changing it according to your instrucions)?

Edit: ...you load the default config file from the ui, got it!

wolke 2013-02-24 19:05

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by solbrit (Post 1324831)
Thankyou!
I just installed the deb, although no /home/user/.config/n9-button-monitor.conf (or /home/user/.config/n9-button-monitor.ini) is created. Is this normal? Do i grab the one in OP and throw it in there (changing it according to your instrucions)?

Edit: ...you load the default config file from the ui, got it!

oh snap, i thought the default one got created when the file didnt exist. apparently not, so thats a bug i should fix. ;)

i wouldnt recommend using the gui for anything at all ever.

solbrit 2013-02-24 19:15

Re: [Anounce] [N9] Volume/Power Button Monitor
 
It works perfectly, thankyou! :D

Btw, the torch feature is really nice too. No more unlock-screen-locate-flashlight-app-in-the-app-menu-activate-flashlight...

wolke 2013-02-24 19:51

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by solbrit (Post 1324862)
It works perfectly, thankyou! :D

Btw, the torch feature is really nice too. No more unlock-screen-locate-flashlight-app-in-the-app-menu-activate-flashlight...

cool. glad you like it!

Hacker 2013-02-24 20:07

There is a great new open source camera app for the N9 located here: http://talk.maemo.org/showthread.php?t=89278

I think that this could be my new default camera app, but I don't want to lose the Button Monitor camera functions.

Could you set up Button Monitor so that this camera app can be a new condition name in the GUI? Is there an easy way I can make this happen?

wolke 2013-02-24 20:19

Re: [Anounce] [N9] Volume/Power Button Monitor
 
AWESOME! im so excited, i despise the n9 camera app. thanks for this news, ill be checking it out very soon.

now, its very easy to do the condition. you just do appFocused(window-class-name). default camera app is "camera-ui", and his is probably "camera-plus".

cameraFocused == appFocused(camera-ui)
both do exactly the same thing.


now as for the ACTIONS, theyre a little trickier.
what they really do is simulate dragging your finger to certain spots on the screen. if he moved the camera button a little, it will break.

so if he DID move the button, you will need to play with the "tap" action. again, clickCameraSnap and clickCameraFocus are just shorthand for the tap action with an argument.

these do exactly the same thing:
clickCameraSnap == tap(820x240,820x240)
clickCameraFocus == tap(820x240-820x100*200+5)

wolke 2013-02-24 20:31

Re: [Anounce] [N9] Volume/Power Button Monitor
 
i lied, its not class name, its WM_COMMAND.
so you dont even have to use xprop to find out, you can just use the executable name.

wolke 2013-02-25 16:03

Re: [Anounce] [N9] Volume/Power Button Monitor
 
btw, released 0.5.2
buttons: camera {n950}, power
conditions: screenUnlocked, appNotFocused
actions: tap {generic click}


All times are GMT. The time now is 21:26.

vBulletin® Version 3.8.8