Menubar app as shown above is getting stuck.
It's just a simple app that runs in the menubar and shows the current time in Paris.
It is written in fennel and transpiles to Lua. I have the sample of the original Fennel code and transpiled Lua.
After running for a while, while I use my macbook, I put it to sleep, awake, sleep... (just using it regularly) the system clock would show the current time, but the menubar app would "drift".
There would be a difference of few hours between the current time, say 18:45 and the time shown in the app would be 12:23.
If you look at the code, the difference should ever only be one hour between the time in the menubar app and the system time.
I think that Hammerspoon process is somehow getting put to sleep and it's not being woken up later.
But what is strange, all the other key shortcuts that I have they all work as expected, regardless if the menubar app is stuck or not.
What can I do to determine what is going on with the menubar app?
What can I do to prevent the menubar app from going to sleep, after the computer usage is resumed?
Thanks
On Wednesday 5th February:
After asking on #hammerspoon on Freenode, it was suggested that I make the instance of hs.menubar.new
a global variable. So I did that in paris-2.fnl
and you can see what that transpiles in paris-2.lua
below.