Skip to content

Latest commit

 

History

History
76 lines (41 loc) · 2.84 KB

README.md

File metadata and controls

76 lines (41 loc) · 2.84 KB

Amphetamine Dose | Alfred Workflow

Amphetamine Dose Alfred Workflow Icon

A simple workflow that integrates with the Amphetamine app to keep your Mac awake. This workflow allows you to activate or deactivate Amphetamine and set it to stay awake for a specified number of minutes, all from within Alfred.

Install

  • Available on the Alfred Gallery. Get it here.
  • You can also download it from GitHub here.

This workflow is only for Alfred.app Powerpack users.

Getting Started

Turn on Amphetamine (amp on)

Alfred turn on Amphetamine image

Turn on Amphetamine to keep your Mac awake:

Keyword: amp on

Turn off Amphetamine (amp off)

Alfred turn off Amphetamine image

Turn off Amphetamine to stop keeping your Mac awake.

Keyword: amp off

Set Amphetamine to stay awake for a specified number of minutes (ams)

Alfred set Amphetamine duration image

Set Amphetamine to stay awake for a specified number of minutes. Only integer values are allowed.

Keyword: ams [number of minutes]

Example:

  • ams 30 will keep your Mac awake for 30 minutes.

Set Amphetamine to stay awake for a specified number of hours (amh)

Alfred set Amphetamine duration in hours image

Set Amphetamine to stay awake for a specified number of hours. This command supports both whole hours and hours with minutes.

Keyword: amh [number of hours] [optional minutes]

Examples:

  • amh 3 will keep your Mac awake for 2 hours.
  • amh 6 30 will keep your Mac awake for 6 hours and 30 minutes.
  • amh 1.5 will keep your Mac awake for 1 hour and 30 minutes.

Keep your Mac awake until a specific time (amh + Option key)

Alfred set Amphetamine until specific time image

Set Amphetamine to keep your Mac awake until a specific time. This mode is activated by holding down the Option key while using the amh command.

Keyword: amh [target hour] [optional minutes] [optional am/pm]

Examples:

  • amh 12 30 (while holding Option) will keep your Mac awake until 12:30 (AM or PM, inferred from current time).
  • amh 5 pm (while holding Option) will keep your Mac awake until 5 PM.
  • amh 2 15 am (while holding Option) will keep your Mac awake until 2:15 AM.

If no AM/PM is provided, the script will infer it based on the current time to avoid confusion. (Only supports the 12-hour format).


This workflow provides an easy and flexible way to control Amphetamine directly from Alfred. Enjoy!