Connect, disconnect, or toggle connection to/from a personal hotspot. Optionally kills/opens a list of apps on connect/disconnect respectively.
Example configuration (using SpoonInstall.spoon):
spoon.SpoonInstall:andUse(
"PersonalHotspot",
{
config = {
hotspotName = "John Appleseed’s iPhone",
appsToKill = {
"Arq",
"Arq Agent",
"Dropbox"
}
},
hotkeys = {
toggle = {{"cmd", "option", "ctrl"}, "h"}
}
}
)
If PersonalHotspot.hotspotName isn't set, the first personal hotspot in the Wi-Fi menu will be selected, and PersonalHotspot.hotspotName will be set to the name of that hotspot.
| Signature | PersonalHotspot.appsToKill (List) |
|---|---|
| Type | Variable |
| Description | A list of strings representing applications to kill/open, when |
| Notes |
|
| Source | Source/PersonalHotspot.spoon/init.lua line 116 |
| Signature | PersonalHotspot.hotspotName (String) |
|---|---|
| Type | Variable |
| Description | The name of the personal hotspot you want to connect/disconnect from, e.g., "John Appleseed’s iPhone". |
| Notes |
|
| Source | Source/PersonalHotspot.spoon/init.lua line 126 |
| Signature | PersonalHotspot.timeout (Number) |
|---|---|
| Type | Variable |
| Description | The number of seconds to wait for personal hotspot to appear in Wi-Fi menu before attempting to connect/disconnect. Default is 3 seconds. |
| Source | Source/PersonalHotspot.spoon/init.lua line 134 |
| Signature | PersonalHotspot:bindHotkeys(mapping) -> Self |
|---|---|
| Type | Method |
| Description | Binds hotkey mappings for this spoon. |
| Parameters |
|
| Returns |
|
| Source | Source/PersonalHotspot.spoon/init.lua line 216 |
| Signature | PersonalHotspot:connect() -> Self |
|---|---|
| Type | Method |
| Description | Tries to connect to the personal hotspot named in |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | Source/PersonalHotspot.spoon/init.lua line 139 |
| Signature | PersonalHotspot:disconnect() -> Self |
|---|---|
| Type | Method |
| Description | If currently connected to the personal hotspot named in |
| Parameters |
|
| Returns |
|
| Source | Source/PersonalHotspot.spoon/init.lua line 172 |
| Signature | PersonalHotspot:toggle() -> Self |
|---|---|
| Type | Method |
| Description | Toggles personal hotspot connection. |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | Source/PersonalHotspot.spoon/init.lua line 194 |