hs.chooser.globalCallback
hs.chooser
objectwillOpen
- An hs.chooser is about to be shown on screendidClose
- An hs.chooser has just been removed from the screenwillOpen
event to remember which window has focus, and the didClose
event to restore focus back to the original window. If you want to use this in addition to your own callback, you can call it as hs.chooser._defaultGlobalCallback(event)
hs.chooser.new(completionFn) -> hs.chooser object
hs.chooser
objecths.chooser
object to appear above full-screen windows you must hide the Hammerspoon Dock icon first using: hs.dockicon.hide()
hs.chooser:attachedToolbar([toolbar]) -> hs.chooser object | currentValue
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Get or attach/detach a toolbar to/from the chooser. | | Parameters |toolbar
- An hs.webview.toolbar
object to be attached to the chooser. If nil
is supplied, the current toolbar will be removedhs.webview.toolbar.attachToolbar
function.hs.chooser:bgDark([beDark]) -> hs.chooser object or boolean
hs.chooser
object or a boolean, true if the window is dark, false if it is lighths.chooser:fgColor()
and hs.chooser:subTextColor()
hs.chooser:cancel() -> hs.chooser object
hs.chooser
objecths.chooser:choices(choices) -> hs.chooser object
hs.chooser
objecths.image
image object that will be displayed next to the choicetrue
, if set to false
selecting the choice will invoke the invalidCallback
method instead of dismissing the chooserhs.chooser:refreshChoicesCallback()
is called.hs.chooser:delete()
hs.chooser:fgColor(color) -> hs.chooser object
hs.drawing.color
), or nil to restore the default color. If this parameter is omitted, the existing color will be returnedhs.chooser
object or a color tablehs.chooser:hide() -> hs.chooser object
hs.chooser
objecths.chooser:hideCallback([fn]) -> hs.chooser object
hs.chooser:invalidCallback([fn]) -> hs.chooser object
hs.chooser
objecths.menubar
, specifically the :popupMenu()
methodhs.chooser:isVisible() -> boolean
hs.chooser:placeholderText([placeholderText]) -> hs.chooser object or string
hs.chooser:query([queryString]) -> hs.chooser object or string
hs.chooser
object or a stringhs.chooser:queryChangedCallback([fn]) -> hs.chooser object
hs.timer
object to only react when they have finished typing.hs.chooser:refreshChoicesCallback([reload]) -> hs.chooser object
false
)hs.chooser
objecths.chooser:choices()
hs.chooser:rightClickCallback([fn]) -> hs.chooser object
hs.chooser
objecths.mouse
.hs.menubar
, specifically the :popupMenu()
methodhs.chooser:rows([numRows]) -> hs.chooser object or number
hs.chooser
object or a numberhs.chooser:searchSubText([searchSubText]) -> hs.chooser object or boolean
hs.chooser
object if a value was set, or a boolean if no parameter was passedhs.chooser:select([row]) -> hs.chooser object
row
- an optional integer specifying the row to select.hs.chooser
objecths.chooser:selectedRow([row]) -> number
row
- an optional integer specifying the row to select.hs.chooser:selectedRowContents([row]) -> table
row
- an optional integer specifying the specific row to return the contents ofhs.chooser:show([topLeftPoint]) -> hs.chooser object
hs.geometry
point object describing the absolute screen co-ordinates for the top left point of the chooser window. Defaults to centering the window on the primary screenhs.chooser:showCallback([fn]) -> hs.chooser object
hs.chooser.globalCallback
hs.chooser:subTextColor(color) -> hs.chooser object or hs.color object
hs.drawing.color
), or nil to restore the default color. If this parameter is omitted, the existing color will be returnedhs.chooser
object or a color tablehs.chooser:width([percent]) -> hs.chooser object or number
hs.chooser
object or a number