SkillAgentSearch skills...

Slate

A window management application (replacement for Divvy/SizeUp/ShiftIt)

Install / Use

/learn @jigish/Slate
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

About Slate

Slate is a window management application similar to Divvy and SizeUp (except better and free!). Originally written to replace them due to some limitations in how each work, it attempts to overcome them by simply being extremely configurable. As a result, it may be a bit daunting to get configured, but once it is done, the benefit is huge.

Slate currently works on Mac OS X 10.6 and above

Summary of Features

  • Highly customizable
  • Bind keystrokes to:
    • move and/or resize windows
    • directionally focus windows
    • activate preset layouts
    • create, delete, and activate snapshots of the current state of windows
  • Set default layouts for different monitor configurations which will activate when that configuration is detected.
  • Window Hints: an intuitive way to change window focus
  • [Beta] A better, more customizable, application switcher.

Credits

Big thanks to philc for the Window Hints idea (and initial implementation) as well as plenty of other suggestions and improvement ideas.

Using Slate

Installing Slate

NEW Installation Instructions

Note: You must turn on the Accessibility API by checking System Preferences > Universal Access > Enable access for assistive devices

Direct Download

Terminal

Just run this in your terminal:

cd /Applications && curl http://www.ninjamonkeysoftware.com/slate/versions/slate-latest.tar.gz | tar -xz

Configuring Slate

NEW: You may now use a ".slate.js" file to configure slate using JavaScript. This allows for much more complex and dynamic configurations than the normal slate configuration style below. You can check out the documentation for this here.

Slate is configured using a ".slate" file in the current user's home directory. Configuration is loaded upon running Slate. You can also re-load the config using the "Load Config" menu option on the status menu (use this at your own risk. It is better to simply restart Slate).

Note: If no ".slate" file exists in the current user's home directory, the default config file will be used.

Configuration is split into the following directives:

  • config (for global configurations)
  • alias (to create alias variables)
  • layout (to configure layouts)
  • default (to default certain screen configurations to layouts)
  • bind (for key bindings)
  • source (to load configs from another file)

Note: # is the comment character. Anything after a # will be ignored.

###Expressions###

Some directives allow parameters that can be expressions. The following strings will be replaced with the appropriate values when using expressions:

screenOriginX = target screen's top left x coordinate (should not be used in Window Hints configs)
screenOriginY = target screen's top left y coordinate (should not be used in Window Hints configs)
screenSizeX = target screen's width
screenSizeY = target screen's height
windowTopLeftX = window's current top left x coordinate (should not be used in Window Hints configs)
windowTopLeftY = window's current top left y coordinate (should not be used in Window Hints configs)
windowSizeX = window's width
windowSizeY = window's height
newWindowSizeX = window's new width (after resize, only usable in topLeftX and topLeftY, should not be
                 used in configs)
newWindowSizeY = window's new height (after resize, only usable in topLeftX and topLeftY, should not be
                 used in configs)
windowHintsWidth = the value of the windowHintsWidth config (only usable in windowHintsTopLeftX and
                   windowHintsTopLeftY)
windowHintsHeight = the value of the windowHintsHeight config (only usable in windowHintsTopLeftX and
                    windowHintsTopLeftY)

In addition to the variables above, expressions can be used with the following functions and operators:

+          e.g. 1+1 = 2
-          e.g. 1-1 = 0
*          e.g. 2*2 = 4
/          e.g. 4/2 = 2
**         e.g. 3**2 = 9
sum        e.g. sum({1,2,3}) = 6
count      e.g. count({4,5,6}) = 3
min        e.g. min({1,3,5}) = 1
max        e.g. max({1,3,5}) = 5
average    e.g. average({1,2,3,4}) = 2.5
median     e.g. median({1,2,3,10,15}) = 3
stddev     e.g. stddev({1,2,3,4,5}) = 1.4142135623730951
sqrt       e.g. sqrt(9) = 3.0
log        e.g. log(100) = 2.0
ln         e.g. ln(8) = 2.0794415416798357
exp        e.g. exp(2) = 7.3890560989306504 (this is "e**parameter")
floor      e.g. floor(1.9) = 1.0
ceiling    e.g. ceiling(1.1) = 2.0
abs        e.g. abs(-1) = 1
trunc      e.g. trunc(1.1123123123) = 1.0
random     e.g. random() = 0.20607629744336009 (random float between 0 and 1)
randomn    e.g. randomn(10) = 4 (random integer between 0 and parameter-1)

Note: When using expressions spaces are not allowed!

The config Directive

The config directive follows the following format:

config name value

List of allowed configs

Example:

config defaultToCurrentScreen true

Note: the .slate file is read top-down directives that come before config directives may not have the config applied. As such, it is best to put config directives at the top of your .slate file.

The alias Directive

The alias directive follows the following format:

alias name value

When you set an alias, you can refer to it in any directive (sequentially after that alias directive) by referencing like ${name}.

Example:

alias bot-right-2nd-mon move screenOriginX+2*screenSizeX/3;screenOriginY+screenSizeY/2 screenSizeX/3;screenSizeY/2 1

Will allow you to use ${bot-right-2nd-mon} as a reference to move screenOriginX+2*screenSizeX/3;screenOriginY+screenSizeY/2 screenSizeX/3;screenSizeY/2 1 in any directive following the alias (including other alias directives)

The layout Directive

The layout directive follows the following format:

layout name 'app name':OPTIONS operations

Where:

name = the name you want to use to reference the layout
'app name' = single-quoted name of the application to add to the layout **or** BEFORE or AFTER
OPTIONS = a comma separated list of options for this application (cannot be used with BEFORE or AFTER)
operations = a pipe separated list of operations (move, resize, push, nudge, throw, or corner)

Possible Options:

| Name | Function | |:-----|:---------| | IGNORE_FAIL | This will let slate move to the next operation if the current operation fails to resize/move on the current window | | REPEAT | This will repeat the list of operations if the number of windows is larger than the number of operations | | REPEAT_LAST | This will repeat the last operation in the list if the number of windows is larger than the number of operations | | MAIN_FIRST | This will cause the main window to always use the first operation | | MAIN_LAST | This will cause the main window to always use the last operation (mutally exclusive with MAIN_FIRST) | | SORT_TITLE | This will cause the window operations to be triggered on the windows in sorted order by the window title (can be used with MAIN_FIRST or MAIN_LAST) | | TITLE_ORDER=order | This will cause the operations to be triggered on the windows starting with order which is a semi-colon separated list of window titles | | TITLE_ORDER_REGEX=order | This will cause the operations to be triggered on the windows starting with the order which is a semi-colon separated list of window title regexes to match. Note that once a match is seen, the next regex will be used to match. This means if you have two windows that match the same regex, only the first one seen will be matched. The second will not. |

You can have multiple layout directives that point to the same name in order to link any number of applications to the same layout.

Example:

layout myLayout 'iTerm' push up bar-resize:screenSizeY/2 | push down bar-resize:screenSizeY/2
layout myLayout 'Google Chrome' push left bar-resize:screenSizeX/2 | push right bar-resize:screenSizeX/2
layout myLayout BEFORE shell path:~/ '/opt/local/bin/mvim before'
layout myLayout AFTER shell path:~/ '/opt/local/bin/mvim after'

Will create a layout called myLayout with two operations for iTerm and two operations for Google Chrome. When activated, the first window of iTerm will be moved using the first operation in the first list and the second window of iTerm will be moved using the second operation in the first list. In addition, the first window of Google Chrome will be moved using the first operation in the second list and the second window of Google Chrome will be moved using the second operation in the second list. Finally, the operation shell path:~/ '/opt/local/bin/mvim before' will be run before any Applications are moved and the operation shell path:~/ '/opt/local/bin/mvim after' will be run after any Applications are moved. BEFORE and AFTER may also be used if the layout doesn't have any applications tied to it. Also, you may specify multiple BEFORE or AFTER lines (they will be run in the order that they appear). More information on how to actually use these layouts can be found under the layout operation in the bind directive section.

The default Directive

The default directive follows the following format (tokens may be separated by any number of spaces):

default layout-or-snapshot-name screen-configuration

Where:

layout-or-snapshot-name = the name of the layout or snapshot you want to default to
screen-configuration =
View on GitHub
GitHub Stars7.8k
CategoryDevelopment
Updated5d ago
Forks509

Languages

Objective-C

Security Score

95/100

Audited on Mar 22, 2026

No findings