-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work under macOS Catalina #46
Comments
Is there still no solution to this problem? Is this project still being maintained? |
I switched to Hammerspoon and replicated the functionality with the following script: -- Menu bar icon for keeping Mac from sleeping when closing lid
local noSleep = hs.menubar.new()
local noSleepState = false
hs.execute("sudo pmset -b disablesleep 0")
function setNoSleepDisplay(state)
if state then
noSleep:setIcon("ZzActive.pdf")
else
noSleep:setIcon("ZzInactive.pdf")
end
end
function noSleepClicked()
if noSleepState then
hs.execute("sudo pmset -b disablesleep 0", true)
noSleepState = false
else
hs.execute("sudo pmset -b disablesleep 1", true)
noSleepState = true
end
setNoSleepDisplay(noSleepState)
end
if noSleep then
noSleep:setClickCallback(noSleepClicked)
setNoSleepDisplay(false)
end You have to copy I stayed on Mojave so I don't know if it works with Catalina. Anyone who wants to test this on Catalina, please let us know. EDIT: I forgot that you also have to add the following lines to
|
Thanks for the solution. I switched to Amphetamine and it works like a charm (plus it is free as well). |
MacBook Pro goes to sleep 15 seconds after closing the lid with NoSleep enabled.
The text was updated successfully, but these errors were encountered: