![]() |
#1 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21
Karma: 141126
Join Date: Dec 2013
Device: touch
|
Switching between opened applications.
Hi.
Is any simple method to switch between applications, which are in background? I know how to create a script to manage a "Home button". It checks if some of defined applications are running, adds them to the carousel, shows running apps and chooses app which we want on foreground. Somewhat like alt+tab in many OS. If none of defined apps are running, "Home" acts generally. However I don't know how to put app on foreground. I suppose there are some system events but which? Or is it at all possible? Thanks in advance. |
![]() |
![]() |
![]() |
#2 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Hmm, wrong forum?
You mentioned a carousel, which sounds suspiciously like a Kindle Fire thing... ![]() (We only deal with the eInk models here, you want the Fire subforum for the tablets ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21
Karma: 141126
Join Date: Dec 2013
Device: touch
|
Quote:
I'll write carousel, but I don't know how to put on foreground some app. |
|
![]() |
![]() |
![]() |
#4 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
What do you mean by 'apps'?
|
![]() |
![]() |
![]() |
#5 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21
Karma: 141126
Join Date: Dec 2013
Device: touch
|
Midori, kterm, dictionary.mobi (booklet, reader or wua), leafpad - this mainly - and other defined by name in conf file by user.
Last edited by peterhey; 12-05-2013 at 06:36 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Developer's Corner Mascot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
You could make a javascript/html thing to switch between running apps. Don't know if there are better ways, but you could use xdotool from twobob to simply hide/show apps windows:
Download link Usage samples For a custom dialog sample, quite similar to the one you are going to make, give a glance to KindleTask app in Kindle Menu package (even if it only allows to terminates/kills process, not to switch between them). This is what you should do in my opinion, step by step: - make a list of the executables you want to be shown in your switcher - check which ones are currently running (with "ls" command, for example) - build a custom dialog (html page) with a link for each of them - associate to each link an onclick event, that through nativeBridge maximizes/minimizes the corresponding window, using xdotool - launch the custom dialog Ah, as you can see, the app switcher thingy was already between Kindle Menu TODOs... even if I didn't make it yet because I don't find it so necessary, to me at least. Last edited by Aeris; 12-05-2013 at 08:06 PM. |
![]() |
![]() |
![]() |
#7 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Do remember that the device has almost no free RAM for fun stuff, so backgrounding multiple stuff isn't really a great idea/actually feasible. It's already giving us nightmares for getting a single modest application to run, so if you want to multitask on top of that, brrr!
Last edited by NiLuJe; 12-06-2013 at 03:45 AM. |
![]() |
![]() |
![]() |
#8 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
But setting up a swap file is easy, and even a small one makes a big difference.
Multiple examples given in twobob's posts. Some of the applications he has ported are so big, that they **require** a swap file running to just run a single instance of the application. And he and Aires had a discussion of the subject in a recent thread. |
![]() |
![]() |
![]() |
#9 |
Developer's Corner Mascot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Yes, anyway I still agree with Niluje that take care also of multitasking would be quite annoying... and, above all, pretty useless in my opinion (for the app bundle currently available).
But, if peterhey needs it and wants to play with it, it is totally doable as I suggested |
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
I doubt that. They do not necessarily have means to share resources yet and are not prepared for being preempted. Without at least some modification, I would consider such an approach as being pretty futile.
|
![]() |
![]() |
![]() |
#11 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21
Karma: 141126
Join Date: Dec 2013
Device: touch
|
Works fine with midori, kterm, leafpad.
Two things makes it useless for me: 1. Some apps are in background. During start off dictionary.mobi the device stops and no response. The "/usr/bin/wua -l com.lab126.acxwua -s com.lab126.acxManager" (*.mobi) starts only after I close through ssh all apps in background. 2. Ctrl+c crtl+v doesn't work between apps. No clipboard on OS. I would have to additionally create something similar but I've no idea how without interference in apps. Maybe I'll use this information in a different way. For something usable. Thanks. |
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
Oh, i didn't see that this is just about X applications. i think awesome WM is standards compatible and should support EMWH. And may be itself configurable enough using Lua to implement everything that's needed.
|
![]() |
![]() |
![]() |
#13 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21
Karma: 141126
Join Date: Dec 2013
Device: touch
|
Instead of xdotool I used gestures engine.
Related to https://www.mobileread.com/forums/sho...d.php?t=166080 Two files. "./gesturetail" file to run "gesture" defines which applications you want to run The combination of ctrl+c, ctrl+v also works between some apps. |
![]() |
![]() |
![]() |
#14 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21
Karma: 141126
Join Date: Dec 2013
Device: touch
|
It's simple switcher. I use it with gesture engine and it's what I need. It operates with applications on the application layer, omitting some excluded. To fine finish, it needs some instructions for "home button" in "rc.lua" file. Thanks for your tips.
switcher: Code:
#!/bin/sh list=`/mnt/us/bin/wmctrl -l | grep L:A_N: | grep -v blankBackground | grep -v titleBar | grep -v lab126.booklet.home | awk '{print $4" "$1}'` hm=`echo $list | awk 'BEGIN {i=0} {while ($i!="") i++} END {print (i-1)/2}'` if [ $hm -gt 1 ]; then WHICHAPP=`cat /tmp/WHICHAPP` if [ "$WHICHAPP" == "" ]; then WHICHAPP=1 ; fi if [ "$1" == "next" ]; then if [ $WHICHAPP -lt $hm ]; then WHICHAPP=$((WHICHAPP+1)) else WHICHAPP=1 fi fi if [ "$1" == "prev" ]; then if [ $WHICHAPP -gt 1 ]; then WHICHAPP=$((WHICHAPP-1)) else WHICHAPP=$hm fi fi idapp=`echo $list | awk -v i=$WHICHAPP 'BEGIN {i=i*2} {print $i}'` layerA=`echo $list | awk -v i=$WHICHAPP 'BEGIN {i=i*2-1} {print $i}'` layerD=`echo $layerA | awk 'BEGIN {i=3; printf "L:D_N" ; } FS=":" {while ($i!="") { printf ":"$i ;i++ ;}}'` /mnt/us/bin/xdotool set_window --name $layerD $idapp /mnt/us/bin/xdotool set_window --name $layerA $idapp fi #export $WHICHAPP echo $WHICHAPP > /tmp/WHICHAPP Code:
case "$run" in ... # - pinch + left 3) $ext/gestures/bin/switcher next &;; # - pinch + right 4) $ext/gestures/bin/switcher prev &;; ... Last edited by peterhey; 01-28-2014 at 06:07 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Not all opened books are being read | Wyndham | Marvin | 4 | 09-27-2013 05:24 AM |
Just opened up my IQ! | TallMomof2 | PocketBook | 22 | 11-25-2010 09:06 PM |
2 windows opened? | rcuadro | Sigil | 3 | 12-18-2009 08:03 PM |
PocketBook US site opened... :) | brecklundin | PocketBook | 4 | 10-02-2009 01:42 AM |