Skip to content

Instantly share code, notes, and snippets.

@nielsbom
Created July 6, 2018 10:26
Show Gist options
  • Save nielsbom/46df1b495bdf964203ebd7c2a45e200b to your computer and use it in GitHub Desktop.
Save nielsbom/46df1b495bdf964203ebd7c2a45e200b to your computer and use it in GitHub Desktop.
My Slate (window manager) configuration for quickly toggling browser width, handy for responsive web design workflows
// Slate is here: https://github.com/jigish/slate/
// Widths for frontend development
var pushToScreenWidth = slate.operation("move", {
"x": "screenOriginX",
"y": "screenOriginY",
"width": "screenSizeX",
"height": "screenSizeY"
});
// dup duplicates the operation and changes the given parameters
slate.bind("1:ctrl,alt", pushToScreenWidth.dup({
"width": 400
}));
slate.bind("2:ctrl,alt", pushToScreenWidth.dup({
"width": 600
}));
slate.bind("3:ctrl,alt", pushToScreenWidth.dup({
"width": 800
}));
slate.bind("4:ctrl,alt", pushToScreenWidth.dup({
"width": 1000
}));
slate.bind("5:ctrl,alt", pushToScreenWidth);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment