Repository navigation
Hammerspoon 2 1.0.0 Beta 6
Pre-release
Pre-release
Added
hs.permissions.checkEventPosting()andhs.permissions.requestEventPosting(), for the permission macOS requires beforehs.eventtapcan send keystrokes and clicks (#556)task.blockUntilExit(timeout), which blocks until a task exits, giving up aftertimeoutseconds if one is given (#539)prefersAssistiveTechnologySettingsforhs.speechspeakers andspeak()options, to speak with VoiceOver's voice and settings when it is running (#558)- Named TypeScript types for watcher event names, such as
HSPowerEventandHSWindowFilterEvent, for use in your own types (e.g.Record<HSPowerEvent, () => void>) (#562) - The API docs for each
on(),off()andonce()list the event names it takes, and when each is emitted (#562) hs.applicationdidChangeActivationPolicyevent, sent when an app'skindchanges (#569)hs.hashing.digest()andhs.hashing.hmac(), which return the raw hash as aUint8Array(#578)hs.hashing.base32Encode()andhs.hashing.base32Decode()(RFC 4648; decoding ignores case, spaces,-and padding) (#578)hs.window.animationDuration(default0.2seconds), so window frame changes are animated as in Hammerspoon 1; set it to0to turn animation off (#580)- An optional
durationargument towin.moveAndResize()(#580)
Changed
hs.eventtapnow logs a warning in the Console when macOS won't let Hammerspoon 2 send keystrokes or clicks, instead of failing silently (#556)- The Console's log re-wraps while the window is being resized, and stays scrolled to the bottom (or keeps its place) as it does (#549)
task.waitUntilExit(timeout)now returns a Promise that resolves once the task has exited (or tofalseaftertimeoutseconds), instead of blocking; usetask.blockUntilExit()to block (#539)- The API docs no longer list the internal
typeNameproperty on types (#559) hs.speech.announce()returns a Promise that resolves to whether VoiceOver accepted the announcement, and no longer takes aninterruptargumenths.applicationevents now cover apps with no Dock icon, includingdidLaunchanddidTerminate(#569)hs.hashing's hash, HMAC andbase64Encodefunctions accept raw bytes (Uint8Array,ArrayBufferor an array of numbers) as well as strings, and throw for anything else instead of hashing it as a string (#578)
Fixed
- The Settings window now fits each tab, so every row of the Permissions tab can be seen (#544)
- Passing
nullorundefinedas the element tohs.ax.on(),hs.ax.once(),hs.ax.off(),hs.ax.findByRole(),hs.ax.findByTitle()orisEqualToElement()crashed Hammerspoon; most of these now throw an error instead (off()logs one, andisEqualToElement()returnsfalse) (#555) - The Console no longer uses tens of megabytes of memory (kept after it's closed), or lots of CPU while messages are being logged (#549)
hs.speech.announce()is now spoken by VoiceOver while another app is in front. It needs "Allow VoiceOver to be controlled with AppleScript" turned on in VoiceOver Utilityhs.windowobjects no longer report a missing title (and other stale values) for apps like Zoom that replace a window's accessibility elemenths.windowfilterno longer loses track of a window when its app replaces the window's accessibility element, as Zoom does when a meeting starts- GNU Emacs windows are now found by
hs.window,hs.applicationandhs.windowfilteron macOS 27 (#565) hs.windowfiltertracks the windows of apps with no Dock icon (such as Siri) that start after Hammerspoon 2 (#569)hs.window.allWindows()and related functions no longer stall on, or fill the Console with errors about, background helper processes that have no windows (#575)hs.fs.createPathWatcher()callbacks now include the"ownEvent"flag for changes made by Hammerspoon itself (#579)- Setting the frame of a window that can't be resized now moves it, instead of failing (#580)
- The TypeScript declaration for
hs.ui.window'slevel()now accepts plain level names like"floating"
Full Changelog: 1.0.0-beta.5...1.0.0-beta.6