"doc":"Cycle states in order\n\nParameters:\n * states - A array of states to toggle. For example: `{'push-to-talk', 'release-to-talk'}`",
"name":"toggleStates",
"parameters":[
" * states - A array of states to toggle. For example: `{'push-to-talk', 'release-to-talk'}`"
],
"signature":"PushToTalk:toggleStates()",
"stripped_doc":"",
"type":"Method"
}
],
"Variable":[
{
"def":"PushToTalk.app_switcher",
"desc":"Takes mapping from application name to mic state.",
"doc":"Takes mapping from application name to mic state.\nFor example this `{ ['zoom.us'] = 'push-to-talk' }` will switch mic to `push-to-talk` state when Zoom app starts.",
"name":"app_switcher",
"signature":"PushToTalk.app_switcher",
"stripped_doc":"For example this `{ ['zoom.us'] = 'push-to-talk' }` will switch mic to `push-to-talk` state when Zoom app starts.",
"type":"Variable"
},
{
"def":"PushToTalk.detect_on_start",
"desc":"Check running applications when starting PushToTalk.",
"doc":"Check running applications when starting PushToTalk.\nDefaults to false for backwards compatibility. With this disabled, PushToTalk will only change state when applications are launched or quit while PushToTalk is already active. Enable this to look through list of running applications when PushToTalk is started. If multiple apps defined in app_switcher are running, it will set state to the first one it encounters.",
"name":"detect_on_start",
"signature":"PushToTalk.detect_on_start",
"stripped_doc":"Defaults to false for backwards compatibility. With this disabled, PushToTalk will only change state when applications are launched or quit while PushToTalk is already active. Enable this to look through list of running applications when PushToTalk is started. If multiple apps defined in app_switcher are running, it will set state to the first one it encounters.",
"type":"Variable"
}
],
"desc":"Implements push-to-talk and push-to-mute functionality with `fn` key.",
"doc":"Implements push-to-talk and push-to-mute functionality with `fn` key.\nI implemented this after reading Gitlab remote handbook https://about.gitlab.com/handbook/communication/ about Shush utility.\n\nMy workflow:\n\nWhen Zoom starts, PushToTalk automatically changes mic state from `default`\nto `push-to-talk`, so I need to press `fn` key to unmute myself and speak.\nIf I need to actively chat in group meeting or it's one-on-one meeting,\nI'm switching to `push-to-mute` state, so mic will be unmute by default and `fn` key mutes it.\n\nPushToTalk has menubar with colorful icons so you can easily see current mic state.\n\nSample config: `spoon.SpoonInstall:andUse(\"PushToTalk\", {start = true, config = { app_switcher = { ['zoom.us'] = 'push-to-talk' }}})`\nand separate keybinding to toggle states with lambda function `function() spoon.PushToTalk.toggleStates({'push-to-talk', 'release-to-talk'}) end`\n\nCheck out my config: https://github.com/skrypka/hammerspoon_config/blob/master/init.lua",
"items":[
{
"def":"PushToTalk.app_switcher",
"desc":"Takes mapping from application name to mic state.",
"doc":"Takes mapping from application name to mic state.\nFor example this `{ ['zoom.us'] = 'push-to-talk' }` will switch mic to `push-to-talk` state when Zoom app starts.",
"name":"app_switcher",
"signature":"PushToTalk.app_switcher",
"stripped_doc":"For example this `{ ['zoom.us'] = 'push-to-talk' }` will switch mic to `push-to-talk` state when Zoom app starts.",
"type":"Variable"
},
{
"def":"PushToTalk.detect_on_start",
"desc":"Check running applications when starting PushToTalk.",
"doc":"Check running applications when starting PushToTalk.\nDefaults to false for backwards compatibility. With this disabled, PushToTalk will only change state when applications are launched or quit while PushToTalk is already active. Enable this to look through list of running applications when PushToTalk is started. If multiple apps defined in app_switcher are running, it will set state to the first one it encounters.",
"name":"detect_on_start",
"signature":"PushToTalk.detect_on_start",
"stripped_doc":"Defaults to false for backwards compatibility. With this disabled, PushToTalk will only change state when applications are launched or quit while PushToTalk is already active. Enable this to look through list of running applications when PushToTalk is started. If multiple apps defined in app_switcher are running, it will set state to the first one it encounters.",
"type":"Variable"
},
{
"def":"PushToTalk:init()",
"desc":"Starts menu and key watcher",
"doc":"Starts menu and key watcher",
"name":"init",
"signature":"PushToTalk:init()",
"stripped_doc":"",
"type":"Method"
},
{
"def":"PushToTalk:stop()",
"desc":"Stops PushToTalk",
"doc":"Stops PushToTalk",
"name":"stop",
"signature":"PushToTalk:stop()",
"stripped_doc":"",
"type":"Method"
},
{
"def":"PushToTalk:toggleStates()",
"desc":"Cycle states in order",
"doc":"Cycle states in order\n\nParameters:\n * states - A array of states to toggle. For example: `{'push-to-talk', 'release-to-talk'}`",
"name":"toggleStates",
"parameters":[
" * states - A array of states to toggle. For example: `{'push-to-talk', 'release-to-talk'}`"
],
"signature":"PushToTalk:toggleStates()",
"stripped_doc":"",
"type":"Method"
}
],
"name":"PushToTalk",
"stripped_doc":"I implemented this after reading Gitlab remote handbook https://about.gitlab.com/handbook/communication/ about Shush utility.\n\nMy workflow:\n\nWhen Zoom starts, PushToTalk automatically changes mic state from `default`\nto `push-to-talk`, so I need to press `fn` key to unmute myself and speak.\nIf I need to actively chat in group meeting or it's one-on-one meeting,\nI'm switching to `push-to-mute` state, so mic will be unmute by default and `fn` key mutes it.\n\nPushToTalk has menubar with colorful icons so you can easily see current mic state.\n\nSample config: `spoon.SpoonInstall:andUse(\"PushToTalk\", {start = true, config = { app_switcher = { ['zoom.us'] = 'push-to-talk' }}})`\nand separate keybinding to toggle states with lambda function `function() spoon.PushToTalk.toggleStates({'push-to-talk', 'release-to-talk'}) end`\n\nCheck out my config: https://github.com/skrypka/hammerspoon_config/blob/master/init.lua",
--- Takes mapping from application name to mic state.
--- For example this `{ ['zoom.us'] = 'push-to-talk' }` will switch mic to `push-to-talk` state when Zoom app starts.
obj.app_switcher={}
--- PushToTalk.detect_on_start
--- Variable
--- Check running applications when starting PushToTalk.
--- Defaults to false for backwards compatibility. With this disabled, PushToTalk will only change state when applications are launched or quit while PushToTalk is already active. Enable this to look through list of running applications when PushToTalk is started. If multiple apps defined in app_switcher are running, it will set state to the first one it encounters.