newmarcel / newmarcel/KeepingYouAwake

Toggle on and off via AppleScript

Open
#43 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature wish
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.