Coder Social home page Coder Social logo

newmarcel / keepingyouawake Goto Github PK

View Code? Open in Web Editor NEW
5.5K 63.0 219.0 4.93 MB

Prevents your Mac from going to sleep.

Home Page: https://keepingyouawake.app

License: MIT License

Objective-C 90.74% Shell 1.40% Makefile 1.02% C 0.34% Rich Text Format 2.46% Objective-C++ 1.89% Swift 2.15%
macos objective-c caffeine menubar utility

keepingyouawake's People

Contributors

alexandreleroux avatar aonez avatar bsturza avatar code918 avatar durul avatar egemenu avatar eitot avatar ezig avatar gelosi avatar gmcinalli avatar hoffmann-jan avatar ibnuh avatar jacobschriver avatar joscha avatar kawarimidoll avatar lazyatom avatar luizpedone avatar newmarcel avatar nosrac avatar oscard0m avatar tmuguet avatar wongjustin99 avatar yongyizang avatar yuerlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keepingyouawake's Issues

Right click on icon

Hi,
the right click on the icon of the app to show the menu doesn't work. I can only show it with a simulated two fingers gesture

Can KYA be controlled from a script?

Is there a way run KYA for a set time from a script? Or are there plans to develop one?

I found that if the setting, "Activate on Launch" is checked, you can essentially control KYA like this:

# if appplication running, quit KYA. Wait a moment to fully close. Then regardless of status, open the now "closed" app using the setting,  "Activate on Launch" to activate KYA upon launch

tell application "KeepingYouAwake"
    if it is running then
        quit
        set status to "reactivated."
    else
        set status to "activated."
    end if

    delay 0.01 # allow KYA to close, don't blink!
    launch # always launch

    set output to "KeepingYouAwake has been " & status

    return output

end tell

Then with a cron task, a second script could be run to deactivate KYA at a set time interval:

tell application "KeepingYouAwake"
    quit
end tell

I would really like something like Focus' built in cli support:

open focus://focus?minutes=25

About-Window in front

Don't know if anybody already mentioned it, but if you right-click on the KeepingYouAwake-icon in the menu bar and choose "About", while you have several other programs opened, you won't see the About-Screen.
You need to close the windows or look in Mission Control for this little About-Window. Perhaps it would be softer, if the About-Windows would be on top of all windows that are currently opened.
Not a big thing but I thought it would be better if someone mentioned it...

KYA usage metrics?

Do we have a way to have an estimate of the number of KYA users? Can the "Check for Updates..." be used to get such an estimation? Any other KYA metrics we could have access to? Thanks -- Alex

Some way to inquire if running

Hi. I think your app is the best at what it's doing.
However I wanted to ask if there is some way to programmatically ask the process whether it's active or not. I read of the URI schemes, but they only can activate and deactivate.

Option to set left-click activation duration

When you left-click to activate KeepingYouAwake, it always activates Indefinitely.

Caffeine has the feature where you can set the default activation duration (e.g., 1 hour) for when left-clicking. Any chance we can get this in KeepingYouAwake as well?

Hang on launch for ~1 minute

After around a minute or so of hanging, the application will become responsive.

In console, is this log:

4/1/15 20:37:17.349 KeepingYouAwake[25023]: Unbalanced call to enableRelaunchOnLogin: enableRelaunchOnLogin was called without a preceding call to disableRelaunchOnLogin

I am using the latest stable v1.2.

Thanks!

Context menu on option-click

Hi there! Thanks for a great app! A bit of nit-picking :-)

Currently, KYA shows the context menu, when I ctrl-click on the icon.

The behaviour of all the other apps with menu icons that I've tried, show either the context menu or an alternative context menu on alt+click, while the behaviour on ctrl+click never differs from a regular click.

Maybe KYA could have the same behaviour for sake of consistency?

I've tried Dropbox, the Bluetooth icon, the WLan icon, the Battery icon and the Volume icon.

brew cash can't download

in china, i can't download;

error iinfo:
curl: (52) Empty reply from server

can you support brew for installing

Multiple language support

Minor feature request. But first, thanks a lot for this valuable project :-)

If you implement multiple language support for KYA's menu items, I'll gladly contribute the French translation. While a minor improvement, multiple language support does matter to some users. Thanks for the great (and open source) software -- Alex

Icon Hides/Appears When Scrolling Desktops

When I change from one desktop to another and watch the icon, it appears to flicker colour or even hide/reappear completely when changing desktops using the gesture while nothing else I have in the menu bar does this.

I know this is a minor UI bug but would be cool to fix this if it is easy.

crash on active/start

Turning "activate on launch" and "start at login" muliple times on and off crashes the app

