Git Product home page Git Product logo

Comments (5)

ashfinal avatar ashfinal commented on June 20, 2024

我也不懂 lua。当时是看完 Learn Lua in Y minutes 就尝试写了,没多学别的什么东西 ……
感觉很多时间都花看 Hammerspoon 文档上了,到现在好像也没出什么大问题。(-ι_- )

以我有限的理解,timer 全局变量与否与 lua 的 gc 回收关系不大。你可以检查下该 timer 是不是还在运行,有没有变量重复命名被覆盖的情况?或者函数本身写的就有问题。

from awesome-hammerspoon.

nzhl avatar nzhl commented on June 20, 2024

稍微看了下官方文档, 我问题应该是出在timer没有使用变量保存起来, 不过还是非常感谢... 感觉用hammerspoon的人好少啊, 这个东西真的是神器.

from awesome-hammerspoon.

ashfinal avatar ashfinal commented on June 20, 2024

我刚点进你的 repo 看到相关代码了。确实是因为你没有把 hs.timer 对象赋值,没赋值的话这个对象就是“野”的,gc 的时候会被回收掉。

用的人是少了点,上手难度高了些。不过自己感觉有用就成。

from awesome-hammerspoon.

nzhl avatar nzhl commented on June 20, 2024

多谢了
不过真的 感谢, 我一开只是知道这个软件, 但是后面github上搜索到你的配置, 真是, 我觉得你真的有想法. 我都没想过可以这么弄.

from awesome-hammerspoon.

ashfinal avatar ashfinal commented on June 20, 2024

大概扫一遍 API 文档,就慢慢有了些想法,就想尝试下能不能实现 ……
但是文档其实也没有细看全看,只是知道它们大概能做什么,到写的时候边写边看。

有空多交流交流哈,有想法或代码欢迎 contribute。

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.