Git Product home page Git Product logo

Comments (5)

ashfinal avatar ashfinal commented on July 19, 2024

Showing/hiding a widget is good, but all widgets is too much.
And also there may be more widgets coming, which makes the thing complicated.

I suggest you add some lines in ~/.hammerspoon/private/awesomeconfig.lua to do what you want.
Thus, you can continue to benefit from this repo, meanwhile by pressing a shortcut bring up the widgets to the front, as you intended to.

If you need some help, feel free to let me know. :)

from awesome-hammerspoon.

ashfinal avatar ashfinal commented on July 19, 2024

For now, timelapsed widget can be easily brought up by calling timelapsed_canvas:bringToFront(), sent to back by timelapsed_canvas:sendToBack().
But the early created widgets, i.e. calendar, analogclock, hcalendar, are not easy to do so. Because they consist of some parts of hs.drawing .
I'm planing to refactor these widgets with hs.canvas, the work will be done at tomorrow morning at the latest, I suggest you hold on before then.

from awesome-hammerspoon.

joshua7v avatar joshua7v commented on July 19, 2024

@ashfinal thanks, actually i've already tried.
The screenshot shows my work. Code is on the right half.
I don't think I am the only one who need this feature.
So I think maybe you will have an interest in supporting it officially.(maybe in a different way)

from awesome-hammerspoon.

ashfinal avatar ashfinal commented on July 19, 2024

Aha, I didn't notice your code. Glad you worked it out. :)
Still, I'll rewrite these widgets with hs.canvas. I'm encounting some problem, but I will finish the work eventually. We can expect the code to be clean, extensible, and most important, respond to user interaction.

I'll leave this issue open until I make some progress.

from awesome-hammerspoon.

ashfinal avatar ashfinal commented on July 19, 2024

Sorry for the delay. The work is done, eventually.
Now you can use the code below to toggle its visibility.

function toggleVisibility()
    if not calendarCanvas:isVisible() then calendarCanvas:bringToFront() else calendarCanvas:sendToBack() end
end

analogclockCanvas, hcalendarCanvas, timelapsed_canvas… can also be called like that.

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.