

value - The number of seconds for the new timeout value.Sets the timeout value used in the accessibility API. Because the window ID cannot always be dynamically determined, this function will allow you to provide the ID of a window that was cached earlier.hs.image object of the window snapshot or nil if unable to create a snapshot.
#HAMMERSPOON PROGRAM SERIES OF KEYSTROKES WINDOWS#
#HAMMERSPOON PROGRAM SERIES OF KEYSTROKES FULL#
things that are on different Spaces, or things that are Full Screen Some windows will not be reported by OSX - e.g.The default windowfilter ( hs.) which filters out known cases of not-actual-windows In order to avoid such surprises you can use the hs.window.filter module, and more specifically Status bar therefore you might get unexpected results - in the Chrome example, calling hs.window.focusWindowSouth()įrom a Chrome window would end up "focusing" its status bar, and therefore the proper window itself, seemingly resulting "windows" that one wouldn't expect: for example, every Google Chrome (actual) window has a companion window for its Beside the limitations discussed above, this function will return all windows as reported by OSX, including some.Hs.application.get'Finder':allWindows() will include the desktop in the returned list) This function filters out the desktop "window" use hs.sktop() to address it.

minimized windows and hidden windows (i.e.if Displays have separate Spaces is on (in System Preferences>Mission Control) the current Space is definedĪs the union of all currently visible Spaces.This function can only return windows in the current Mission Control Space if you need to address windows acrossĭifferent Spaces you can use the hs.window.filter module.Performance is not acceptable consider using the hs.window.filter module This function queries all applications for their windows every time it is invoked if you need to call it a lot and.Modules make use of this function, so it is important to understand its limitations


Using hs.window:setFrame() in some cases does not work as expected: namely, the bottom (or Dock) edge, and edges between screens, might Initial value is 0.2 set to 0 to disable animations. The default duration for animations, in seconds. Methods - API calls which can only be made on an object returned by a constructorĪPI Documentation Variables animationDuration Signature.Constructors - API calls which return an object, typically one that offers API methods.Functions - API calls offered directly by the extension.See hs.screen and hs.geometry for more information on how Hammerspoon uses window/screen frames and coordinates.Hammerspoon docs: hs.window docs » hs.window
