newmarcel / newmarcel/KeepingYouAwake
Toggle on and off via AppleScript
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 6.9k
- Forks
- 266
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting KeepingYouAwake's AppleScript dictionary and any existing scripting entry points; the issue reports that no actions or active property are exposed. Define a scripting interface that supports turning the utility on and off or toggling it, then verify the provided Script Editor workflow works with KeepingYouAwake.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, objective-c
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100