watcher

Last updated 23 days ago

Watch for application launch/terminate events

This module is based primarily on code from the previous incarnation of Mjolnir by Markus Engelbrecht and Steven Degutis.

API Overview

API Documentation

Constants

activated

Signature

hs.application.watcher.activated

Type

Constant

Description

An application has been activated (i.e. given keyboard/mouse focus)

Signature

hs.application.watcher.deactivated

Type

Constant

Description

An application has been deactivated (i.e. lost keyboard/mouse focus)

hidden

Signature

hs.application.watcher.hidden

Type

Constant

Description

An application has been hidden

launched

Signature

hs.application.watcher.launched

Type

Constant

Description

An application has been launched

launching

Signature

hs.application.watcher.launching

Type

Constant

Description

An application is in the process of being launched

Signature

hs.application.watcher.terminated

Type

Constant

Description

An application has been terminated

unhidden

Signature

hs.application.watcher.unhidden

Type

Constant

Description

An application has been unhidden

Constructors

new

Signature

hs.application.watcher.new(fn) -> watcher

Type

Constructor

Description

Creates an application event watcher

Parameters

Returns

Notes

Methods

start

Signature

hs.application.watcher:start()

Type

Method

Description

Starts the application watcher

Parameters

Returns

stop

Signature

hs.application.watcher:stop()

Type

Method

Description

Stops the application watcher

Parameters

Returns