docs » WinWin

Windows manipulation

Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/WinWin.spoon.zip

API Overview

API Documentation

Variables

gridparts
Signature WinWin.gridparts
Type Variable
Description

An integer specifying how many gridparts the screen should be divided into. Defaults to 30.

Source Source/WinWin.spoon/init.lua line 20

Methods

centerCursor
Signature WinWin:centerCursor()
Type Method
Description

Center the cursor on the focused window.

Parameters
  • None
Returns
Source Source/WinWin.spoon/init.lua line 190
moveAndResize
Signature WinWin:moveAndResize(option)
Type Method
Description

Move and resize the focused window.

Parameters
  • option - A string specifying the option, valid strings are: halfleft, halfright, halfup, halfdown, cornerNW, cornerSW, cornerNE, cornerSE, center, fullscreen, maximize, minimize, expand, shrink.
Returns
Source Source/WinWin.spoon/init.lua line 85
moveToScreen
Signature WinWin:moveToScreen(direction)
Type Method
Description

Move the focused window between all of the screens in the direction.

Parameters
  • direction - A string specifying the direction, valid strings are: left, right, up, down, next.
Returns
Source Source/WinWin.spoon/init.lua line 145
stepMove
Signature WinWin:stepMove(direction)
Type Method
Description

Move the focused window in the direction by on step. The step scale equals to the width/height of one gridpart.

Parameters
  • direction - A string specifying the direction, valid strings are: left, right, up, down.
Returns
Source Source/WinWin.spoon/init.lua line 25
stepResize
Signature WinWin:stepResize(direction)
Type Method
Description

Resize the focused window in the direction by on step.

Parameters
  • direction - A string specifying the direction, valid strings are: left, right, up, down.
Returns
Source Source/WinWin.spoon/init.lua line 55
undo
Signature WinWin:undo()
Type Method
Description

Undo the last window manipulation. Only those "moveAndResize" manipulations can be undone.

Parameters
  • None
Returns
Source Source/WinWin.spoon/init.lua line 173