![]() * two integers indicating the screen position in the current screen arrangement, in the x and y axis respectively. ![]() Return a given screen's position relative to the primary screen - see 'hs.screen.screenPositions()' hs.screen'0,0' -> PHL BDM4065 - by position, same as hs.screen.primaryScreen() hs.screen'Built%-in' -> Built-in Retina Display, note the % to escape the hyphen repetition character hs.screen'Dell' -> DELL U2414M - by name * for convenience you call this as `hs.screen(hint)` * one or more hs.screen objects that match the supplied search criterion, or `nil` if none found containing the largest part of the rect will be returned * an hs.geometry *rect* object, or constructor argument, with an arbitrary rect in absolute coordinates the screen * an hs.geometry *size* object, or constructor argument, with the *resolution* of the screen as per `hs.screen:fullFrame()` * an hs.geometry *point* object, or constructor argument, with the *x and y position* of the screen in the current layout as per `hs.screen:position()` * a string pattern that matches (via `string.match`) the screen name as per `hs.screen:name()` (for convenience, the matching will be done on lowercased strings) * a string containing the UUID of the desired screen * hint - search criterion for the desired screen(s) it can be: hs.screen.find(hint) -> hs.screen object(s) Local getmetatable,pcall =getmetatable,pcall Local tinsert,tremove,tsort,tunpack =table. Local type,pairs,ipairs,cos,huge =type,pairs,ipairs,math. printf( "- unable to load DisplayServices framework may impact brightness control: %s ", msg) "/System/Library/PrivateFrameworks/amework/Versions/Current/DisplayServices ", try to load private framework for brightness controls (Screens to the left of the primary screen, or above it, and windows on these screens, will have negative coordinates) The origin `0,0` is at the top left corner of the *primary screen*. System Preferences->Displays->Arrangement). The macOS coordinate system used by Hammerspoon assumes a grid that spans all the screens (positioned as per
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |