![]() This uses the Hammerspoon CLI hs to call the function when the alias is run. ImportsĪlias nag_screen = 'hs -A -c "nagScreen()"' Here is how we hook this up in the Hammerspoon a. It is triggered by some shell aliases that I append to the end of the command.įor example, I can run: bazel build //something nag_screenĪnd my screen will start flashing once the build ends (regardless of success/failure), until I switch to the terminal. My solution is to use Hammerspoon to invert the entire display’s colors and keep “flashing” the display until I switch back to the terminal window. ![]() I’ve found that my brain is not great at noticing desktop notifications, since they tend to be in the top-right corner of a large display. There is a danger of getting distracted and continuing to read even when the tests are done. The usual way I respond is to continue reading the next article on my reading list. ![]() I often run build steps or unit tests that are slow enough that I can’t just twiddle my thumbs at the terminal, but fast enough that I can’t get into another cognitive task. There are some crazier applications like using voice to control scroll bars! I’m going to describe some ways I use it that are uncommon. People use it for all sorts of automations, with key remappings and quick window switchers being the most common applications. Regardless of its small size and simple looks, proved itself to be a powerful OS X automation toolĭon’t worry about the lack of feedback, because once the entry is clicked you should be able, from that moment on, to use the newly added automation capabilities.Īll in all, Hammerspoon is a useful and must-have automation tool for anyone who is willing to do a small amount of manual configuration for gaining a productivity boost by focusing on app interaction using the keyboard as much as possible.Hammerspoon is a macOS automation framework that allows you to hook into all sort of OS interfaces using Lua scripts. Once a Lua script is loaded in the a config file, you must click Save, go to Hammerspoon’s drop down menu from the status bar, and click the Reload Config entry. You may not be familiar with the Lua programming language and, for this reason, the development team behind Hammerspoon provides you with an API documentation page that lists the entire collection of documented modules which you may use to create your automation scripts. Take advantage of its list of documented modules and automate most OS X apps effortlessly To enable Hammerspoon to do its magic you must add your scripts to the ~/.hammerspoon/a (where “~” is your system home folder) configuration file. Without your help Hammerspoon will do nothing except have its item present in the OS X status bar. In order to take advantage of Hammerspoon’s features, you must first drag its icon to the /Applications folder, run the app, and, from its Preferences menu, add it to the system accessibility list. Hammerspoon provides you with a fast and easy way to interact with windows, mouse pointers, filesystem objects, batteries, screens, keyboards, and clipboards, as well as location services, Wi-Fi, and other devices. Comes with a simple drag and drop installation process, but requires you to read some of its documentation in order to get the most out of it In a nutshell, Hammerspoon bridges system APIs to a simple Lua scripting engine, which means that it enables you to write Lua scripts for automatically performing various automated tasks. Hammerspoon is a straightforward and powerful macOS automation tool that provides you with a suitable environment for writing Lua code scripts for setting up automated actions that can be triggered using global hot-key combinations.
0 Comments
Leave a Reply. |