Utility for providing fast and guaranteed access to app windows during macros.
Download: https://github.com/adammillerio/Spoons/raw/main/Spoons/EnsureApp.spoon.zip
README with Example Usage: README.md
| Signature | EnsureApp.action.maximize |
|---|---|
| Type | Constant |
| Description | Maximize the application on the current space if it is not maximized already. |
| Source | Source/EnsureApp.spoon/init.lua line 29 |
| Signature | EnsureApp.action.move |
|---|---|
| Type | Constant |
| Description | Move the window to appear under the provided frame as if it were a menu. This |
| Source | Source/EnsureApp.spoon/init.lua line 23 |
| Signature | EnsureApp.action.none |
|---|---|
| Type | Constant |
| Description | No-op, will do no action other than moving window to the space and focusing |
| Source | Source/EnsureApp.spoon/init.lua line 33 |
| Signature | EnsureApp.appNamesSet |
|---|---|
| Type | Variable |
| Description | Table with "Set" of all app names configured for EnsureApp. |
| Source | Source/EnsureApp.spoon/init.lua line 63 |
| Signature | EnsureApp.apps |
|---|---|
| Type | Variable |
| Description | Table containing each application's name and it's desired configuration. The |
| Source | Source/EnsureApp.spoon/init.lua line 42 |
| Signature | EnsureApp.defaultAppConfig |
|---|---|
| Type | Variable |
| Description | Table containing the default configuration to be used for any app that is not |
| Source | Source/EnsureApp.spoon/init.lua line 56 |
| Signature | EnsureApp.logger |
|---|---|
| Type | Variable |
| Description | Logger object used within the Spoon. Can be accessed to set the default log |
| Source | Source/EnsureApp.spoon/init.lua line 68 |
| Signature | EnsureApp.logLevel |
|---|---|
| Type | Variable |
| Description | EnsureApp specific log level override, see hs.logger.setLogLevel for options. |
| Source | Source/EnsureApp.spoon/init.lua line 74 |
| Signature | EnsureApp.windowOpenTimer |
|---|---|
| Type | Variable |
| Description | hs.timer for moving an app's first window after being opened via EnsureApp. |
| Source | Source/EnsureApp.spoon/init.lua line 79 |
| Signature | EnsureApp:ensureApp(appName[, actionConfig]) |
|---|---|
| Type | Method |
| Description | Ensure the existence of a window from appName in the current Space. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | Source/EnsureApp.spoon/init.lua line 275 |
| Signature | EnsureApp:ensureAppCallback(appName[, actionConfig]) |
|---|---|
| Type | Method |
| Description | (Callback) Ensure the existence of a window from appName in the current Space. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | Source/EnsureApp.spoon/init.lua line 256 |
| Signature | EnsureApp:getAppEnsured(app) |
|---|---|
| Type | Method |
| Description | Returns whether or not app name is configured for EnsureApp. |
| Parameters |
|
| Returns |
|
| Source | Source/EnsureApp.spoon/init.lua line 457 |
| Signature | EnsureApp:getAppNames([spaceID]) |
|---|---|
| Type | Method |
| Description | Get a list of all app names currently configured in EnsureApps. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | Source/EnsureApp.spoon/init.lua line 397 |
| Signature | EnsureApp:getAppNamesForSpace(spaceID) |
|---|---|
| Type | Method |
| Description | Given a spaceID, return the name of all configured apps present in the space. |
| Parameters |
|
| Returns |
|
| Source | Source/EnsureApp.spoon/init.lua line 434 |
| Signature | EnsureApp:init() |
|---|---|
| Type | Method |
| Description | Spoon initializer method for EnsureApp. |
| Parameters |
|
| Returns |
|
| Source | Source/EnsureApp.spoon/init.lua line 85 |
| Signature | EnsureApp:start() |
|---|---|
| Type | Method |
| Description | Spoon start method for EnsureApp. |
| Parameters |
|
| Returns |
|
| Source | Source/EnsureApp.spoon/init.lua line 474 |
| Signature | EnsureApp:stop() |
|---|---|
| Type | Method |
| Description | Spoon stop method for EnsureApp. |
| Parameters |
|
| Returns |
|
| Source | Source/EnsureApp.spoon/init.lua line 495 |