Git Product home page Git Product logo

Comments (9)

ashfinal avatar ashfinal commented on July 19, 2024

I've never used karabiner.
But from this tutorial, I think the functionality can be
implemented. The example in tutorial is quite similar to yours.

from awesome-hammerspoon.

nikitavoloboev avatar nikitavoloboev commented on July 19, 2024

Oh no, you misunderstood me. I know how to call lua functions from Karabiner. What I don't know, is what to call to get the winhints show up. I don't get where it is defined so I can move it to just my init.lua to call from. :)

from awesome-hammerspoon.

ashfinal avatar ashfinal commented on July 19, 2024

I just saw your init.lua file.
Do you mean that you can call all lua functions from Karabiner, except "showWindowHints" function?
If so, that doesn't make sense. Showing windows hint did not link to modal switching, and was not defined anywhere else. It belongs to Hammerspoon's original functions.

I just test the code below in Hammerspoon console with your init.lua file, and it works as intended.

hs.urlevent.openURLWithBundle("hammerspoon://showWindowHints","com.apple.Safari")

So I presume you may do something wrong on Karabiner's side. Wish that helps. :)

from awesome-hammerspoon.

nikitavoloboev avatar nikitavoloboev commented on July 19, 2024

Well I am only calling hs.hints.windowHints() but that is not enough it seems.

Do you use something to draw the icons that show up and the lettering here :

from awesome-hammerspoon.

ashfinal avatar ashfinal commented on July 19, 2024

No, I didn't do anything else. http://www.hammerspoon.org/docs/hs.hints.html
You can see something in Hammerspoon console which can help to identify the problem?

from awesome-hammerspoon.

nikitavoloboev avatar nikitavoloboev commented on July 19, 2024

Hey @ashfinal, I think I got it working now. :D

One thing though is that for some reason it doesn't display window names when there are many windows open :

2017-01-07 at 20 01

from awesome-hammerspoon.

nikitavoloboev avatar nikitavoloboev commented on July 19, 2024

Did you add anything to hs.hints.windowHints() to get around this?

from awesome-hammerspoon.

ashfinal avatar ashfinal commented on July 19, 2024

@nikitavoloboev By default window hints will show their titles if there are less than 4 windows on screen.
hs.hints.showTitleThresh = 0
Change 0 to some number larger than 4, this should do the work.

from awesome-hammerspoon.

nikitavoloboev avatar nikitavoloboev commented on July 19, 2024

Thank you a lot @ashfinal, this worked

from awesome-hammerspoon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.