Active Topics

 


Reply
Thread Tools
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#21
MISSING FEATURES:

1) DONE get pid or command name of topmost window when that window is an aliendalvik app
the pid returned by the below cmd is for `system_server`:
Code:
dbus-send --print-reply --system
    --dest=org.nemomobile.lipstick /
    org.nemomobile.compositor.privateTopmostWindowProcessId
this means that app(maps) will return false when google maps is open, for example.

NOTE: this is done, but requires a hack in lipstick QML
https://talk.maemo.org/showpost.php?...8&postcount=30

2) ]keep-alive while locked without draining battery horribly (vol buttons dont wake phone up, and so sometimes the actions dont work) JUST GONNA USE keepalive-tool FOREVER

3) DONE-ISH long-press keys
just needs some clever event handling that i havent had time to implement

4) torch on/off (NOT toggle, which is already done)
probably easy to query torch state with DBUS, but if not, i could just write directly to the LED devices.
(i used to long press vol for torch, and release to turn it off, and liked that a lot)

5) multiple input devices, configuration options for input devices

6) support for optional EXACT pattern matching (have to not push any other keys before, in the middle, or after)
maybe: "^vu vu$" or something

7) configuration options for timeouts/delays/etc

8) SOLVED-EXTERNALLY OPTIONALLY disable volume button default actions, e.g. in certain apps (this would probably be completely separate from sf-button-monitor, if i can implement it)
solution:
add a dconf config item to volume control QML to optionally ignore
/usr/share/lipstick-jolla-home-qt5/volumecontrol/VolumeControl.qml
see: patch

9) new conditions: landscape, portrait

10) new action: forceClose (kill -9 pid of topmost window)

11) new action: lockOrientation

12) (optionally) support power button with journalctl mce
__________________
~ teleshoes ~

Last edited by wolke; 2021-07-21 at 15:34.
 

The Following 3 Users Say Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#22
if anyone knows how to do #1, #2, #4 or #8, it would be much appreciated

also, anyone have any feature requests (in addition to #5) while im still actively working on this?
__________________
~ teleshoes ~

Last edited by wolke; 2021-07-21 at 15:34.
 

The Following 3 Users Say Thank You to wolke For This Useful Post:
Posts: 134 | Thanked: 370 times | Joined on Oct 2012 @ France
#23
Originally Posted by wolke View Post
if anyone knows how to do #1, #2, #4 or #7, it would be much appreciated

also, anyone have any feature requests (in addition to #5) while im still actively working on this?
Great work, thank you !

If it's possible, can you add :
- condition : screen orientation
- action : screen orientation lock, force to close (kill -9) current app

Screen orientation lock could be nice with the Pro1, when the keyboard is opened. However I don't know how to do the screen stuff

EDIT : a word missing : screen lock -> screen orientation lock

Last edited by Astaoth; 2020-01-29 at 18:12.
 

The Following 2 Users Say Thank You to Astaoth For This Useful Post:
Posts: 959 | Thanked: 3,427 times | Joined on Apr 2012
#24
would it be possible to add a feature to run something when a button is double-clicked?
 

The Following 2 Users Say Thank You to taixzo For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#25
Originally Posted by taixzo View Post
would it be possible to add a feature to run something when a button is double-clicked?
thats like, the primary feature of this app. you do this by writing "vu vu" or "vd vd" or "cf cf" in that pattern
__________________
~ teleshoes ~
 

The Following 4 Users Say Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#26
Originally Posted by Astaoth View Post
If it's possible, can you add :
- condition : screen orientation
- action : screen orientation lock, force to close (kill -9) current app
added to the missing-feature list. all are sensible and should be relatively easy, when i get time. thanks!
__________________
~ teleshoes ~
 

The Following 2 Users Say Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#27
AARGHHH

i just tried for like half an hour straight to find a way to get the app name of the topmost window for android apps (lipstick dbus tells me its "system_server").

is this REALLY that hard? is there some obvious method im just not thinking of? maybe some dbus api i dont know about? or some wayland thing to get the last kb-focused window or something....
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#28
yo, i hate wayland. couldnt there be some standard way of doing this for root users? i can list, kill, send keyboard input to, and otherwise manipulate every process on the system...but i cant know which one has active keyboard focus?
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#29
fukket, im just gonna modify goddamn lipstick QML to write window title to a file in /tmp

bastards
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#30
sigh, here it is. if you do this, then window() condition will match window title of the most recently opened app....

the file in question is:
/usr/share/lipstick-jolla-home-qt5/switcher/Switcher.qml

Code:
commit 4564109ada4d5e5f971bb3d173252ecc5a70ecff (HEAD -> master)
Author: Elliot Wolk <elliot.wolk@gmail.com>
Date:   Fri, 31 Jan 2020 15:28:14 -0500

    lipstick: write window title to /tmp/lipstick-window-title every time topmost window changes

diff --git a/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml b/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml
index e6d4f1b..1c7c4d4 100644
--- a/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml
+++ b/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml
@@ -294,10 +294,26 @@ SilicaFlickable {
         return count
     }
 
+    function writeFileOverHTTP(file, text) {
+        var request = new XMLHttpRequest();
+        request.open("PUT", "file://" + file, false);
+        request.send(text);
+        return request.status;
+    }
+
     Connections {
         target: Lipstick.compositor
         onMinimizeLaunchingWindows: switcherRoot.minimizeLaunchingWindows()
-        onTopmostWindowIdChanged: touchWindow(Lipstick.compositor.topmostWindowId)
+        onTopmostWindowIdChanged: {
+          var windowId = Lipstick.compositor.topmostWindowId
+          if(windowId > 0){
+            var window = Lipstick.compositor.windowForId(windowId)
+            if(window){
+              writeFileOverHTTP("/tmp/lipstick-window-title", window.title + "\n")
+            }
+          }
+          touchWindow(windowId)
+        }
     }
 
     function resetPosition(delay) {
__________________
~ teleshoes ~

Last edited by wolke; 2020-09-05 at 15:42.
 

The Following 3 Users Say Thank You to wolke For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 18:02.