hs
which can be added to your terminal shell environment with hs.ipc.cliInstall. The command line tool will not work unless the hs.ipc
module is loaded first, so it is recommended that you add require("hs.ipc")
to your Hammerspoon init.lua
file (usually located at ~/.hammerspoon/init.lua) so that it is always available when Hammerspoon is running.hs.ipc.cliColors([colors]) -> table
hs
command line toolhs
command line tool.\x1b
or \27
to indicate the escape
character e.g. ipc.cliSetColors{ initial = "", input = "\27[33m", output = "\27[38;5;11m" }
hs.ipc.cliInstall([path][,silent]) -> bool
cmdpost
command line tool/usr/local
hs.ipc.cliUninstall()
to forcibly tidy them uphs.ipc.cliSaveHistory([state]) -> boolean
hs.configDir .. ".cli.history"
, which is usually "~/.hammerspoon/.cli.history".hs.ipc.cliSaveHistorySize([size]) -> number
hs.configDir .. ".cli.history"
, which is usually "~/.hammerspoon/.cli.history".hs.ipc.cliStatus([path][,silent]) -> bool
hs
command line toolhs
tool. Defaults to /usr/local
hs
command line tool is correctly installed, otherwise falsehs.ipc.cliUninstall([path][,silent]) -> bool
hs
command line tool/usr/local
path/bin/cmdpost
and path/share/man/man1/cmdpost.1
. This is more likely to be useful in situations where this command is actually needed (please open an Issue on GitHub if you disagree!)hs.ipc.localPort(name, fn) -> ipcObject
hs.ipc.remotePort(name) -> ipcObject
hs.ipc:delete() -> None
hs.ipc:isRemote() -> boolean
hs.ipc:isValid() -> boolean
hs.ipc:name() -> string
hs.ipc:sendMessage(data, msgID, [waitTimeout], [oneWay]) -> status, response