![]() It seems I can't quite do the other way around. Here is an example of how the repl > on does it in that case the repl runs in a coroutine > which gets resumed when the enter button is pressed in the input > element, but depending on how your IPC API looks it could be simpler. ![]() Thanks! > Sure you can start a repl that has the read/write functions overridden > to use another function other than io.read and io.write for instance, > something that communicates over IPC. I doubt that > anyone has ever tried that before, any hints how I can build something > like this would be appreciated. I'm thinking if it would be possible to have a Fennel REPL that > compiles and evals by sending forms to Hammerspoon's IPC. > Ag Ibragimov writes: > Hi, I just rewrote my entire Hammerspoon configuration using Fennel > and I can't be happier. Sorry for being stupid here, but using a Lisp and not being able to use a REPL is a downer. Hammerspoon has some API to talk to its own IPC, but I have no idea how to get all these to work together:įennel.repl module, Emacs's `run-lisp` and Hammerspoon's IPC. So essentially I have to call ~fennel.repl~ function from Hammerspoon context, but what does that do? Does it try to connect to existing fennel REPL instance? Does it create a new one? How do I connect to that "specialized" REPL instance (that is capable to send messages to Hammerspoon's IPC) from Emacs, from fennel-mode? How do I type things in the REPL buffer and expect it to be handled by Hammerspoon? I can't do ~fennel -repl~ and hope to be able to use Hammerspoon's modules to try things. Not sure what the second line does, but from that point I can just use modules written in Fennel, and Hammerspoon will be happy to use them. Table.insert(package.loaders or archers, archer) I use Fennel from Hammerspoon, meaning I bootstrap Fennel via Hammerspoon, i.e. Can you please describe how this suppose to work. I've been swamped with work, but I think I'm ready to finally solve this puzzle. However, I'm aware Hammerspoon is likely to be light on resources due to the Lua codebase, and I'm trying to mirror my AutoHotkey progress in Hammerspoon.Hey, sorry guys, it's been long time. I'm happy to run Karabiner Elements and Hammerspoon to implement a Hyper key and some window management functions, but it seems like a lot of overhead if I'm also running Alfred, and even more overhead if I throw KM into the mix on occasion. Thinking more generally about Hammerspoon and automation apps on MacOS, I'm not sure what I should accomplish with Hammerspoon, versus Alfred, Keyboard Maestro, built-in functions, or some other third-party app. Now I'm hoping I can figure out how to limit to only run when one of two designated applications are open (Safari or Edge browsers): Here's what I landed on for that browser function. lua implementation on GitHub, but it's flaky, and I run Alfred all the time anyway. However, for now, I think I'll use Alfred for more complicated Snippets. My favorite of those is expanding to my email address. I do utilize the built-in solution for a few simple snippets. Browser, Current Browser Window, Navigate to Even pointing me to the correct documentation for this type of macro would be helpful. It's also possible I'm fundamentally misunderstanding the point of Hammerspoon. The second task is a macro like the following, which would use a keystroke to automatically place my cursor in the address bar of my active browser window, paste or type a URL, and input the Enter key to navigate to that URL.Ĭan someone help me add this functionality to my a file for Hammerspoon? I've got the following in place so far, but it spits out an error, and I can't tell if I'm remotely on the right track. In AutoHotKey parlance, text expansion would look like this, using "Hotstrings": ::btw::by the way Some hotkeys that simulate a keypress and then input a string of text (similar to text expansion, but following a more elaborate macro). ![]() That being said, I've used those two other tools enough to think Hammerspoon might be able to replace them both if I can learn the basics.įor now, my goal is to add the following to my a script: I'm a rank novice when it comes to coding and development, so I really don't know anything about using Lua, or any other coding language with the exception of very basic AutoHotKey scripting. I came across Hammerspoon as an alternative to Keyboard Maestro on Mac and AutoHotKey scripting on Windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |