Automatically hide apps that are out of focus.
Download: https://github.com/adammillerio/Spoons/raw/main/Spoons/Sweeper.spoon.zip
This uses a hs.window.filter to detect windows that have gone out of focus. Then, if they are configured to be "swept" in the apps config, they will be automatically hidden if they remain out of focus after sweepCheckInterval (default 15 seconds).
Example Usage (Using SpoonInstall): spoon.SpoonInstall:andUse( "Sweeper", { start = true } )
| Signature | Sweeper.apps |
|---|---|
| Type | Variable |
| Description | Table containing each application's name and it's desired configuration. The |
| Source | Source/Sweeper.spoon/init.lua line 29 |
| Signature | Sweeper.logger |
|---|---|
| Type | Variable |
| Description | Logger object used within the Spoon. Can be accessed to set the default log |
| Source | Source/Sweeper.spoon/init.lua line 43 |
| Signature | Sweeper.logLevel |
|---|---|
| Type | Variable |
| Description | Sweeper specific log level override, see hs.logger.setLogLevel for options. |
| Source | Source/Sweeper.spoon/init.lua line 49 |
| Signature | Sweeper.subscribedFunctions |
|---|---|
| Type | Variable |
| Description | Table containing all subscribed instance callbacks for the window filter, used |
| Source | Source/Sweeper.spoon/init.lua line 61 |
| Signature | Sweeper.sweepCheckInterval |
|---|---|
| Type | Variable |
| Description | Time in seconds to wait after a window loses focus to check if it should be swept. |
| Source | Source/Sweeper.spoon/init.lua line 38 |
| Signature | Sweeper.windowFilter |
|---|---|
| Type | Variable |
| Description | Main hs.window.filter. This is what is used to detect and action on unfocused |
| Source | Source/Sweeper.spoon/init.lua line 54 |
| Signature | Sweeper:init() |
|---|---|
| Type | Method |
| Description | Spoon initializer method for Sweeper. |
| Parameters |
|
| Returns |
|
| Source | Source/Sweeper.spoon/init.lua line 67 |
| Signature | Sweeper:start() |
|---|---|
| Type | Method |
| Description | Spoon start method for Sweeper. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | Source/Sweeper.spoon/init.lua line 159 |
| Signature | Sweeper:stop() |
|---|---|
| Type | Method |
| Description | Spoon stop method for Sweeper. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | Source/Sweeper.spoon/init.lua line 192 |