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 `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. |
Source | extensions/console/init.lua |
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/init.lua |
Signature | hs.console.defaultToolbar |
---|---|
Type | Constant |
Description | Default toolbar for the Console window |
Notes | |
Source | extensions/_coresetup/init.lua |
Signature | hs.console.alpha([alpha]) -> currentValue |
---|---|
Type | Function |
Description | Get or set the alpha level of the console window. |
Parameters |
|
Returns |
|
Source | extensions/console/internal.m |
Signature | hs.console.behaviorAsLabels(behaviorTable) -> currentValue |
---|---|
Type | Function |
Description | Get or set the window behavior settings for the console using labels defined in `hs.drawing.windowBehaviors`. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/init.lua |
Signature | hs.console.clearConsole() -> nil |
---|---|
Type | Function |
Description | Clear the Hammerspoon console output window. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/init.lua |
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/internal.m |
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/internal.m |
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/internal.m |
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/internal.m |
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/internal.m |
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/internal.m |
Signature | hs.console.getHistory() -> array |
---|---|
Type | Function |
Description | Get the Hammerspoon console history as an array. |
Parameters |
|
Returns |
|
Source | extensions/console/internal.m |
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/internal.m |
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/internal.m |
Signature | hs.console.level([theLevel]) -> currentValue |
---|---|
Type | Function |
Description | Get or set the console window level |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/internal.m |
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/internal.m |
Signature | hs.console.printStyledtext(...) -> none |
---|---|
Type | Function |
Description | A print function which recognizes `hs.styledtext` objects and renders them as such in the Hammerspoon console. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/internal.m |
Signature | hs.console.setConsole([styledText]) -> none |
---|---|
Type | Function |
Description | Clear the Hammerspoon console output window. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/console/internal.m |
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 |
|
Source | extensions/console/internal.m |
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/internal.m |
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/internal.m |
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/internal.m |
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/internal.m |
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/init.lua |