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

Methods

centerCursor
Signature WinWin:centerCursor()
Type Method
Description

Center the cursor on the focused window.

Parameters:

  • None
Source Source/WinWin.spoon/init.lua
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.
Source Source/WinWin.spoon/init.lua
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.
Source Source/WinWin.spoon/init.lua
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.
Source Source/WinWin.spoon/init.lua
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.
Source Source/WinWin.spoon/init.lua
undo
Signature WinWin:undo()
Type Method
Description

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

Parameters:

  • None
Source Source/WinWin.spoon/init.lua