hs.console.asHSDrawing() -> hs.drawing object
hs.drawing
have been added to the hs.console
module itself. If you believe that a useful method has been overlooked, please submit an issue.hs.console.asHSWindow() -> hs.window object
hs.console.defaultToolbar
hs.toolbar
object that is shown by default in the Hammerspoon Consolehs.console.toolbar(nil)
to your config, or you can replace it with your own hs.webview.toolbar
objecths.console.alpha([alpha]) -> currentValue
alpha
- an optional number between 0.0 and 1.0 specifying the new alpha level for the Hammerspoon console.hs.console.behaviorAsLabels(behaviorTable) -> currentValue
hs.drawing.windowBehaviors
.hs.drawing.windowBehaviors
for more information.hs.console.clearConsole() -> nil
hs.console.setConsole()
hs.console.consoleCommandColor([color]) -> color
hs.drawing.color
hs.drawing.color
entry in the Dash documentation, or type help.hs.drawing.color
in the Hammerspoon console to get more information on how to specify a color.hs.console.consoleFont([font]) -> fontTable
name
key-value pair and a size
key-value pair describing the font to be used.name
key and a size
key.hs.drawing.color
entry in the Dash documentation, or type help.hs.drawing.color
in the Hammerspoon console to get more information on how to specify a color.hs.console.consolePrintColor([color]) -> color
hs.drawing.color
hs.drawing.color
entry in the Dash documentation, or type help.hs.drawing.color
in the Hammerspoon console to get more information on how to specify a color.hs.console.consoleResultColor([color]) -> color
hs.drawing.color
hs.drawing.color
entry in the Dash documentation, or type help.hs.drawing.color
in the Hammerspoon console to get more information on how to specify a color.hs.console.darkMode([state]) -> bool
lua if hs.console.darkMode() then hs.console.outputBackgroundColor{ white = 0 } hs.console.consoleCommandColor{ white = 1 } hs.console.alpha(.8) end.
hs.console.getConsole([styled]) -> text | styledText
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Get the text of the Hammerspoon console output window. | | Parameters |hs.styledtext
object.hs.console.getHistory() -> array
hs.console.hswindow() -> hs.window object
hs.console.inputBackgroundColor([color]) -> color
hs.drawing.color
hs.drawing.color
entry in the Dash documentation, or type help.hs.drawing.color
in the Hammerspoon console to get more information on how to specify a color.hs.console.level([theLevel]) -> currentValue
theLevel
- an optional parameter specifying the desired level as an integer, which can be obtained from hs.drawing.windowLevels
.hs.drawing.windowLevels
hs.console.outputBackgroundColor([color]) -> color
hs.drawing.color
hs.drawing.color
entry in the Dash documentation, or type help.hs.drawing.color
in the Hammerspoon console to get more information on how to specify a color.hs.console.printStyledtext(...) -> none
hs.styledtext
objects and renders them as such in the Hammerspoon console.print
command. If an argument matches the userdata type of hs.styledtext
, the text is rendered as defined by its style attributes in the Hammerspoon console; otherwise it is rendered as it would be via the traditional print
command within Hammerspoon.print
command as possible. You can replace the existing print command with this by adding the following to your init.lua
file:hs.console.setConsole([styledText]) -> none
hs.styledtext
object containing the text you wish to replace the Hammerspoon console output with. If you do not provide an argument, the console is cleared of all content.hs.styledtext
object in either userdata or table format.hs.console.setHistory(array) -> nil
hs.console.setHistory({})
hs.console.smartInsertDeleteEnabled([flag]) -> bool
hs.console.titleVisibility([state]) -> current value
hs.webview.toolbar
module documentation), this function can be used to specify whether the Toolbar appears underneath the console window's title ("visible") or in the window's title bar itself, as seen in applications like Safari ("hidden"). When the title is hidden, the toolbar will only display the toolbar items as icons without labels, and ignores changes made with hs.webview.toolbar:displayMode
.hs.console.windowBackgroundColor([color]) -> color
hs.drawing.color
hs.drawing.color
entry in the Dash documentation, or type help.hs.drawing.color
in the Hammerspoon console to get more information on how to specify a color.hs.console.behavior([behavior]) -> currentValue
behavior
- an optional number representing the desired window behaviors for the Hammerspoon console.hs.drawing.windowBehaviors
for more information.hs.console.toolbar([toolbar]) -> toolbarObject | currentValue
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Get or attach/detach a toolbar to/from the Hammerspoon console. | | Parameters |toolbar
- if an hs.webview.toolbar
object is specified, it will be attached to the Hammerspoon console. If an explicit nil is specified, the current toolbar will be removed from the console.hs.webview.toolbar.attachToolbar
function.