Back to Blog
Hammerspoon window6/7/2023 ![]() 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. 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. ![]() This function should be bound to a hotkey, e.g.: hs.hotkey.bind('ctrl-cmd','\','Isolate',hs.)Įxtensions/window/window_highlight.Hammerspoon is a macOS automation framework that allows you to hook into all sort of OS interfaces using Lua scripts.clear it if it's currently enforced, or set it to the opposite of the current isolate mode status otherwise. start() would otherwise enable it if omitted or nil, toggle the override, i.e. v - (optional) a boolean if true, enable isolate mode if false, disable isolate mode, even when windowfilterIsolate passed to.Sets or clears the user override for "isolate" mode. Stops the module and disables focused window highlighting (both "overlay" and "isolate" mode)Įxtensions/window/window_a line 275 overlay mode is disabled by default - see hs.overla圜olorĮxtensions/window/window_a line 225.windowfilterOverlay - (optional) an hs.window.filter instance that determines which windows to consider for "overlay" mode when focused if omitted or nil, the default windowfilter will be used.windowfilterIsolate - (optional) an hs.window.filter instance that automatically enable "isolate" mode whenever one of the allowed windows is focused alternatively, you can just provide a list of application names and a windowfilter will be created for you that enables isolate mode whenever one of these apps is focused if omitted or nil, isolate mode won't be toggled automatically, but you can still toggle it manually via hs.().Functions - API calls offered directly by the extensionĪllows customization of the highlight overlays and behaviour.Įxtensions/window/window_a line 34.Or automatically by passing an appropriate windowfilter (or a list of apps) to hs.(). Isolate mode is always available and can be toggled manually via hs.() The window shown/hidden flashes - enable those with hs.flashDuration=0.3 (or whatever duration Or hidden via a brief flash, to help determine their location intuitively (to avoid having to studiously scanĪll your screens when, for example, you know you triggered a dialog but it didn't show up where you expected it).īy default, overlay mode is disabled - you can enable it with hs.overlay=true - and so are ![]() ("overlay" mode) or opaque ("isolate" mode) overlay additionally it can highlight windows as they're shown It highlights the currently focused window by covering other windows and the desktop with either a subtle Therefore likely to have several windows visible at any given time. This module can be useful to spatially keep track of windows if you have large and/or multiple screens, and are Hammerspoon docs: hs.window.highlight docs » hs.window.highlight
0 Comments
Read More
Leave a Reply. |