Autostart / Stop Kanata on macOS using Hammerspoon + menu tray icon #1819
plasmadice
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm loving Kanata and using it primarily on macOS using this install method (using the Karabiner desktop app). My biggest issue was that I needed to restart Kanata every time I plugged in a new input device. Attempts to automate restarting the service were falling flat. After messing with Hammerspoon, I was able to come up with an overly-complex solution.
Hammerspoon? What's that?
Hammerspoon is an automation tool on macOS. It can be installed manually or with brew. It's configured with an
init.luafile. Spoons are packaged hammerspoon configs.brew install hammerspoon --caskOkay, but what is it?
Kanata.spoon does it all for me. Starts at boot, keeps it alive, refreshes it when new inputs are detected or when the kanata process stops, quicklinks to config files, and more.
Installing it could be easier, but after you've configure it, you only need to start Hammerspoon.
Clone Kanata.spoon to
~/.hammerspoon/Spoons.This is my
~/.hammerspoon/init.luaInstructions at https://github.com/plasmadice/Kanata.spoon. Hopefully this helps another person.
All reactions