Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Hammerspoon Mortality script has issues with computer sleeping #2

Open
sprice opened this issue Jan 18, 2018 · 8 comments
Open

Hammerspoon Mortality script has issues with computer sleeping #2

sprice opened this issue Jan 18, 2018 · 8 comments

Comments

@sprice
Copy link

sprice commented Jan 18, 2018

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.

@af
Copy link
Owner

af commented Jan 19, 2018

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!

@jordanj77
Copy link

I can't handle this... 😨

@sprice
Copy link
Author

sprice commented Apr 16, 2019

@jordanj77 can't handle this specific issue with the Mortality script, or more generally can't handle that there is a Mortality script 😹

@af
Copy link
Owner

af commented Apr 16, 2019

Haha I was wondering the same thing!

@jordanj77
Copy link

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('∞').

@sprice
Copy link
Author

sprice commented Apr 16, 2019

@jordanj77 I believe you're conflating an existential crisis with stoic philosophy 😉

@jordanj77
Copy link

@sprice Oops, looks like I need to npm update my philosophy module... nice catch 😄

@af
Copy link
Owner

af commented Apr 17, 2019

@jordanj77 My lua is a bit rusty, but have you tried this patch?

hs.timer.doEvery(ONE_DAY, function()
  self:mementoMori()
end)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants