{"id":13512065,"url":"https://github.com/jigish/slate","last_synced_at":"2025-05-14T07:11:03.286Z","repository":{"id":1523494,"uuid":"1787090","full_name":"jigish/slate","owner":"jigish","description":"A window management application (replacement for Divvy/SizeUp/ShiftIt)","archived":false,"fork":false,"pushed_at":"2022-06-23T09:17:42.000Z","size":48772,"stargazers_count":7850,"open_issues_count":264,"forks_count":509,"subscribers_count":157,"default_branch":"master","last_synced_at":"2025-04-11T02:51:45.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"CyanogenMod/android","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jigish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-05-23T08:56:15.000Z","updated_at":"2025-04-09T16:14:13.000Z","dependencies_parsed_at":"2022-08-16T13:35:19.284Z","dependency_job_id":null,"html_url":"https://github.com/jigish/slate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jigish%2Fslate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jigish%2Fslate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jigish%2Fslate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jigish%2Fslate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jigish","download_url":"https://codeload.github.com/jigish/slate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092798,"owners_count":22013292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T03:01:27.734Z","updated_at":"2025-05-14T07:10:58.272Z","avatar_url":"https://github.com/jigish.png","language":"Objective-C","funding_links":[],"categories":["Objective-C","others","Applications","其它实用工具","Objective-C  Stars 1000以内排名整理","其他","Uncategorized","Utilities"],"sub_categories":["Window Management","窗口管理","网络服务_其他","Uncategorized","🪟 Window Management (11)","Productivity"],"readme":"# About Slate #\n\nSlate 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.\n\nSlate currently works on Mac OS X 10.6 and above\n\n## Summary of Features ##\n\n* Highly customizable\n* Bind keystrokes to:\n  * move and/or resize windows\n  * directionally focus windows\n  * activate preset layouts\n  * create, delete, and activate snapshots of the current state of windows\n* Set default layouts for different monitor configurations which will activate when that configuration is detected.\n* Window Hints: an intuitive way to change window focus\n* \\[Beta\\] A better, more customizable, application switcher.\n\n## Credits ##\n\nBig thanks to [philc](https://github.com/philc) for the Window Hints idea (and initial implementation) as well as plenty of other suggestions and improvement ideas.\n\n# Using Slate #\n\n## Installing Slate ##\n\n**NEW Installation Instructions**\n\n**Note:** You must turn on the Accessibility API by checking System Preferences \u003e Universal Access \u003e Enable access for assistive devices\n\n### Direct Download ###\n\n* [`.dmg`](http://slate.ninjamonkeysoftware.com/Slate.dmg)\n* [`.tar.gz`](http://slate.ninjamonkeysoftware.com/versions/slate-latest.tar.gz)\n\n### Terminal ###\n\nJust run this in your terminal:\n\n    cd /Applications \u0026\u0026 curl http://www.ninjamonkeysoftware.com/slate/versions/slate-latest.tar.gz | tar -xz\n\n## Configuring Slate ##\n\n**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](https://github.com/jigish/slate/wiki/JavaScript-Configs).\n\nSlate 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).\n\n**Note:** If no \".slate\" file exists in the current user's home directory, the [default config file](https://github.com/jigish/slate/blob/master/Slate/default.slate) will be used.\n\nConfiguration is split into the following directives:\n\n* `config` (for global configurations)\n* `alias` (to create alias variables)\n* `layout` (to configure layouts)\n* `default` (to default certain screen configurations to layouts)\n* `bind` (for key bindings)\n* `source` (to load configs from another file)\n\n**Note:** `#` is the comment character. Anything after a `#` will be ignored.\n\n###Expressions###\n\nSome directives allow parameters that can be expressions. The following strings will be replaced with the appropriate values when using expressions:\n\n    screenOriginX = target screen's top left x coordinate (should not be used in Window Hints configs)\n    screenOriginY = target screen's top left y coordinate (should not be used in Window Hints configs)\n    screenSizeX = target screen's width\n    screenSizeY = target screen's height\n    windowTopLeftX = window's current top left x coordinate (should not be used in Window Hints configs)\n    windowTopLeftY = window's current top left y coordinate (should not be used in Window Hints configs)\n    windowSizeX = window's width\n    windowSizeY = window's height\n    newWindowSizeX = window's new width (after resize, only usable in topLeftX and topLeftY, should not be\n                     used in configs)\n    newWindowSizeY = window's new height (after resize, only usable in topLeftX and topLeftY, should not be\n                     used in configs)\n    windowHintsWidth = the value of the windowHintsWidth config (only usable in windowHintsTopLeftX and\n                       windowHintsTopLeftY)\n    windowHintsHeight = the value of the windowHintsHeight config (only usable in windowHintsTopLeftX and\n                        windowHintsTopLeftY)\n\nIn addition to the variables above, expressions can be used with the following functions and operators:\n\n    +          e.g. 1+1 = 2\n    -          e.g. 1-1 = 0\n    *          e.g. 2*2 = 4\n    /          e.g. 4/2 = 2\n    **         e.g. 3**2 = 9\n    sum        e.g. sum({1,2,3}) = 6\n    count      e.g. count({4,5,6}) = 3\n    min        e.g. min({1,3,5}) = 1\n    max        e.g. max({1,3,5}) = 5\n    average    e.g. average({1,2,3,4}) = 2.5\n    median     e.g. median({1,2,3,10,15}) = 3\n    stddev     e.g. stddev({1,2,3,4,5}) = 1.4142135623730951\n    sqrt       e.g. sqrt(9) = 3.0\n    log        e.g. log(100) = 2.0\n    ln         e.g. ln(8) = 2.0794415416798357\n    exp        e.g. exp(2) = 7.3890560989306504 (this is \"e**parameter\")\n    floor      e.g. floor(1.9) = 1.0\n    ceiling    e.g. ceiling(1.1) = 2.0\n    abs        e.g. abs(-1) = 1\n    trunc      e.g. trunc(1.1123123123) = 1.0\n    random     e.g. random() = 0.20607629744336009 (random float between 0 and 1)\n    randomn    e.g. randomn(10) = 4 (random integer between 0 and parameter-1)\n\n**Note:** When using expressions spaces are *not* allowed!\n\n### The `config` Directive ###\n\nThe `config` directive follows the following format:\n\n    config name value\n\n[List of allowed configs](https://github.com/jigish/slate/wiki/Global-Configs)\n\nExample:\n\n    config defaultToCurrentScreen true\n\n**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.\n\n### The `alias` Directive ###\n\nThe `alias` directive follows the following format:\n\n    alias name value\n\nWhen you set an alias, you can refer to it in any directive (sequentially after that alias directive) by referencing like `${name}`.\n\nExample:\n\n    alias bot-right-2nd-mon move screenOriginX+2*screenSizeX/3;screenOriginY+screenSizeY/2 screenSizeX/3;screenSizeY/2 1\n\nWill 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)\n\n### The `layout` Directive ###\n\nThe `layout` directive follows the following format:\n\n    layout name 'app name':OPTIONS operations\n\nWhere:\n\n    name = the name you want to use to reference the layout\n    'app name' = single-quoted name of the application to add to the layout **or** BEFORE or AFTER\n    OPTIONS = a comma separated list of options for this application (cannot be used with BEFORE or AFTER)\n    operations = a pipe separated list of operations (move, resize, push, nudge, throw, or corner)\n\nPossible Options:\n\n| Name | Function |\n|:-----|:---------|\n| `IGNORE_FAIL` | This will let slate move to the next operation if the current operation fails to resize/move on the current window |\n| `REPEAT` | This will repeat the list of operations if the number of windows is larger than the number of operations |\n| `REPEAT_LAST` | This will repeat the last operation in the list if the number of windows is larger than the number of operations |\n| `MAIN_FIRST` | This will cause the main window to always use the first operation |\n| `MAIN_LAST` | This will cause the main window to always use the last operation (mutally exclusive with `MAIN_FIRST`) |\n| `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`) |\n| `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 |\n| `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. |\n\n\nYou can have multiple layout directives that point to the same name in order to link any number of applications to the same layout.\n\nExample:\n\n    layout myLayout 'iTerm' push up bar-resize:screenSizeY/2 | push down bar-resize:screenSizeY/2\n    layout myLayout 'Google Chrome' push left bar-resize:screenSizeX/2 | push right bar-resize:screenSizeX/2\n    layout myLayout BEFORE shell path:~/ '/opt/local/bin/mvim before'\n    layout myLayout AFTER shell path:~/ '/opt/local/bin/mvim after'\n\nWill 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.\n\n### The `default` Directive ###\n\nThe `default` directive follows the following format (tokens may be separated by any number of spaces):\n\n    default layout-or-snapshot-name screen-configuration\n\nWhere:\n\n    layout-or-snapshot-name = the name of the layout or snapshot you want to default to\n    screen-configuration = either \"count:NUMBER_OF_SCREENS\" or\n                                  \"resolutions:SEMICOLON_SEPARATED_LIST_OF_RESOLUTIONS\"\n\nThis directive will cause any screen configuration change (add monitor, remove monitor, screen resolution change) to trigger a search for a default layout or snapshot. If the screen configuration matches one of the defaults set, the layout or snapshot matching `layout-or-snapshot-name` will be triggered. For example:\n\n    default myLayout count:2\n\nWill trigger `myLayout` anytime the screen configuration changes to have 2 monitors. Also:\n\n    default myLayout2 resolutions:1440x900;1024x768;1680x1050\n\nWill trigger `myLayout2` anytime the screen configuration changes to have exactly 3 monitors with resolutions `1440x900`, `1024x768`, and `1680x1050`.\n\n### The `bind` Directive ###\n\nThe `bind` directive follows one of the following formats (tokens may be separated by any number of spaces):\n\n    bind key:modifiers operation parameter+\n    bind key:modal-key operation parameter+\n\n#### Key ####\n\n`key` is a reference to a key on the keyboard. See Allowed Keys for a complete list. For example: the `s` key would simply be `s` while the `1` key on the number pad would be `pad1`.\n\n#### Modifiers ####\n\n`modifiers` is a comma or semicolon separated list of standard modifier keys. Allowed modifiers are:\n\n* Control: `ctrl`\n* Option/Alt: `alt`\n* Command: `cmd`\n* Shift: `shift`\n\n**Note:** If you bind any binding to cmd-tab or cmd-shift-tab, Slate will completely disable the default Mac OS X Application switcher!\n\n**Note:** Bindings that are used by Mac OS X spaces, expose, and mission control will override Slate bindings. Be sure to turn these bindings off if you want to use them in Slate.\n\n#### Modal Key ####\n\n`modal-key` is any one of the Allowed Keys. If using a `modal-key`, pressing that key will cause the Slate menu bar icon to change indicating modal mode is activated. then clicking `key` will activate the binding. Modal mode will remain active until `key` has been pressed or `modal-key` is pressed again. You may specify multiple bindings with the same `modal-key` as long as `key` is different. Also, `modal-key` can accompany a comma or semicolon separated list of modifier keys listed above. This will cause that entire keystroke to be considered the modal activation binding. For example: `bind 1:f4,ctrl,alt` will result in the modal keystroke being `ctrl+alt+f4`. After pressing that keystroke, modal mode will be activated and pressing `1` after that will activate the binding.\n\n##### Modal Toggle Behavior #####\n\nIf you add `:toggle` to the end of a modal binding it will cause that binding to not end the modal mode. For example with the binding `1:ctrl,f4`, you press `ctrl+f4` and then press `1` to activate the binding. Once that binding is activated, modal mode will end and you have to press `ctrl+f4` again to activate it. However, with the binding `1:ctrl,f4:toggle` pressing `ctrl+f4` will toggle modal mode. pressing `1` will activate the binding but not end modal mode. To end modal mode, press `ctrl+f4` again or use the config `modalEscapeKey`.\n\n#### Operation ####\n\nOperations define what to actually do to the focused window.\n\n**Screens**\n\nSome operations allow you to specify a screen. Here are the list of possible values for screen:\n\n* Integer representing the screen ID (indexed at 0). Screens are ordered from left to right (by X coordinate of the origin which is the top-left point). If `orderScreensLeftToRight` is set to false, the screen ID is the Mac OS internal ID (indexed at 0). If `orderScreensLeftToRight` is set to false but you still want to reference screens in the default ordered mode, prefix the screen ID with `ordered:`.\n* Screen resolution in the format `WIDTHxHEIGHT` (e.g. `1440x900`)\n* Screen direction relative to the current screen (`left|right|up|above|down|below`)\n* `next` or `previous` (represents the `currentID+1` or `currentID-1` screen)\n\n**Allowed operations are:**\n\n##### move #####\nMove/Resize the window any which way: `move topLeftX;topLeftY sizeX;sizeY screen`\n\n        topLeftX = top left x coordinate of the window's desired position (can be an expression)\n        topLeftY = top left y coordinate of the window's desired position (can be an expression)\n        sizeX = width of the window's desired position (can be an expression)\n        sizeY = height of the window's desired position (can be an expression)\n        screen = (optional) the reference to the screen of the window's desired position.\n                 If this is not specified, it will default to the screen the window is currently on.\n                 See the table at the beginning of the Operation section for more information.\n\n    Example:\n\n        bind pad1:ctrl move 0;0 100;100 1\n\n    Will bind the keystroke ctrl-numpad1 to moving the window to the screen at index `1` with top-left coordinate `0,0` and size `100,100`\n\n    **Note:** Remember to offset with `screenOriginX` in your `topLeftX` and `screenOriginY` in your `topLeftY` when using the `screen` option (or when using multiple screens in general) or your move operation will offset from the default origin `(0,0)` which is the origin of screen `0`.\n\n##### resize #####\nResize the window (keeping top-left the same): `resize x y anchor`\n\n        x = amount to resize width either as a percent or a hard value (+10% or -100)\n        y = amount to resize height either as a percent or a hard value (+10% or -100)\n        anchor = (optional) which corner to anchor on top-left|top-right|bottom-left|bottom-right (default is top-left)\n\n    Example:\n\n        bind right:ctrl resize +10% +0\n\n    Will bind the keystroke ctrl-rightarrow to increase the width the current window by `10%`.\n\n    **Note:** ctrl-rightarrow is used by default in Mac OS X by spaces. Be sure to turn these bindings off if you want to use them in Slate.\n\n##### push #####\nPush the window to the edge of the screen: `push direction style`\n\n        direction = top|up|bottom|down|left|right\n        style = (optional) none|center|bar|bar-resize:expression (default is none)\n        screen = (optional) the reference to the screen of the window's desired position.\n                 If this is not specified, it will default to the screen the window is currently on.\n                 See the table at the beginning of the Operation section for more information.\n\n    Example:\n\n        bind up:alt,ctrl push up\n\n    Will bind the keystroke alt-ctrl-uparrow to push the window so that it is aligned with the top of the screen\n\n##### nudge #####\nNudge the window in any direction: `nudge x y`\n\n        x = amount to nudge x either as a percent or a hard value (+10% or -100)\n        y = amount to nudge y either as a percent or a hard value (+10% or -100)\n\n    Example:\n\n        bind left:ctrl,shift nudge -100 +0\n\n    Will bind the keystroke ctrl-shift-leftarrow to nudge the window `100` pixels to the left\n\n##### throw #####\nThrow the window to any screen's origin: `throw screen style`\n\n        screen = the screen you want to throw the window to (0 indexed)\n        style = (optional) resize|resize:x-expression;y-expression (default will not resize)\n\n    Example:\n\n        bind pad1:alt,ctrl throw 1 resize\n\n    Will bind the keystroke alt-ctrl-numpad1 to throw the window to the 2nd screen and resize it to fit that screen\n\n##### corner #####\nMove/Resize the window into a corner: `corner direction style`\n\n        direction = top-left|top-right|bottom-left|bottom-right\n        style = (optional) resize:x-expression;y-expression (default will not resize)\n        screen = (optional) the reference to the screen of the window's desired position.\n                 If this is not specified, it will default to the screen the window is currently on.\n                 See the table at the beginning of the Operation section for more information.\n\n    Example:\n\n        bind 1:ctrl corner top-left resize:screenSizeX/2;screenSizeY/2\n\n    Will bind the keystroke ctrl-1 to move the window to the top-left corner and resize it to 1/4 of the screen\n\n##### shell #####\nExecute a shell command: `shell options 'command'`\n\n        command = (required) the command to run. note that it is a quoted string.\n        options = (optional) a space separated list of:\n                   wait  - block slate until the shell command exits. Useful when using shell commands in a\n                           sequence binding\n                   path: - the inital working directory to use when starting the command. For example\n                           path:~/code would set the inital working directory to ~/code\n\n    Example:\n\n        bind 1:ctrl wait path:~/code '/opt/local/bin/mvim'\n\n    Will bind the keystroke ctrl-1 to run the command `/opt/local/bin/mvim` with the current working directory of `~/code`. Slate will also block until the command is done. Note that you may **not** use the tilda home directory shortcut within the command itself, it is only allowed within the path.\n\n##### hide #####\nHide one or more applications: `hide applications`\n\n        applications = a comma separated list of application names. Individual application names must be\n                       surrounded by quotes. You can also specify `current`, `all`, or `all-but:` for the\n                       Application name (no quotes). `current` will apply to the currently focused\n                       application, `all` will apply to all open applications and `all-but:'APP_NAME'` will\n                       apply to all open applications except `APP_NAME`. Note that when trying to hide `all`\n                       it will not work as intended because OS X will not allow every visible app to be\n                       hidden. Hiding `all` will hide all apps but OS X will auto-show one of the apps that\n                       were hidden.\n\n    Example:\n\n        bind 1:ctrl hide 'iTerm','Google Chrome'\n\n    Will bind the keystroke ctrl-1 to hide iTerm and Google Chrome.\n\n##### show #####\nShow one or more applications: `show applications`\n\n        applications = a comma separated list of application names. Individual application names must be\n                       surrounded by quotes. You can also specify `current`, `all`, or `all-but:` for the\n                       Application name (no quotes). `current` will apply to the currently focused\n                       application, `all` will apply to all open applications and `all-but:'APP_NAME'` will\n                       apply to all open applications except `APP_NAME`.\n\n    Example:\n\n        bind 1:ctrl show 'iTerm','Google Chrome'\n\n    Will bind the keystroke ctrl-1 to show (unhide) iTerm and Google Chrome.\n\n##### toggle #####\nToggle one or more applications: `toggle applications`\n\n        applications = a comma separated list of application names. Individual application names must be\n                       surrounded by quotes. You can also specify `current`, `all`, or `all-but:` for the\n                       Application name (no quotes). `current` will apply to the currently focused\n                       application, `all` will apply to all open applications and `all-but:'APP_NAME'` will\n                       apply to all open applications except `APP_NAME`. Note that when trying to toggle `all`\n                       it will may not work as intended because OS X will not allow every visible app to be\n                       hidden. If at any point during the toggling all apps become hidden, OS X will auto-show\n                       one of the apps that were hidden.\n\n    Example:\n\n        bind 1:ctrl toggle 'iTerm','Google Chrome'\n\n    Will bind the keystroke ctrl-1 to toggle iTerm and Google Chrome. Toggle meaning if the individual\n    application is currently hidden it will be shown and if it is currently shown it will be hidden.\n\n    **Note:** If you specify current in this toggle operation it will not toggle properly because after the current application is hidden, it is no longer the current application anymore.\n\n##### chain #####\nChain multiple operations to one binding: `chain opAndParams1 | opAndParams2 ...`\n\n        opAndParamsX = any operation string (except sequence, hint and grid)\n\n    Example:\n\n        bind 1:ctrl chain push up | push right | push down | push left\n\n    Will bind the keystroke ctrl-1 to push up on the first press, then push right on the second press, then push down on the third press, the push left on the fourth press and rotate back to pushing up on the fifth press (etc).\n\n##### sequence #####\nActivate a sequence of operations in one binding: `sequence opAndParams1 separator opAndParams 2 ...`\n\n        opAndParamsX = any of the above operation strings (except chain and grid. hint must be last if present)\n        separator = | or \u003e. | will cause the next operation to be performed on the window focused at the time of\n                    execution of that operation, \u003e will cause the next operation to be performed on the window\n                    focused at the start of the \u003e chain.\n\n    Example:\n\n        bind 1:ctrl sequence focus right \u003e push left | push right\n\n    Will bind the keystroke ctrl-1 to first focus the window to the right, then push the previously focused window to the left, then push the newly focused window to the right. Obviously Hint will ignore `\u003e` and `|` and just display because it doesn't care which window was focused.\n\n\n##### layout #####\nActivate a layout: `layout name`\n\n        name = the name of the layout to activate (set using the layout directive)\n\n    Example:\n\n        bind 1:ctrl layout myLayout\n\n    Will bind the keystroke ctrl-l to activate the layout called `myLayout`. Note that the layout **must** be created before you bind it.\n\n##### focus #####\nFocus a window in a direction or from an application: `focus direction|app`\n\n        direction = right|left|up|above|down|below|behind\n        app = an app name surrounded by quotes\n\n    Example:\n\n        bind 1:ctrl focus above\n\n    Will bind the keystroke ctrl-1 to focus the window Slate finds to be above the currently focused window (from any application). Minimized and hidden windows are ignored. A couple global configuration options set using the `config` directive exist to tweak this. Also, up and above are the same. Down and below are also the same.\n\n        bind 1:ctrl focus 'iTerm'\n\n    Will bind the keystroke ctrl-1 to focus the main window of the application iTerm. The main window is the last focused window of that application.\n\n##### snapshot #####\nCreate a snapshot of your current window locations: `snapshot name options`\n\n        name = the name of the snapshot to create (used in delete-snapshot and activate-snapshot)\n        options = (optional) a semicolon separated list of any of the following options:\n          save-to-disk -\u003e saves the snapshot to disk so Slate will load it when it starts up next\n          stack -\u003e treats this snapshot as stack so you can use this binding multiple times to push snapshots on the stack\n\n    Example:\n\n         bind 1:ctrl snapshot theName save-to-disk;stack\n\n    Will bind the keystroke ctrl-1 to create a snapshot called `theName`, save that snapshot to disk, and treat it as a stack so you can hit the keystroke multiple times to push snapshots onto the stack.\n\n    **Note:** There is a menu option to take a snapshot of the current screen configuration.\n\n##### delete-snapshot #####\nDelete a snapshot: `delete-snapshot name options`\n\n        name = the name of the snapshot to delete\n        options = (optional) a semicolon separated list of any of the following options:\n          all -\u003e if the snapshot is a stack (if it isn't, this option is useless), this will delete all snapshots in the\n                 stack (if this option is not specified, the default is to only delete the top snapshot of the stack).\n\n    Example:\n\n        bind 1:ctrl delete-snapshot theName all\n\n    Will bind the keystroke ctrl-1 to delete the snapshot called `theName` if it exists. This will delete all instances of theName meaning if you have pushed multiple snapshots on the stack, it will completely clear them all.\n\n##### activate-snapshot #####\nActivate a snapshot: `activate-snapshot name options`\n\n        name = the name of the snapshot to activate\n        options = (optional) a semicolon separated list of any of the following options:\n          delete -\u003e this will delete the snapshot after activating it (if the snapshot is a stack, it will pop the top\n                    snapshot off and keep the rest)\n\n    Example:\n\n        bind 1:ctrl activate-snapshot theName delete\n\n    Will bind the keystroke ctrl-1 to activate the snapshot called `theName` if it exists. This will also delete the snapshot (or pop it off the stack if the snapshot is a stack).\n\n    **Note:** There is a menu option to activate the snapshot that you may have created using the menu option.\n\n##### hint #####\nShow Window Hints (similar to Link Hints in Vimium except for Windows): `hint characters`\n\n        characters = (optional) a simple string of characters to be used for the hints. each hint consists of one\n                     character. if there are more windows than characters then some windows will not get hints.\n                     this string can contain any of the single character Allowed Keys. Letters may be upper case or\n                     lower case, but both will be bound to the lowercase letter for the hint. Using upper or lower\n                     case only changes how they are displayed. The default string of characters is\n                     \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"\n\n    Example:\n\n        bind 1:ctrl hint QWERTYUIOP\n\n    Will bind the keystroke ctrl-1 to show Window Hints using the letters `Q`, `W`, `E`, `R`, `T`, `Y`, `U`, `I`, `O`, and `P`.  This will show an overlay in the top-left corner of every window on screen containing one of those letters. While the overlays are showing, if one of those letters is pressed, the corresponding window will be focused. If there are more than 10 windows, some windows will not get hints. Pressing ESC will dismiss the hints.\n\n    **Note:** There are *tons* of config options to tweak this.\n\n##### grid #####\nShow a Grid to one-off resize and move windows: `grid options`\n\n        options is a whitespace separated list of:\n          padding:\u003cinteger\u003e = the padding between cells\n          screenRef:width,height = width and height are integers specifying the width and height of the grid\n                                   (number of cells, not absolute size). screenRef is either the screenID or\n                                   screen resolution (widthxheight)\n\n    Example:\n\n        bind 1:ctrl grid padding:5 1680x1050:16,9 1050x1680:9,16\n\n    Will bind the keystroke ctrl-1 to show Grids on each screen. The default width and height are 12. This will set the padding between the cells to be 5. Also, this will change the width and height of the grid on the monitor with the resolution 1680x1050 to 16 and 9 respectively. For the monitor with the resolution 1050x1680, it will set the width to 9 and height to 16. If you have multiple monitors, the Grid that is on the same screen as your mouse pointer will be focused. If you want to use a grid on a different monitor you **must** click it first and then click+drag.\n\n    **Note:** There are a bunch of config options to tweak how this looks.\n\n##### relaunch #####\nRelaunch Slate: `relaunch`\n\n    Example:\n\n        bind 1:ctrl relaunch\n\n    Will bind the keystroke ctrl-1 to relaunch Slate. This will also reload the `.slate` file from scratch.\n\n##### undo #####\nUndo an Operation: `undo`\n\n    Example\n\n        bind 1:ctrl undo\n\n    Will bind the keystroke ctrl-1 to undo the last binding that was triggered. By default you can undo up to the last 10 commands. This can be changed using the `undoMaxStackSize` config. Also, you can only undo movement-based operations. Focus-related operations will not undo.\n\n##### switch #####\n\\[Beta\\] A Better Application Switcher: `switch`\n\n    If you bind any binding to cmd-tab or cmd-shift-tab, Slate will completely disable the default Mac OS X Application switcher!\n\n    Example:\n\n        bind tab:cmd switch\n\n    Will disable the default Mac OS X Application switcher and bind the keystroke cmd-tab to a better application switcher.\n\n     **Note:** There are *tons* of config options to tweak this.\n\n### The `source` Directive ###\n\nThe source directive follows the following format (tokens may be separated by any number of spaces):\n\n    source filename optional:if_exists\n\nWhere `filename` is the name of a file containing any of the directives above (including source). If no absolute path is specified, the user's home directory will be prepended to `filename`. If the user specifies the option `if_exists` as the second argument, Slate will not complain if it cannot find the file.\n\nFor Example:\n\n    source ~/.slate.test if_exists\n\nWill append all of the configurations from the file `~/.slate.test` to the current configuration if the file `~/.slate.test` exists.\n\n**Note:** You may use any aliases, layouts, etc that you specify before the source directive in the file you source. Any aliases, layouts, etc specified after cannot be used. Additionally, any aliases, layouts, etc that you specify in the file you source can be used after the source directive.\n\n### Example Config ###\n\nYou can check out my own config [here](https://github.com/jigish/dotfiles/blob/master/slate).\n\n### Useful Stuff ###\n\n- [kvs](https://github.com/kvs) has created a [Sublime Text 2](http://www.sublimetext.com/2) preference for `.slate` files [here](https://github.com/kvs/ST2Slate).\n- [trishume](https://github.com/trishume) has done a really nice writeup on getting started with Slate [here](http://thume.ca/howto/2012/11/19/using-slate/)\n\n# Contact #\n\nPlease send all questions, bug reports, suggestions, or general commentary to [Jigish Patel](mailto:slate.issues@gmail.com) or [create an issue](https://github.com/jigish/slate/issues/new) on github.\n\n# Allowed Keys #\n\n**Note:** If you bind any binding to cmd-tab or cmd-shift-tab, Slate will completely disable the default Mac OS X Application switcher!\n\n    '\n    ,\n    -\n    .\n    /\n    0\n    1\n    2\n    3\n    4\n    5\n    6\n    7\n    8\n    9\n    ;\n    =\n    `\n    a\n    b\n    backslash\n    c\n    caps\n    d\n    delete\n    down\n    e\n    end\n    esc\n    f\n    f1\n    f10\n    f11\n    f12\n    f13\n    f14\n    f15\n    f16\n    f17\n    f18\n    f19\n    f2\n    f20\n    f3\n    f4\n    f5\n    f6\n    f7\n    f8\n    f9\n    g\n    h\n    help\n    home\n    i\n    j\n    k\n    l\n    left\n    m\n    mute\n    n\n    o\n    p\n    pad*\n    pad+\n    pad-\n    pad.\n    pad/\n    pad0\n    pad1\n    pad2\n    pad3\n    pad4\n    pad5\n    pad6\n    pad7\n    pad8\n    pad9\n    pad=\n    padClear\n    padEnter\n    pageDown\n    pageUp\n    q\n    r\n    return\n    right\n    s\n    space\n    t\n    tab\n    u\n    up\n    v\n    w\n    x\n    y\n    z\n    [\n    ]\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjigish%2Fslate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjigish%2Fslate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjigish%2Fslate/lists"}