View Single Post
Old 09-11-2012, 02:15 PM   #19
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 ixtab View Post
The one crucial thing is that it's almost impossible, without MAJOR changes, to change the functionality of the home button. Home button = start home screen booklet. Nothing else.
Well, it could be changed without major changes, but it will possibly require knowledge of Lua. Though, Lua is easy language (yes, really).

Home button action is defined in /etc/xdg/awesome/rc.lua in function handleHomeKeyUp (there is also small partner function handleHomeKeyDown). At the end of function, there is following chunk of code:
Code:
-- launch the default app                                   
log("==============Sending Home Button")                    
logTimeStamp("home button press")                           
client.validate_stacking_order()                            
lipcH:set_int_property("com.lab126.appmgrd", "startdefault", 0)
So, that's how it works.

lipcH is a top-scope variable (defined in rc.lua) with handle for working with LIPC. In fact, one could not only set any external property through it, but also register new property for provider com.lab126.winmgr and change value of this new property appropriately. And even subscribe to LIPC events. Or send such events. For examples and insights:
Spoiler:
Code:
grep -r lipcH /etc/xdg/awesome
Code:
strings /usr/lib/lua/liblipclua.so

So, with the help of LIPC one can transimt status of Home button from rc.lua to outside world. Or just read it's state from some other source (physical Home key is mapped as keyboard Home key).

Sorry if it sounded like a crude refutation, I just wanted to help a little.
eureka is offline   Reply With Quote