# App Event

Trigger `app.badge`

trigger.app_event

Fires when an application launches, quits, or activates. Use this trigger to react to application lifecycle events — for example, starting a timer when you open a specific app, or running a cleanup script when an app quits.

Select the target application using the built-in app picker and choose which event to listen for. The trigger provides the app name, bundle identifier, and event type in its output payload.

## Ports

Direction | Name | Data Type | Description
--- | --- | --- | ---
Outlet | Output | Any | Payload emitted when the application event occurs

## Configuration

Field | Type | Default | Description
--- | --- | --- | ---
Application | `App Picker` | — | The application to monitor
Event | `Dropdown` | App Launched | Event type: App Launched, App Quit, or App Activated
Custom Arguments | `Key-Value` | — | Additional key-value pairs included in the output payload

## Output Variables

Variable | Type | Description
--- | --- | ---
`appName` | String | Name of the application
`event` | String | Event type (launch / quit / activate)
`bundleID` | String | Application bundle identifier
`timestamp` | String | ISO 8601 timestamp of the event

## Example

Log time spent in an app by tracking launch and quit events: