Repository navigation
Hammerspoon 2 1.0.0 Beta 4
Pre-release
Pre-release
Added
hs.windowfilter, a replacement for v1'shs.window.filter: rule-based window filters with events for windows being created, focused, moved, minimized, and joining or leaving the filter (#470)hs.distributednotifications, for listening to and posting macOS distributed notifications (e.g. Music'scom.apple.Music.playerInfo) (#479)hs.canvas.animate(), which animates changes to canvas elements and windows with linear, ease-in, ease-out, ease-in-out or custom bezier curves (#477)HSChooser.windowID, the window ID of a shown chooser, for use withhs.window(#459)HSChooser.frame, to read where a chooser is (or will be) on screen, and to move or resize it (#459)hs.task.runAsync()andhs.task.shell()take aninputoption, a string written to the command's standard input, andTaskBuilderhaswithInput()(#461)hs.checkForUpdates(), which checks for a new version of Hammerspoon 2 even when it's hidden from both the Dock and the menu bar (#466)hs.spoons.updateAll(), which updates every installed Spoon, logging its progress to the Console and resolving with each Spoon's status (#467)hs.spoons.isUpdating, which is true whilehs.spoons.update()orhs.spoons.updateAll()is running (#467)hs.window.frontmostWindow(), which returns the focused window, or the first ordered window if nothing has focus (#469)HSWindow.roleandHSWindow.subrole(#470)HSWindow.windowsToEast()/West/North/South()andfocusWindowEast()/West/North/South(), to find and focus the nearest window in a direction (#470)- Edit > Find… (⌘F) focuses the Console's search field (#473)
HSImage.toDataURL()andHSImage.toUint8Array(), which return an image's encoded bytes as a base64data:URL or aUint8Arraywithout writing to disk (#478)hs.windowfilter.inaccessibleApplications()and theinaccessibleApplicationevent, for applications that have turned the Accessibility API off (e.g. some kiosk setups), whose windows no filter can see (#480)
Changed
- The API docs and TypeScript definitions now document each field of options objects and returned objects, such as
hs.mqtt.create()'s options andhs.consoleHistory()'s messages (#460) hs.spoons.updateAll()downloads each source once, however many Spoons were installed from it (#468)hs.osascriptscripts that try to show UI (e.g.display dialog) now fail straight away with "No user interaction allowed." instead of hanging forever (#482)
Fixed
- Setting
HSChooser.widthafter a chooser has been shown now resizes it (#459) - The API docs for
hs.spoons.use()no longer render as a broken page (#460) - Parameter and return value descriptions in the API docs and TypeScript definitions are no longer cut off after their first line (#460)
hs.task.runAsync()andhs.task.shell()no longer hang forever when the command reads standard input; standard input is closed once anyinputhas been written (#461)- Writing to a task's standard input after it has exited no longer crashes Hammerspoon, and
sendInput()no longer blocks Hammerspoon while a large input is being read (#461) - Passing
nullfor an optional callback (e.g.hs.task.create()'sonOutput) no longer logs "Unable to create JSCallback" (#465) hs.window.focusedWindow()andisFocusednow detect windows that take focus without activating their app, such as Spotlight (#469)- Installing several Spoons from the same repository at once (e.g. several
hs.spoons.use()calls on first run) now downloads the repository once, not once per Spoon (#468) - The Console now always comes to the front when opened from the menu bar or
hs.openConsole(), instead of sometimes appearing behind other apps (#473) HSImage.saveToFile()now writes atomically, so other processes never read a partially written image (#476)hs.ipc.start()no longer fails silently when macOS can't start the IPC broker; it re-registers the broker, and logs an error if that doesn't help (#475)- Hotkeys,
hs.keycodes.mapandhs.keycodes.on('change')follow a keyboard layout change right away, even while Hammerspoon 2 is in the background (#474) - hs.windowfilter no longer asks an application that has turned the Accessibility API off again every time it's activated (#480)
- HammerspoonOSAScriptHelper no longer shows as "Not Responding" in Activity Monitor (#482)
Full Changelog: 1.0.0-beta.3...1.0.0-beta.4