Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-12-2013, 08:14 AM   #31
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I'll make that into a singleton script then that runs whenever fronter is active.

Where the type of click is configurable as 2 7 8 or 9

twobob.fronter.sentinel.sh

I have encountered a few situations/apps already that have required this Double Finger Kill technique.

The ideal evolution would be to pass this to a true/false dialog before triggering the kill.
Happy to take advice on that.
twobob is offline   Reply With Quote
Old 10-12-2013, 12:02 PM   #32
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 405
Karma: 2330752
Join Date: May 2012
Device: kt
Quote:
Originally Posted by twobob View Post
okay so I get that we are calling

http://www.keplerproject.org/lualogging/manual.html

but... log ("FRONTER Renaming: ".. tostring(str))

err where does that log to?

damned if I can find it.

do I need to manually set/elevate the logging level?
This is a custom function. See lab126_logging.lua.
It goes to /var/log/messages AFAIR. You must raise log level with debugOn.sh though.
baf is offline   Reply With Quote
Advert
Old 10-12-2013, 12:08 PM   #33
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by twobob View Post
I'll make that into a singleton script then that runs whenever fronter is active.

Where the type of click is configurable as 2 7 8 or 9

twobob.fronter.sentinel.sh

I have encountered a few situations/apps already that have required this Double Finger Kill technique.

The ideal evolution would be to pass this to a true/false dialog before triggering the kill.
Happy to take advice on that.
Could that be extended to a three finger touch?
For those users all too familar with: ctrl-alt-del

If Linux apps are to replace Windows apps - don't we have to support all of the Windows 'features' ?

Last edited by knc1; 10-12-2013 at 12:58 PM.
knc1 is offline   Reply With Quote
Old 10-12-2013, 04:06 PM   #34
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by baf View Post
This is a custom function. See lab126_logging.lua.
It goes to /var/log/messages AFAIR. You must raise log level with debugOn.sh though.
Ah thanks.

Makes sense.

I got around it.

Quote:
Originally Posted by knc1 View Post
Could that be extended to a three finger touch?
For those users all too familiar with: ctrl-alt-del

If Linux apps are to replace Windows apps - don't we have to support all of the Windows 'features' ?
heh.

Sadly only two touch points are supported

perhaps the sentinel script can be extended to support keyboard toggling in the very near future...
twobob is offline   Reply With Quote
Old 10-13-2013, 06:00 AM   #35
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 405
Karma: 2330752
Join Date: May 2012
Device: kt
Quote:
Originally Posted by twobob View Post
perhaps the sentinel script can be extended to support keyboard toggling in the very near future...
You could easily take over KT button for that. In rc.lua it is currently mapped to handleHomeKeyDown and handleHomeKeyUp functions. Replace it with show/hide keyboard function. In the same script there examples how to do that with lipcH:set_string_property() function. You could check the current state of keyboard with keyboard_is_visible() function.

You can also implement your sentinel in functions handling button (touchscreen) presses (in the same rc.lua).

Last edited by baf; 10-13-2013 at 06:05 AM.
baf is offline   Reply With Quote
Advert
Old 10-13-2013, 12:51 PM   #36
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by baf View Post
You could easily take over KT button for that. In rc.lua it is currently mapped to handleHomeKeyDown and handleHomeKeyUp functions. Replace it with show/hide keyboard function. In the same script there examples how to do that with lipcH:set_string_property() function. You could check the current state of keyboard with keyboard_is_visible() function.

You can also implement your sentinel in functions handling button (touchscreen) presses (in the same rc.lua).
excellent points... many thanks
twobob is offline   Reply With Quote
Old 10-13-2013, 12:56 PM   #37
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
implemented exact-only matching, corner-case cleanup, and reduced logging noise.

Code:
+	    if str == nil then
+       		return nil
+ 		end
+
+	if not stringStartsWith(str, "L:") then
+
+-- Debug 		llog.info("WindowManager", "bad-client-name", "winName=" .. tostring(str), "report-untidy")
+		
+-- exact matches only, Ditch the system stuff, this prevents thing like "Gtkboard" matching "kb"
+		
+		if (str == "kb") or (str == "webreader") or (str ==  "pillowd") then
+       	return nil
+
+	       else
+
+-- we made it this far - let tidy up likely corner cases
+-- tidy up spaces and other potentially magic characters
+			str = string.gsub(str, "%s+", "-")
+			str = string.gsub(str, "%%+", "-")
+			str = string.gsub(str, "%^+", "-")
+			str = string.gsub(str, "%$+", "-")
+			str = string.gsub(str, "%(+", "-")
+			str = string.gsub(str, "%)+", "-")
+			str = string.gsub(str, "%[+", "-")
+			str = string.gsub(str, "%]+", "-")
+			str = string.gsub(str, "%*+", "-")
+			str = string.gsub(str, "%?+", "-")
+			str = string.gsub(str, "%++", "-")
+			str = string.gsub(str, "%_+", "-")
+			str = string.gsub(str, "%/+", "-")
+			str = string.gsub(str, "%:+", "-")
+
+-- Debug	 		llog.info("WindowManager", "good-client-name", "winName=" .. tostring(str), "post-tidy")
+	        	str = "L:A_N:application_ID:" .. tostring(str) .. "_O:R_PC:N"
+-- Debug			llog.info("WindowManager", "title", tostring(str) , " ✔")
     end
