Skip to content
jigish edited this page Jan 26, 2013 · 17 revisions

Example Slate Configs

User Configs

Inline Examples

Layout Definition Tricks

### use '|' and '>' in layout definitions
### eg. hide only the second instance of chrome but resize and move both
alias huge-main  move screenOriginX;screenOriginY                 screenSizeX;screenSizeY ${huge-monitor}
alias small-right move screenOriginX+screenSizeX/2;screenOriginY  screenSizeX/2;screenSizeY ${small-monitor}

layout 2monitors 'Google Chrome':SORT_TITLE     ${huge-main} | ${small-right} > hide current

### hide an app upon layout initialization
layout 2monitors 'Twitter':                     sequence focus down > hide current


### hide the second instance of an app
layout 2monitors 'Mail':SORT_TITLE              nudge +0 +0 > show current | nudge +0 +0 > hide current

Sequence Chains

### use sequences, focus, and pipes to switch 2 vertically split windows back and forth
bind 4:ctrl sequence push left bar-resize:screenSizeX/2 > focus right > push right bar-resize:screenSizeX/2 > push left > push right | push left

Fullscreen hacks

Slate doesn't handle applications in 'fullscreen' mode very well out of the box. The following applescript file will allow you to get an application out of fullscreen mode before doing subsequent operations on the app.

In the example below the file has been saved to ~/scripts/makeFullScreen.scpt - the example will take Chrome out of full screen mode and move it to the left part of the screen:

bind v:alt;cmd sequence shell wait path:~/scripts '/usr/bin/osascript -l AppleScript makeFullScreen.scpt Chrome false' | focus 'Chrome' | move screenOriginX;screenOriginY screenSizeX/2;screenSizeY

Moving

Resizing

Focusing

Automagic Stuff

Clone this wiki locally