   /// Holds a reference to the caffeinate task.
   private var caffeine: Task?
 
-  /// Checks if the caffeinate task is currently running.
+  /// Checks whether a caffeinate task is currently running.
   var active: Bool {
     guard let status = caffeine?.isRunning else {
       return false


import Foundation

let caffeineTaskStatusChangedNotificationKey = "io.raphaelhanneken.espresso.caffeinateTaskStatusChanged"

/// Manages the caffeinate task.

    caffeinate.launchPath = "/usr/bin/caffeinate"
    caffeinate.arguments  = ["-diu"]
    caffeinate.launch()
    // Assign the caffeinate property to the new caffeinate task.
    return caffeinate
  }
}
