Skip to content
86% off$349 $48.86code BF2026

Docs

Glowmoth docs25 pages

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

  1. Open Glowmoth Settings and click the Automation tab.
  2. Under Rules, click Add Rule.
  3. Choose Docked at Desk or Office Hours.
PresetRule nameConditions
Docked at DeskDocked at deskOn AC Power and External Display Connected (both must be true)
Office HoursOffice hoursDuring 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

  1. In Settings ▸ Automation ▸ Rules, click Add Rule and choose Custom Rule….
  2. Type a name. You can't save a rule without one.
  3. Click Add Condition and pick a condition. The less common ones are under More.
  4. Fill in the condition's details, for example a network name or the hours.
  5. Repeat steps 3 and 4 for each condition you want.
  6. With two or more conditions, set Keep awake when to All conditions are true (the default) or Any condition is true.
  7. Optionally, turn on Keep the display on.
  8. Press Return to save the rule, or Esc to cancel.
Glowmoth rule editor: Office hours on power, two conditions, Keep awake when set to All conditions, Keep the display on switched on
A rule with two conditions.

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

ConditionTrue whenDetails you setPermission
On AC PowerThe Mac isn't running on batteryNoneNone
External Display ConnectedAny online display other than the built-in one is connected (also true with the lid closed)NoneNone
On a Wi-Fi NetworkThe Mac is on one of the networks you listType a name and click Add, or pick from the Known menu (current and remembered networks)Location Services
During HoursThe current time is inside the windowDay toggles plus From and To times. Overnight windows work ("Ends the next morning."). The same start and end means "All day."None
App RunningThe chosen app is running, or is in frontAn app, plus Running or In FrontNone
Process RunningA process with that executable name is runningAn executable name, such as ffmpeg, xcodebuild or rsyncNone
Folder BusyThe folder holds a partial download, or a file in it grew or a new non-empty file appeared in the last 60 secondsClick Choose… to pick a foldermacOS 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 onNoneNone
Volume Mounted (More)A volume with that name is mounted; blank matches any external volumeA volume name, or blankNone
CPU Busy (More)The whole Mac's average CPU use stays above the threshold for the set timeAbove 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 runningNoneNone
Bluetooth Device Connected (More)A connected paired device with that name is connected; blank matches any connected paired deviceA device name, or blankBluetooth, if macOS asks
VPN Connected (More)A tunnel interface (utun, ipsec, ppp, tun, tap or wg) is up with an IPv4 addressNoneNone
Calendar Event in Progress (More)A timed event marked Busy is happening now. All-day events and Free events don't countNoneCalendars (full access)

A few details the table can't hold:

  • Folder Busy treats files ending in .download (Safari), .crdownload (Chrome), .part (Firefox), .partial and .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:

Glowmoth panel set to Manual: sleep allowed and 2 automatic reasons on hold
  • 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

Glowmoth panel's Held By list with the Docked at desk rule and Xcode is running, each with a ✕, and Stop Everything
Each reason has its own ✕; Stop Everything pauses them all.

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.

  1. The rule is switched off. Check its switch in Settings ▸ Automation ▸ Rules.
  2. Glowmoth is in Manual mode. The panel shows Manual and "N automatic reasons on hold". Switch to Automatic.
  3. 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.
  4. You ended the rule with ✕. It stays ended until its conditions turn false once, for example until you undock and redock.
  5. All instead of Any. With All conditions are true, one false condition stops the whole rule. Check the summary on the rule's row.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. The Mac slept when you closed the lid or chose Sleep. Rules prevent idle sleep only. On a laptop, use closed-lid mode.
  11. 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.

Every app.
One purchase.