21.11.14 11:11:37,056 KeepingYouAwake[10356]: Unbalanced call to enableRelaunchOnLogin: enableRelaunchOnLogin was called without a preceding call to disableRelaunchOnLogin

Possibly a dumb question, but how to install?

So in searching for a fix for dark mode for Caffeine I can across this app. It's exactly what I'm looking for, but what exactly is the procedure for installing it? Might be a dumb question and I'm just overlooking something obvious.

Thank you

Specify caffeinate mode on activation

Hi there,

From reading the caffeinate man page, I noticed an interesting feature that would be extremely handy to add. Caffeinate can take an option which specifies the type of sleep to prevent. It could be useful to allow (not mandate) that activating sleep prevention could allow the screen saver while still preventing the system from completely sleeping, for example (option -s to caffeinate).

Capability to include Beta versions in 'Check for Updates'

Feature suggestion: the capability to include beta versions in the 'Check for Updates...' process. Disabled by default.

This would make the process of upgrading to beta versions so easy that more of us would test those beta versions :-) Thoughts / comments? Cheers -- Alex

Feedback for 1.2.1beta1 needed

Hi everyone!

I published the 1.2.1beta1 release today and I'm looking for some feedback before I can release 1.2.1 😃

I changed the AC power mode with this update to avoid unexpected behaviour for some users. Right now KYA 1.2 will keep your MacBook awake (with display off) when the lid is closed and a power cord is connected. I changed this by switching the caffeinate parameters from:

caffeinate -disu …

to:

caffeinate -di …

I need some testers with desktop Macs, since I only have notebook computers. That would be great if someone could verify that KYA still works as expected on any Mac.

If anyone notices any problems with this beta, please report them here.

Checking for updates fails

For some unknown reasons, selecting 'Check for Updates...' with version 1.3.1 does not allow me to update to 1.4.0, I always get the following error message:

kya_fail-checkforupdates

Any clue?

Default Duration

It would be great to allow the user to select a default or preferred duration. Caffeine does this and it is really handy to be able to specify something like 2 hours as the default.

Prevent user from selecting "Indefinitely"

Working in an large scale environment, we have to enforce a 15 minute screenlock. Obviously there are scenarios where this wouldn't be ideal, and would like to offer our users KYA as an option, but "indefinitely" can't be an option, as this could lead to just setting it to indefinitely, starting at login, and activating on launch, effectively defeating the security requirement.

We are willing to ask our users to observe the honor system for now, but having the ability to administratively remove the option altogether would make it that much easier.

Help building project?

Attempted to build the debug scheme after checking out with --recursive to get the Sparkle dependency but the project fails to build, unable to find the Sparkle.framework file. It appears to be looking for it in a very random location, and I was having trouble updating that location.

~/Library/Developer/Xcode/DerivedData/KeepingYouAwake-apbqcjufkliladgytieudutryeno/Build/Products/Debug/Sparkle.framework

I've only done iOS dev but would like to contribute to this, as it looks and works great! Maybe I'm missing something silly?

"Activate for Duration" setting is not memorized

Current version of keeping you awake (1.2.1) does not remember what users set for "Activate for Duration", set for 1 hour for example, if user click the menu icon to disable/enable again, or quit and relaunch. Current version will just reset the "Activate for Duration" to "Indefinitely" automatically.

It will be the best and convenient for users to be able to "set the default value".

Add possibility to activate KYA with a shortcut

Hello newmarcel,

first of all, thank you very much for your work on this beautiful little tool!
Is it possible that you add a feature to (de-)activate KeepingYouAwake with a shortcut?

Best regards!
hattorihanzo9969

How do I build this?

Sorry for the newby question but I'm getting errors building the project in Xcode.

KYAEvent.h it doesn't like line 26:
@Property (copy, nonatomic, readonly, nullable) NSDictionary<NSString *, id> *arguments;

Since the file hasn't changed for a while I'm assuming it's some setting in my build environment but I have no clue where to look.

Automatic update from 1.3.0 to 1.3.1 works as expected

screenshot 2016-01-04 11 09 03

Not entirely sure what's going on but at least the statement that Github has disabled HTTPS for Pages doesn't appear to be true and the update has reached me just fine. Just about every other resource I have hosted on Github Pages works fine over HTTPS too and I can't find any announcement by Github on the matter either which I would expect to have seen upfront.

Remove shadow from menu bar icon

This app is awesome. Major improvement over the old Caffeine icon.

That said, the icon would be just a touch cleaner without the shadow, and maybe moved down a pixel or two

Icons Current No Shadow
Inactive inactive-original inactive-no-shadow
Active active-original active-no-shadow

screen-active-no-shadow
screen-inactive-no-shadow