+end
twobob is offline   Reply With Quote
Old 10-13-2013, 03:38 PM   #38
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 405
Karma: 2330752
Join Date: May 2012
Device: kt
Quote:
Originally Posted by twobob View Post
Code:
+-- we made it this far - let tidy up likely corner cases
+-- tidy up spaces and other potentially magic characters
I wonder if there is any need to struggle with app titles. Couldn't you just assign one generic title for all injected windows. Titles don't have to be unique.
baf is offline   Reply With Quote
Old 10-13-2013, 08:57 PM   #39
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
It's a good point.

And one I really should take on board.
I guess it was really more important during the testing phase.

(spent a good hour or so wondering/finding why Gtkboard wouldn't "run")

Once again. excellent input.
twobob is offline   Reply With Quote
Old 10-14-2013, 09:00 AM   #40
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by twobob View Post
It's a good point.

And one I really should take on board.
I guess it was really more important during the testing phase.

(spent a good hour or so wondering/finding why Gtkboard wouldn't "run")

Once again. excellent input.
I think this "fix it if you can, toss it if you can't" approach has merit.

At least 'tag' this approach in your local development repo. before making vast changes to it.

(You did remember to do a: git init on this work directory, didn't you?)
knc1 is offline   Reply With Quote
Old 10-23-2013, 07:37 AM   #41
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Create /var/tmp/root/.config/awesome/rc.lua:
Code:
package.path = "/var/tmp/root/.config/awesome/?.lua;" .. package.path
dofile("/etc/xdg/awesome/rc.lua")
Then copy to /var/tmp/root/.config/awesome/ any file from /etc/xdg/awesome, change the copy, reload (restart) awesome. Modified copy will take precedence.

Power of RTFM, baby
eureka is offline   Reply With Quote
Old 10-23-2013, 08:22 AM   #42
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
sweet work that man.

I believe there was a default keybinding CMD + R (or something) that causes awesome to reload it's configuration while running...

Another gem to be dug up perhaps one day. *makes notes*

Last edited by twobob; 10-23-2013 at 08:25 AM.
twobob is offline   Reply With Quote
Old 10-23-2013, 10:13 AM   #43
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by twobob View Post
I believe there was a default keybinding CMD + R (or something) that causes awesome to reload it's configuration while running...

Another gem to be dug up perhaps one day. *makes notes*
It's not default keybinding, it should be set explicitly (to invoke function awesome.restart).

I came to something different but also useful for this case (using overrided rc.lua):
Code:
package.path = "/var/tmp/root/.config/awesome/?.lua;" .. package.path
dofile("/etc/xdg/awesome/rc.lua")

local lipcH, errNum, errMsg = lipc.init("com.lab126.winmgr.extra")
if not lipcH then
  log ("!!!!!!!!!!!failed to init lipc " .. tostring(errNum) .. ", " .. errMsg)
else
  lipcH:register_string_property("restart", "w").listener = awesome.restart
  awesome.add_signal("exit", lipcH:close)
end
Then just:
Code:
$ lipc-set-prop com.lab126.winmgr.extra restart now
Instead "now" any string value could be used.

Unfortunately, every restart creates additional /bin/sh -c awesome process hanging around. And according to awesome sources, it's by design:
Spoiler:
Code:
void
awesome_restart(void)
{
    awesome_atexit(true);
    a_exec(globalconf.argv);
}
Code:
void
a_exec(const char *cmd)
{
    static const char *shell = NULL;

    if(!shell && !(shell = getenv("SHELL")))
        shell = "/bin/sh";

    execl(shell, shell, "-c", cmd, NULL);
}

Last edited by eureka; 10-23-2013 at 10:16 AM.
eureka is offline   Reply With Quote
Old 10-24-2013, 05:20 AM   #44
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 457
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
latest fronter 1.0.1 doesn't work for me. I had an earlier version that I just tried and that works fine.

the 1.0.1 version shows the patch fine, then when I run a program like pente or kcheckers, no display. the programs are running (ps -A) and the run script is also running. I'm not quite sure what exactly was changed here between versions? Did you happen to add version numbers in a script anywhere? I'm willing to put on the non-working version again if you tell me what to test?

does the current version work for anyone/everyone else?
brianinmaine is offline   Reply With Quote
Old 10-24-2013, 05:33 AM   #45
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Previous version worked via xdotool. new one relies on the internal LUA commands.

I should get one of these touches bumped to 5.3.7 and check nothing major changed...

Also add the evolutional changes outlined by Eureka/Baf above.

But I have several projects cooking at once right now...
Feel free to take over this one. All the notes are on these few pages and the technology used is one copy of "patch" and a lot of fiddling.

Totally transparent.
twobob is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scanned text pdf with OCR but graphical layer instead vectorial whopper PDF 2 09-10-2011 06:32 PM
Hacker friendly soul_rebel Which one should I buy? 12 02-13-2011 09:34 PM
Life Found in the Deepest layer of Earth's Crust kennyc Lounge 0 11-19-2010 05:02 PM
Best firmware for Hanlin V5 aka Bebook Mini aka Papyre 5.1? javimm HanLin eBook 1 01-11-2010 05:37 PM


All times are GMT -4. The time now is 07:05 PM.


MobileRead.com is a privately owned, operated and funded community.