thisissilikon.blogg.se

Hammerspoon keystroke example
Hammerspoon keystroke example




hammerspoon keystroke example

With Hammerspoon, I was able to do the following:ġ.

HAMMERSPOON KEYSTROKE EXAMPLE PLUS

Plus JIRA has this annoying tendency to use some other URL when showing some issue, and it is easier to just type out the identifier in those cases. Of course, one could always copy paste the issue link instead of just the identifier, but the latter often looks cleaner. if you have PROJ-1234 as the ticket, JIRA will link to it), other applications are not. While JIRA is smart enough to do this within itself (i.e. We used JIRA at Dropbox, and I always preferred to have JIRA issue identifiers actually be links to the issue when possible. This uses the Hammerspoon CLI hs to call the function when the alias is run. Trigger alias nag_screen='hs -A -c "nagScreen()"' Then it subscribes to OS events around which window is focused, and when any Terminal.app window is focused, it stops the flashing. The nagScreen() function starts flashing (inverting colors every 1 second) the screen as soon as it is called. TermWindow:subscribe(wf.windowFocused, function() Local timer = hs.timer.doEvery(1, function() 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.

hammerspoon keystroke example

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. Hammerspoon is a macOS automation framework that allows you to hook into all sort of OS interfaces using Lua scripts.






Hammerspoon keystroke example