
Gets the defined grid size for a given screen or screen resolution Hs.grid.getGrid(screen) -> hs.geometry size
the hs.geometry rect for a cell on a particular screen or nil if the screen isn't found. screen - an hs.screen object or argument to hs.screen.find() where the cell is located. an hs.geometry rect or argument to construct one
Gets the hs.geometry rect for a cell on a particular screen Hs.grid.getCell(cell, screen) -> hs.geometry
an hs.geometry rect), or nil if an error occurred
window - an hs.window object to act on if omitted, the focused or frontmost window will be used. The function should modify it as needed and return nothing fn - a function that accepts a cell object as its only argument. Hs.grid.adjustWindow(fn, window) -> hs.gridĬalls a user specified function to adjust a window's cell Then set HINTS variable to a table that has same dimensions as your grid.įollowing is an example of grid that has 16 columnsĪllows customization of the modal resizing grid user interface If you have a grid of higher dimensions and require an interactive gird that accurately models underlying grid If you use API methods like hs.grid.pushWindowDown(), you will not face this This is done to make sure interactive grid cells do not run out of hints. Then Hammerspoon merges few cells such that interactive grid dimensions do not exceed HINTS dimensions. When displaying interactive grid, if gird dimensions ( hs.tGrid()) are greater than HINTS dimensions, hs.inspect(hs.grid.HINTS) from the console will show you how the table is built. Functions - API calls offered directly by the extensionĪPI Documentation Variables HINTS SignatureĪ bidimensional array (table of tables of strings) holding the keyboard hints (as per hs.keycodes.map) to be used for the interactive resizing interface. In this case, the grid will highlight the selected cells.Īfter highlighting enough cells, press enter to move/resize the window to the highlighted area. Once you selected a cell, you can use the arrow keys to navigate through the grid. You can also use the arrow keys to move the window onto adjacent screens, and the tab/shift-tab keys to cycle to the next/previous window. The selected cell will become the new upper-left of the window. To resize/move the window, you can select the corner cells of the desired position.įor a move-only, you can select a cell and confirm with 'return'. The grid will be overlaid on the focused or frontmost window's screen with keyboard hints. a cell '2,0 1x1' will be in the upper-right cornerĪdditionally, a modal keyboard driven interface for interactive resizing is provided via hs.grid.show(). a cell '0,0 1x1' will be in the upper-left corner. h - The number of rows the window occupies. w - The number of columns the window occupies.
y - The row of the top edge of the window.x - The column of the left edge of the window.Each cell is an hs.geometry rect with these fields:
Windows grid wont go away windows#
Windows that are aligned with the grid have their location and size described as a cell. You can specify different grid layouts for different screens and/or screen resolutions. The default layout of the grid is 3 columns by 3 rows. You can also use the Escape key to hide the grid quickly.The grid partitions your screens for the purposes of window management. On Windows, you can use the shortcut Shift + Control + I to remove the perspective grid. On Mac, you can use the shortcut Shift + Command + I to hide the perspective grid from your project. To add the perspective grid to your page, use the shortcut Shift + P.
If you want to hide the perspective grid quickly, you can use the following shortcuts. To remove the perspective grid from your project, click on View > Perspective Grid > Hide Grid.Īnother way to hide the grid is by locating the small Plane Switching Widget icon that appears next to the Toolbar when the grid is active.Ĭlick on the small X icon to hide the grid.
Use the same process to turn the Grid back on. Shortcut to Remove the Perspective Grid.