mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 12:06:41 +00:00
178 lines
14 KiB
JSON
178 lines
14 KiB
JSON
[
|
|
{
|
|
"Command": [],
|
|
"Constant": [],
|
|
"Constructor": [],
|
|
"Deprecated": [],
|
|
"Field": [],
|
|
"Function": [],
|
|
"Method": [
|
|
{
|
|
"def": "HeadphoneAutoPause:audiodevwatch(dev_uid, event_name)",
|
|
"desc": "Callback function to use as an audio device watcher, to pause/unpause the application on headphones plugged/unplugged",
|
|
"doc": "Callback function to use as an audio device watcher, to pause/unpause the application on headphones plugged/unplugged",
|
|
"name": "audiodevwatch",
|
|
"signature": "HeadphoneAutoPause:audiodevwatch(dev_uid, event_name)",
|
|
"stripped_doc": "",
|
|
"type": "Method"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause.defaultControlFns(app)",
|
|
"desc": "Generate the most common set of application control definition.",
|
|
"doc": "Generate the most common set of application control definition.\n\nParameters:\n * app - name of the application, with its correct letter casing (i.e. \"iTunes\"). The name as provided will be used to find the running application, and its lowercase version will be used to find the corresponding `hs.*` module.\n\nReturns:\n * A table in the correct format for `HeadphoneAutoPause.controlfns`, using the lower-case value of `app` as the module name (for example, if app = \"iTunes\", the module loaded will be `hs.itunes`, and assuming the functions `isPlaying()`, `play()` and `pause()` exist in that module.",
|
|
"name": "defaultControlFns",
|
|
"parameters": [
|
|
" * app - name of the application, with its correct letter casing (i.e. \"iTunes\"). The name as provided will be used to find the running application, and its lowercase version will be used to find the corresponding `hs.*` module."
|
|
],
|
|
"returns": [
|
|
" * A table in the correct format for `HeadphoneAutoPause.controlfns`, using the lower-case value of `app` as the module name (for example, if app = \"iTunes\", the module loaded will be `hs.itunes`, and assuming the functions `isPlaying()`, `play()` and `pause()` exist in that module."
|
|
],
|
|
"signature": "HeadphoneAutoPause.defaultControlFns(app)",
|
|
"stripped_doc": "",
|
|
"type": "Method"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause:start()",
|
|
"desc": "Start headphone detection on all audio devices that support it",
|
|
"doc": "Start headphone detection on all audio devices that support it",
|
|
"name": "start",
|
|
"signature": "HeadphoneAutoPause:start()",
|
|
"stripped_doc": "",
|
|
"type": "Method"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause:stop()",
|
|
"desc": "Stop headphone detection",
|
|
"doc": "Stop headphone detection",
|
|
"name": "stop",
|
|
"signature": "HeadphoneAutoPause:stop()",
|
|
"stripped_doc": "",
|
|
"type": "Method"
|
|
}
|
|
],
|
|
"Variable": [
|
|
{
|
|
"def": "HeadphoneAutoPause.autoResume",
|
|
"desc": "Boolean value indicating if music should be automatically resumed when headphones are plugged in again. Only works if music was automatically paused when headphones were unplugged.",
|
|
"doc": "Boolean value indicating if music should be automatically resumed when headphones are plugged in again. Only works if music was automatically paused when headphones were unplugged.\n\nDefault value: `true`",
|
|
"name": "autoResume",
|
|
"signature": "HeadphoneAutoPause.autoResume",
|
|
"stripped_doc": "Default value: `true`",
|
|
"type": "Variable"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause.control",
|
|
"desc": "Table containing one key per application, with the value indicating whether HeadphoneAutoPause should try to pause/unpause that application in response to the headphone being plugged/unplugged. The key name must ideally correspond to the name of the corresponding `hs.*` module. Default value:",
|
|
"doc": "Table containing one key per application, with the value indicating whether HeadphoneAutoPause should try to pause/unpause that application in response to the headphone being plugged/unplugged. The key name must ideally correspond to the name of the corresponding `hs.*` module. Default value:\n```\n{\n itunes = true,\n spotify = true,\n deezer = true,\n vox = false -- Vox has built-in headphone detection support\n}\n```",
|
|
"name": "control",
|
|
"signature": "HeadphoneAutoPause.control",
|
|
"stripped_doc": "```\n{\n itunes = true,\n spotify = true,\n deezer = true,\n vox = false -- Vox has built-in headphone detection support\n}\n```",
|
|
"type": "Variable"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause.controlfns",
|
|
"desc": "Table containing control functions for each application to control.",
|
|
"doc": "Table containing control functions for each application to control.\nThe keys must correspond to the values in `HeadphoneAutoPause.control`, and the value is a table with the following elements:\n * `appname` - application name (case-sensitive, as the application appears to the system)\n * `isPlaying` - function that returns a true value if the application is playing\n * `play` - function that starts playback in the application\n * `pause` - function that pauses playback in the application\n\nThe default value includes definitions for iTunes, Spotify, Deezer and Vox, using the corresponding functions from `hs.itunes`, `hs.spotify`, `hs.deezer` and `hs.vox`, respectively.",
|
|
"name": "controlfns",
|
|
"signature": "HeadphoneAutoPause.controlfns",
|
|
"stripped_doc": "The keys must correspond to the values in `HeadphoneAutoPause.control`, and the value is a table with the following elements:\n * `appname` - application name (case-sensitive, as the application appears to the system)\n * `isPlaying` - function that returns a true value if the application is playing\n * `play` - function that starts playback in the application\n * `pause` - function that pauses playback in the application\nThe default value includes definitions for iTunes, Spotify, Deezer and Vox, using the corresponding functions from `hs.itunes`, `hs.spotify`, `hs.deezer` and `hs.vox`, respectively.",
|
|
"type": "Variable"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause.logger",
|
|
"desc": "Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon.",
|
|
"doc": "Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon.",
|
|
"name": "logger",
|
|
"signature": "HeadphoneAutoPause.logger",
|
|
"stripped_doc": "",
|
|
"type": "Variable"
|
|
}
|
|
],
|
|
"desc": "Play/pause music players when headphones are connected/disconnected",
|
|
"doc": "Play/pause music players when headphones are connected/disconnected\n\nDownload: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/HeadphoneAutoPause.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/HeadphoneAutoPause.spoon.zip)",
|
|
"items": [
|
|
{
|
|
"def": "HeadphoneAutoPause:audiodevwatch(dev_uid, event_name)",
|
|
"desc": "Callback function to use as an audio device watcher, to pause/unpause the application on headphones plugged/unplugged",
|
|
"doc": "Callback function to use as an audio device watcher, to pause/unpause the application on headphones plugged/unplugged",
|
|
"name": "audiodevwatch",
|
|
"signature": "HeadphoneAutoPause:audiodevwatch(dev_uid, event_name)",
|
|
"stripped_doc": "",
|
|
"type": "Method"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause.autoResume",
|
|
"desc": "Boolean value indicating if music should be automatically resumed when headphones are plugged in again. Only works if music was automatically paused when headphones were unplugged.",
|
|
"doc": "Boolean value indicating if music should be automatically resumed when headphones are plugged in again. Only works if music was automatically paused when headphones were unplugged.\n\nDefault value: `true`",
|
|
"name": "autoResume",
|
|
"signature": "HeadphoneAutoPause.autoResume",
|
|
"stripped_doc": "Default value: `true`",
|
|
"type": "Variable"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause.control",
|
|
"desc": "Table containing one key per application, with the value indicating whether HeadphoneAutoPause should try to pause/unpause that application in response to the headphone being plugged/unplugged. The key name must ideally correspond to the name of the corresponding `hs.*` module. Default value:",
|
|
"doc": "Table containing one key per application, with the value indicating whether HeadphoneAutoPause should try to pause/unpause that application in response to the headphone being plugged/unplugged. The key name must ideally correspond to the name of the corresponding `hs.*` module. Default value:\n```\n{\n itunes = true,\n spotify = true,\n deezer = true,\n vox = false -- Vox has built-in headphone detection support\n}\n```",
|
|
"name": "control",
|
|
"signature": "HeadphoneAutoPause.control",
|
|
"stripped_doc": "```\n{\n itunes = true,\n spotify = true,\n deezer = true,\n vox = false -- Vox has built-in headphone detection support\n}\n```",
|
|
"type": "Variable"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause.controlfns",
|
|
"desc": "Table containing control functions for each application to control.",
|
|
"doc": "Table containing control functions for each application to control.\nThe keys must correspond to the values in `HeadphoneAutoPause.control`, and the value is a table with the following elements:\n * `appname` - application name (case-sensitive, as the application appears to the system)\n * `isPlaying` - function that returns a true value if the application is playing\n * `play` - function that starts playback in the application\n * `pause` - function that pauses playback in the application\n\nThe default value includes definitions for iTunes, Spotify, Deezer and Vox, using the corresponding functions from `hs.itunes`, `hs.spotify`, `hs.deezer` and `hs.vox`, respectively.",
|
|
"name": "controlfns",
|
|
"signature": "HeadphoneAutoPause.controlfns",
|
|
"stripped_doc": "The keys must correspond to the values in `HeadphoneAutoPause.control`, and the value is a table with the following elements:\n * `appname` - application name (case-sensitive, as the application appears to the system)\n * `isPlaying` - function that returns a true value if the application is playing\n * `play` - function that starts playback in the application\n * `pause` - function that pauses playback in the application\nThe default value includes definitions for iTunes, Spotify, Deezer and Vox, using the corresponding functions from `hs.itunes`, `hs.spotify`, `hs.deezer` and `hs.vox`, respectively.",
|
|
"type": "Variable"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause.defaultControlFns(app)",
|
|
"desc": "Generate the most common set of application control definition.",
|
|
"doc": "Generate the most common set of application control definition.\n\nParameters:\n * app - name of the application, with its correct letter casing (i.e. \"iTunes\"). The name as provided will be used to find the running application, and its lowercase version will be used to find the corresponding `hs.*` module.\n\nReturns:\n * A table in the correct format for `HeadphoneAutoPause.controlfns`, using the lower-case value of `app` as the module name (for example, if app = \"iTunes\", the module loaded will be `hs.itunes`, and assuming the functions `isPlaying()`, `play()` and `pause()` exist in that module.",
|
|
"name": "defaultControlFns",
|
|
"parameters": [
|
|
" * app - name of the application, with its correct letter casing (i.e. \"iTunes\"). The name as provided will be used to find the running application, and its lowercase version will be used to find the corresponding `hs.*` module."
|
|
],
|
|
"returns": [
|
|
" * A table in the correct format for `HeadphoneAutoPause.controlfns`, using the lower-case value of `app` as the module name (for example, if app = \"iTunes\", the module loaded will be `hs.itunes`, and assuming the functions `isPlaying()`, `play()` and `pause()` exist in that module."
|
|
],
|
|
"signature": "HeadphoneAutoPause.defaultControlFns(app)",
|
|
"stripped_doc": "",
|
|
"type": "Method"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause.logger",
|
|
"desc": "Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon.",
|
|
"doc": "Logger object used within the Spoon. Can be accessed to set the default log level for the messages coming from the Spoon.",
|
|
"name": "logger",
|
|
"signature": "HeadphoneAutoPause.logger",
|
|
"stripped_doc": "",
|
|
"type": "Variable"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause:start()",
|
|
"desc": "Start headphone detection on all audio devices that support it",
|
|
"doc": "Start headphone detection on all audio devices that support it",
|
|
"name": "start",
|
|
"signature": "HeadphoneAutoPause:start()",
|
|
"stripped_doc": "",
|
|
"type": "Method"
|
|
},
|
|
{
|
|
"def": "HeadphoneAutoPause:stop()",
|
|
"desc": "Stop headphone detection",
|
|
"doc": "Stop headphone detection",
|
|
"name": "stop",
|
|
"signature": "HeadphoneAutoPause:stop()",
|
|
"stripped_doc": "",
|
|
"type": "Method"
|
|
}
|
|
],
|
|
"name": "HeadphoneAutoPause",
|
|
"stripped_doc": "\nDownload: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/HeadphoneAutoPause.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/HeadphoneAutoPause.spoon.zip)",
|
|
"submodules": [],
|
|
"type": "Module"
|
|
}
|
|
] |