View Single Post
Old 10-23-2013, 05:19 AM   #12
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
hawhill nailed it. Just change the C part of luakit to handle mouse click on this area (because taps are recognized by X application as ordinary click of left button).

It's not possible within Lua (if you're don't want to mess with C part beforehand, exposing click event to Lua part). Top right part of status bar is filled by label widgets, which aren't exposing click events by default.

UPD: oh, I was wrong for it not being possible. That's what I did to test the way on my computer (NOT on Kindle):
  1. Code:
    $ mkdir $HOME/.config/luakit
    $ cp /etc/xdg/luakit/binds.lua $HOME/.config/luakit
  2. Add this to my custom binds.lua:
    Code:
    window.init_funcs["handle click on status bar (except of part filled by selectable lables)"] =
      function (w)
        w.sbar.ebox:add_signal("button-release", function (v, mods, button, context)
          print(button) -- prints 1 for left click
        end)
      end
And it printed 1 to standard output every time when I clicked status bar (except the url part, which handles clicks on its own).

Also:
Code:
$ luakit --version
luakit 039e319

Last edited by eureka; 10-23-2013 at 05:34 AM.
eureka is offline   Reply With Quote