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 |
Source | extensions/console/console.lua line 43 |
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. |
Source | extensions/console/console.lua line 78 |
Signature | hs.console.defaultToolbar |
---|---|
Type | Constant |
Description |
Default toolbar for the Console window |
Notes |
|
Source | extensions/_coresetup/_coresetup.lua line 700 |
Signature | hs.console.alpha([alpha]) -> currentValue |
---|---|
Type | Function |
Description |
Get or set the alpha level of the console window. |
Parameters |
|
Returns |
|
Source | extensions/console/libconsole.m line 506 |
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 |
|
Source | extensions/console/console.lua line 88 |
Signature | hs.console.clearConsole() -> nil |
---|---|
Type | Function |
Description |
Clear the Hammerspoon console output window. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/console.lua line 27 |
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 |
|
Source | extensions/console/libconsole.m line 143 |
Signature | hs.console.consoleFont([font]) -> fontTable |
---|---|
Type | Function |
Description |
Get or set the font used in the Hammerspoon console. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/libconsole.m line 117 |
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 |
|
Source | extensions/console/libconsole.m line 65 |
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 |
|
Source | extensions/console/libconsole.m line 169 |
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 |
. ``` |
Source | extensions/console/libconsole.m line 33 |
Signature | hs.console.getConsole([styled]) -> text | styledText |
---|---|
Type | Function |
Description |
Get the text of the Hammerspoon console output window. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/libconsole.m line 373 |
Signature | hs.console.getHistory() -> array |
---|---|
Type | Function |
Description |
Get the Hammerspoon console command history as an array. |
Parameters |
|
Returns |
|
Source | extensions/console/libconsole.m line 314 |
Signature | hs.console.hswindow() -> hs.window object |
---|---|
Type | Function |
Description |
Get an hs.window object which represents the Hammerspoon console window |
Parameters |
|
Returns |
|
Source | extensions/console/libconsole.m line 195 |
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 |
|
Source | extensions/console/libconsole.m line 266 |
Signature | hs.console.level([theLevel]) -> currentValue |
---|---|
Type | Function |
Description |
Get or set the console window level |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/libconsole.m line 474 |
Signature | hs.console.maxOutputHistory([length]) -> number |
---|---|
Type | Function |
Description |
Get or set the max length of the Hammerspoon console's scrollback history. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/libconsole.m line 91 |
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 |
|
Source | extensions/console/libconsole.m line 241 |
Signature | hs.console.printStyledtext(...) -> none |
---|---|
Type | Function |
Description |
A print function which recognizes |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/libconsole.m line 423 |
Signature | hs.console.setConsole([styledText]) -> none |
---|---|
Type | Function |
Description |
Clear the Hammerspoon console output window. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/libconsole.m line 332 |
Signature | hs.console.setHistory(array) -> nil |
---|---|
Type | Function |
Description |
Set the Hammerspoon console command history to the items specified in the given array. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/libconsole.m line 400 |
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 |
|
Source | extensions/console/libconsole.m line 291 |
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 |
|
Source | extensions/console/libconsole.m line 563 |
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 |
|
Source | extensions/console/libconsole.m line 216 |
Signature | hs.console.behavior([behavior]) -> currentValue |
---|---|
Type | Method |
Description |
Get or set the window behavior settings for the console. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/libconsole.m line 528 |
Signature | hs.console.toolbar([toolbar]) -> toolbarObject | currentValue |
---|---|
Type | Method |
Description |
Get or attach/detach a toolbar to/from the Hammerspoon console. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/console.lua line 136 |
© 2014–2017 Hammerspoon contributors
Licensed under the MIT License.
https://www.hammerspoon.org/docs/hs.console.html