Some functions for manipulating the Hammerspoon console.
These functions allow altering the behavior and display of the Hammerspoon console. They should be considered experimental, but have worked well for me.
Signature | hs.console.asHSDrawing() -> hs.drawing object |
---|---|
Type | Deprecated |
Description | Because use of this function can easily lead to a crash, useful methods from Parameters:
Returns:
|
Signature | hs.console.asHSWindow() -> hs.window object |
---|---|
Type | Deprecated |
Description | Returns an hs.window object for the console so that you can use hs.window methods on it. This function is identical to hs.console.hswindow. It is included for reasons of backwards compatibility, but use of the new name is recommended for clarity. |
Signature | hs.console.defaultToolbar |
---|---|
Type | Constant |
Description | Default toolbar for the Console window Notes:
|
Signature | hs.console.alpha([alpha]) -> currentValue |
---|---|
Type | Function |
Description | Get or set the alpha level of the console window. Parameters:
Returns:
|
Signature | hs.console.behaviorAsLabels(behaviorTable) -> currentValue |
---|---|
Type | Function |
Description | Get or set the window behavior settings for the console using labels defined in Parameters:
Returns:
Notes:
|
Signature | hs.console.clearConsole() -> nil |
---|---|
Type | Function |
Description | Clear the Hammerspoon console output window. Parameters:
Returns:
Notes:
|
Signature | hs.console.consoleCommandColor([color]) -> color |
---|---|
Type | Function |
Description | Get or set the color that commands displayed in the Hammerspoon console are displayed with. Parameters:
Returns:
Notes:
|
Signature | hs.console.consoleFont([font]) -> fontTable |
---|---|
Type | Function |
Description | Get or set the font used in the Hammerspoon console. Parameters:
Returns:
Notes:
|
Signature | hs.console.consolePrintColor([color]) -> color |
---|---|
Type | Function |
Description | Get or set the color that regular output displayed in the Hammerspoon console is displayed with. Parameters:
Returns:
Notes:
|
Signature | hs.console.consoleResultColor([color]) -> color |
---|---|
Type | Function |
Description | Get or set the color that function results displayed in the Hammerspoon console are displayed with. Parameters:
Returns:
Notes:
|
Signature | hs.console.darkMode([state]) -> bool |
---|---|
Type | Function |
Description | Set or display whether or not the Console window should display in dark mode. Parameters:
Returns:
Notes:
|
Signature | hs.console.getConsole([styled]) -> text | styledText |
---|---|
Type | Function |
Description | Get the text of the Hammerspoon console output window. Parameters:
Returns:
Notes:
|
Signature | hs.console.getHistory() -> array |
---|---|
Type | Function |
Description | Get the Hammerspoon console history as an array. Parameters:
Returns:
|
Signature | hs.console.hswindow() -> hs.window object |
---|---|
Type | Function |
Description | Get an hs.window object which represents the Hammerspoon console window Parameters:
Returns:
|
Signature | hs.console.inputBackgroundColor([color]) -> color |
---|---|
Type | Function |
Description | Get or set the color for the background of the Hammerspoon Console's input field. Parameters:
Returns:
Notes:
|
Signature | hs.console.level([theLevel]) -> currentValue |
---|---|
Type | Function |
Description | Get or set the console window level Parameters:
Returns:
Notes:
|
Signature | hs.console.outputBackgroundColor([color]) -> color |
---|---|
Type | Function |
Description | Get or set the color for the background of the Hammerspoon Console's output view. Parameters:
Returns:
Notes:
|
Signature | hs.console.printStyledtext(...) -> none |
---|---|
Type | Function |
Description | A print function which recognizes Parameters:
Returns:
Notes:
|
Signature | hs.console.setConsole([styledText]) -> none |
---|---|
Type | Function |
Description | Clear the Hammerspoon console output window. Parameters:
Returns:
Notes:
|
Signature | hs.console.setHistory(array) -> nil |
---|---|
Type | Function |
Description | Set the Hammerspoon console history to the items specified in the given array. Parameters:
Returns:
Notes:
|
Signature | hs.console.smartInsertDeleteEnabled([flag]) -> bool |
---|---|
Type | Function |
Description | Determine whether or not objects copied from the console window insert or delete space around selected words to preserve proper spacing and punctuation. Parameters:
Returns:
Notes:
|
Signature | hs.console.titleVisibility([state]) -> current value |
---|---|
Type | Function |
Description | Get or set whether or not the "Hammerspoon Console" text appears in the Hammerspoon console titlebar. Parameters:
Returns:
Notes:
|
Signature | hs.console.windowBackgroundColor([color]) -> color |
---|---|
Type | Function |
Description | Get or set the color for the background of the Hammerspoon Console's window. Parameters:
Returns:
Notes:
|
Signature | hs.console.behavior([behavior]) -> currentValue |
---|---|
Type | Method |
Description | Get or set the window behavior settings for the console. Parameters:
Returns:
Notes:
|
Signature | hs.console.toolbar([toolbar | nil]) -> toolbarObject | currentValue |
---|---|
Type | Method |
Description | Get or attach/detach a toolbar to/from the Hammerspoon console. Parameters:
Returns:
Notes:
|