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.

Methods

centerCursor
Signature WinWin:centerCursor()
Type Method
Description

Center the cursor on the focused window.

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, expand, shrink.
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.
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.
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.
undo
Signature WinWin:undo()
Type Method
Description

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