icon design drafts

Hey,

first of all I really like the app and I use it every day. Thanks for your work. Like a few other users I decided that I want another icon and I did 10 different iconsets that are really close to the old one. Some have only minor changes in the size of the outline. I personally like number 9 and number 5 best.

As uploading a zip with all the data is not supported please let me know how to hand you over the files including the illustrator source file.

I will also try to submit a pull request with the one I´m using right now (number 9). As I´ve never done that I don`t know if this is going to work.

It would be nice to see this included and if you could build a new release soon.

Thanks in advance for this very nice project and I hope you`ll find some time to update it on regular basis.

Kind regards,

Tom

iconset 1
active
active 2x
inactive
inactive 2x

iconset 2
active
active 2x
inactive
inactive 2x

iconset 3
active
active 2x
inactive
inactive 2x

iconset 4
active
active 2x
inactive
inactive 2x

iconset 5
active
active 2x
inactive
inactive 2x

iconset 6
active
active 2x
inactive
inactive 2x

iconset 7
active
active 2x
inactive
inactive 2x

iconset 8
active
active 2x
inactive
inactive 2x

iconset 9
active
active 2x
inactive
inactive 2x

iconset 10
active
active 2x
inactive
inactive 2x

Prevent sleep on lid close

Would it be possible to add a setting in KYA to prevent sleep on lid close when plugged into AC power?

I get "Insecure update error!" each time I run the app (that I build)

I want to make minor modifications to the caffeinate command (to change it to -s) so I'm building my own version of the app. I don't have a developer account so I turned off code signing, installed Carthage and did the carthage bootstrap. When I run the built app, I get the "Insecure update error!" pop up.

How to make this go away?

Thanks.

Scheduled (de)activation

Is it possible to set KeepingYouAwake to work on a schedule? I have a work computer that I like to use KeepingYouAwake on during the day but sometimes I forget to turn it off.. Company got an email from me this morning that I didn't write! Would be so great to be able to set it to automatically turn on at 9AM and off at 6PM!

Icon highlight when clicking

First off, thanks for sharing this with the world. Much appreciated.

One enhancement I'd like to suggest is to not highlight the icon when clicking to activate. Caffeine just changes the icon when you click and only highlights when you option+click to view the menu.

Crash when deselecting "Start at login"

KYA is running.
Right click on top menu icon.
Click on "Start at login" (default is disabled)
Right click on top menu icon again.
"Start at login" is now enabled.
Click on "Start at login".
The icon disappears (KYA crash).

OSX Yosemite 10.10.4
MacBook Pro (Retina, 15-inch, Mid 2015)
KYA: Version 1.2.2beta1 (123)

Update: added KYA version

Activation on start of specific software

I mainly use KeepingYouAwake to have the screen stay activated during DJ sets. Since I usually use an external controller and never touch the computer, it will be very likely to turn the screen off (external controllers won't activate it again).

However, after a set it's not uncommon that I forget to turn it off, leave the computer and it drains the battery because it doesn't sleep.

It would be awesome if I could choose some softwares within the settings which will make KeepingYouAwake automatically activate/deactivate when these softwares are started/quit.

Prevent mac from sleep but allow screen saver?

I'd like to prevent my Mac from going in sleep mode but I do want to allow my mac to enable the screen saver to prevent problems to my screen.

Caffeine doesn't allow it, what about KYA?

Thanks

PS; Sorry, with screen saver, I mean allowing my screen from turning off.

Toggle on and off via AppleScript

Hello!

Previously, with Caffeine, I was able to use the following AppleScript to toggle it on and off via the keyboard:

tell application "System Events"
    if exists (process "Caffeine") then
        tell application "Caffeine"
            if active is false then
                turn on
            else
                turn off
            end if
        end tell
    else
        tell application "Caffeine" to activate
    end if
end tell

When trying that with this application (subbing "Caffeine" with "KeepingYouAwake"), it doesn't work. Using the Script Editor application, it seems that the active variable is not present. As far as I can tell, there aren't any available actions when using the Script Editor Dictionary, but I thought I'd confirm here.

Remains Active After Lid Closed

Hello,

I've noticed that when KYA is active and I close the lid to my MBP then KYA will remain activated when opened again. After leaving on overnight KYA while show the remaining time until deactivation as negative. This hasn't caused any issues with the laptop other than the timer being negative.

Awake duration

Nice project!

But I would love to have the "Activate for" menu, where I could set the awake duration to:

  • 5 minutes
  • 10 minutes
  • 15 minutes
  • 30 minutes
  • 1 hour
  • 2 hours
  • 5 hours
  • Indefinitely

Like Caffeine :)

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.