Hammerspoon Mortality script has issues with computer sleeping
I realize that opening an issue against your personal dotfiles might be annoying. But maybe you're also experiencing this same problem 😄
I find that if my computer sleeps for some time, when I bring it back the mortality number hasn't updated. I need to reload my Hammerspoon config manually to get the current number.
Note: It's possible this isn't a sleep issue, I simply find that there are times during the day that I notice I have more time to live than expected so I reload the config and am met with the cold hard truth.
Thanks for the bug report :^D
I've noticed this too, I think it might be an issue with Hammerspoon's hs.timer.doEvery not handling the system going to sleep properly. I'll leave this issue open as a reminder to check it out!
I can't handle this... 😨
@jordanj77 can't handle this specific issue with the Mortality script, or more generally can't handle that there is a Mortality script 😹
Haha I was wondering the same thing!
I'm seeing an uncaught exception Error: EXISTENTIAL_CRISIS.
Can't pin down the precise reason, but it seems to go away if I shorten the updateText function to menu:setTitle('∞').
@jordanj77 I believe you're conflating an existential crisis with stoic philosophy 😉
@sprice Oops, looks like I need to npm update my philosophy module... nice catch 😄
@jordanj77 My lua is a bit rusty, but have you tried this patch?
hs.timer.doEvery(ONE_DAY, function()
self:mementoMori()
end)