Skip to content

Instantly share code, notes, and snippets.

@alexanderGugel
Created November 29, 2014 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexanderGugel/668deed87d88ce0dd795 to your computer and use it in GitHub Desktop.
Save alexanderGugel/668deed87d88ce0dd795 to your computer and use it in GitHub Desktop.
My slate configuration (stolen from someone else)
slate.configAll({
'defaultToCurrentScreen': true,
'checkDefaultsOnLoad': true
});
var layout = {
maximize: S.op('move', {
'x' : 'screenOriginX',
'y' : 'screenOriginY',
'width' : 'screenSizeX',
'height' : 'screenSizeY'
}),
pushRight: S.op('push', {
'direction' : 'right',
'style' : 'bar-resize:screenSizeX/2'
}),
pushLeft: S.op('push', {
'direction' : 'left',
'style' : 'bar-resize:screenSizeX/2'
}),
pushTop: slate.operation("push", {
"direction" : "top",
"style" : "bar-resize:screenSizeY/2"
}),
pushBottom: slate.operation("push", {
"direction" : "bottom",
"style" : "bar-resize:screenSizeY/2"
})
};
var operations = {
throw0: S.op('throw', {
'screen': '0',
'width': 'screenSizeX',
'height': 'screenSizeY'
}),
throw1: S.op('throw', {
'screen' : '1',
'width' : 'screenSizeX',
'height' : 'screenSizeY'
})
};
slate.bindAll({
// Directionals
'up:ctrl,alt,cmd,shift': layout.maximize,
'up:ctrl,cmd,alt': layout.pushTop,
'down:ctrl,cmd,alt': layout.pushBottom,
'right:ctrl,cmd,alt': layout.pushRight,
'left:ctrl,cmd,alt': layout.pushLeft,
'[:ctrl,cmd,alt': operations.throw0,
']:ctrl,cmd,alt': operations.throw1
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment