Glowmoth Rules: Conditions, Presets and Automatic Mode
Set up Glowmoth rules that keep your Mac awake while conditions are true: presets, All/Any logic, all 14 conditions, permissions, Manual mode and fixes.
Updated 9 min read
On this page
This page shows how to set up Glowmoth rules, which keep your Mac awake on their own while conditions you choose are true, such as being docked at your desk or inside work hours.
Rules are in Glowmoth Settings ▸ Automation ▸ Rules. To open Settings, right-click the moth icon in the menu bar and choose Settings…, click Settings… in the panel footer, or press ⌘, (Command-Comma) while Glowmoth is active. A fresh install has no rules.
How Glowmoth rules keep your Mac awake
A rule keeps your Mac awake while its conditions are true. When they stop being true, the rule lets go, and your Mac sleeps as usual unless something else is holding it.
- Each rule has a name (required), an on/off switch, one or more conditions, and a Keep the display on switch.
- By default a rule blocks only idle system sleep, so the display still sleeps on its normal schedule. Turn on Keep the display on in the rule to keep the screen lit too.
- A rule doesn't block manual sleep (Apple menu ▸ Sleep or the power button), and it doesn't stop the Mac sleeping when you close the lid. For that, see closed-lid mode.
- While a rule is holding the Mac, it appears in the panel's Held By list. If only automatic reasons are holding the Mac, the menu bar icon shows the Automatic state (a ring bulb) instead of Awake.
If you only need to stay awake while one app, process or folder is busy, the Apps, Processes and Folders lists in the same tab are quicker. See Stay awake while an app, process or download runs. Use a rule when you need conditions like power, displays, networks or schedules, or a combination of them.
Use the Docked at Desk and Office Hours presets
- Open Glowmoth Settings and click the Automation tab.
- Under Rules, click Add Rule.
- Choose Docked at Desk or Office Hours.
| Preset | Rule name | Conditions |
|---|---|---|
| Docked at Desk | Docked at desk | On AC Power and External Display Connected (both must be true) |
| Office Hours | Office hours | During Hours: weekdays, 9:00 to 18:00 |
Each rule's row shows a summary such as "On AC power and external display connected". Choose Edit Rule on the row to change it, or Remove Rule to delete it. To pause a rule without deleting it, turn off its switch.
Build a custom rule with All or Any conditions
- In Settings ▸ Automation ▸ Rules, click Add Rule and choose Custom Rule….
- Type a name. You can't save a rule without one.
- Click Add Condition and pick a condition. The less common ones are under More.
- Fill in the condition's details, for example a network name or the hours.
- Repeat steps 3 and 4 for each condition you want.
- With two or more conditions, set Keep awake when to All conditions are true (the default) or Any condition is true.
- Optionally, turn on Keep the display on.
- Press Return to save the rule, or Esc to cancel.


Use All to narrow things down ("on AC power and on my office Wi-Fi"). Use Any to combine triggers ("a calendar event is in progress or the camera is in use"). Each rule has one All/Any setting, so if you need both kinds of logic, make two rules. The Mac stays awake while any enabled rule is true.
If you leave a condition incomplete (for example, Folder Busy with no folder chosen), Glowmoth ignores it. A rule with no complete conditions never fires.
What each of the 14 conditions checks
| Condition | True when | Details you set | Permission |
|---|---|---|---|
| On AC Power | The Mac isn't running on battery | None | None |
| External Display Connected | Any online display other than the built-in one is connected (also true with the lid closed) | None | None |
| On a Wi-Fi Network | The Mac is on one of the networks you list | Type a name and click Add, or pick from the Known menu (current and remembered networks) | Location Services |
| During Hours | The current time is inside the window | Day toggles plus From and To times. Overnight windows work ("Ends the next morning."). The same start and end means "All day." | None |
| App Running | The chosen app is running, or is in front | An app, plus Running or In Front | None |
| Process Running | A process with that executable name is running | An executable name, such as ffmpeg, xcodebuild or rsync | None |
| Folder Busy | The folder holds a partial download, or a file in it grew or a new non-empty file appeared in the last 60 seconds | Click Choose… to pick a folder | macOS file access for Downloads, Desktop, Documents and external or network drives |
| Camera or Microphone in Use (More) | Any app is using the camera or microphone. Glowmoth never turns them on | None | None |
| Volume Mounted (More) | A volume with that name is mounted; blank matches any external volume | A volume name, or blank | None |
| CPU Busy (More) | The whole Mac's average CPU use stays above the threshold for the set time | Above N% (5 to 100 in steps of 5, default 50) and For N min (1 to 60, default 5) | None |
| Audio Playing (More) | Any audio output device is running | None | None |
| Bluetooth Device Connected (More) | A connected paired device with that name is connected; blank matches any connected paired device | A device name, or blank | Bluetooth, if macOS asks |
| VPN Connected (More) | A tunnel interface (utun, ipsec, ppp, tun, tap or wg) is up with an IPv4 address | None | None |
| Calendar Event in Progress (More) | A timed event marked Busy is happening now. All-day events and Free events don't count | None | Calendars (full access) |
A few details the table can't hold:
- Folder Busy treats files ending in
.download(Safari),.crdownload(Chrome),.part(Firefox),.partialand.opdownload(Opera) as partial downloads. Glowmoth checks only file names and sizes, never contents. - Process Running matches the executable's file name, which can differ from an app's display name. It only sees processes your user account can see.
- CPU Busy, Camera or Microphone in Use, Audio Playing, Bluetooth Device Connected and VPN Connected are checked every 5 seconds, and only while a rule uses them. During Hours runs on timers, not polling. So a rule can take up to about 5 seconds to react, plus the For N min time on CPU Busy.
Conditions that need a permission
Glowmoth doesn't ask for anything up front. Rules that use other conditions need no permission at all.
- Location Services (On a Wi-Fi Network). macOS reveals the Wi-Fi network name only to apps with Location access. Glowmoth asks when you first add this condition, reads only the network name, and never looks up or stores where you are. Without access, the editor shows "Without Location access the network name is unknown, so this condition stays off." with an Open Settings button, and the Known menu is hidden.
- Calendars (Calendar Event in Progress). Glowmoth asks when you first add this condition and reads only event times. Without access, the editor shows "Glowmoth can't read your calendars, so this condition stays off." with Open Settings.
- Bluetooth (Bluetooth Device Connected). Glowmoth reads which paired devices are connected. If macOS asks for Bluetooth access, allow it.
- Files and folders (Folder Busy). If you pick a folder in Downloads, Desktop or Documents, or on an external or network drive, macOS may ask to give Glowmoth access. If you deny it, the folder can't be watched.
If you denied a permission earlier, use the Open Settings or Allow link in the rule editor, or open System Settings, search for "Location Services" or "Calendars", and allow Glowmoth there. For every permission Glowmoth can ask for, see Permissions Glowmoth asks for.
Automatic and Manual mode
One setting decides whether automatic reasons count at all. You can change it in three places:


- The Automatic | Manual control in the panel. It appears once you've set up automation, or while Manual is on.
- Settings ▸ Automation ▸ Keep awake automatically (on by default).
- The Shortcuts action Set Automatic Mode.
In Manual, Glowmoth ignores every reason except your own session: rules, the saved Apps, Processes and Folders lists, one-off "Keep Awake While" reasons, coding agents, scheduled runs and command-line leases. Nothing is deleted. The panel shows how many are waiting, for example "1 automatic reason on hold". Switch back to Automatic and they count again.
Manual is handy when you want the Mac to sleep tonight even though it's docked, without editing your rules.
How the ✕ on a reason and Stop Everything work


The ✕ on a row ("End This Reason") in the panel's Held By list ends that one reason. For a rule, it stays ended until the rule's conditions turn false at least once, then the rule works normally again. If you end "Docked at desk" with ✕, it stays off until you undock and comes back the next time you dock.
Stop Everything (the link under Held By, or the right-click menu item shown while automatic reasons are holding the Mac) does two things:
- It ends your own session.
- It suspends all automatic reasons, rules included, until you next start a session.
There's no indicator or "resume" button for this. Automatic reasons come back when you start a session (the panel switch, a duration in the menu, your hotkey) or when Glowmoth relaunches. The Shortcuts action Stop Keeping Awake does the same with Also Pause Automatic Reasons turned on.
If you want rules paused until you decide otherwise, use Manual instead. It's visible in the panel and stays set after a relaunch.
Why isn't my rule firing
Work through these in order.
- The rule is switched off. Check its switch in Settings ▸ Automation ▸ Rules.
- Glowmoth is in Manual mode. The panel shows Manual and "N automatic reasons on hold". Switch to Automatic.
- You used Stop Everything. Automatic reasons stay suspended until you start a session or relaunch Glowmoth. Start and stop a session to bring them back.
- You ended the rule with ✕. It stays ended until its conditions turn false once, for example until you undock and redock.
- All instead of Any. With All conditions are true, one false condition stops the whole rule. Check the summary on the rule's row.
- A permission is missing. Without Location access, On a Wi-Fi Network is always false. Without Calendars access, Calendar Event in Progress is always false. The rule editor shows a note and an Open Settings link.
- The condition doesn't match what you expect. All-day and Free events don't count. Process Running needs the executable name. CPU Busy needs the average above the threshold for the full number of minutes. An incomplete condition is ignored.
- A safety limit paused Glowmoth. On low battery or when the Mac runs hot, Glowmoth releases its hold for every reason, rules included, and the icon and panel show Paused. See Battery and heat safety limits.
- The display sleeps but the Mac is awake. That's expected unless the rule has Keep the display on turned on. See Display, screen saver and screen lock.
- The Mac slept when you closed the lid or chose Sleep. Rules prevent idle sleep only. On a laptop, use closed-lid mode.
- No license or trial. When the trial has ended or the license can't be verified, Glowmoth holds nothing, and the panel shows Enter License….
Before you rely on rules
- Export doesn't include rules. Export… in Settings ▸ Advanced skips rules and the saved lists, so recreate them on a new Mac.
- Reset all settings deletes your rules, along with saved apps, processes, folders and scheduled runs.
- Rules can't trigger on USB devices, IP address, DNS server, idle time, battery level, a specific audio output device, Ethernet, screen sharing or a display by name.