# HG changeset patch # User zegervdv # Date 1417281935 -3600 # Node ID aba6fdee248917419b68f692fcaf2951eef6a9cb # Parent 499a3887f569bdad51604d0fb9a839fa00f6a568 Center windows in single display mode diff -r 499a3887f569 -r aba6fdee2489 slate.js --- a/slate.js Sat Nov 29 18:07:30 2014 +0100 +++ b/slate.js Sat Nov 29 18:25:35 2014 +0100 @@ -61,6 +61,14 @@ "height" : "screenSizeY" }); +var upAndCenter = S.operation("move", { + "screen" : monMain, + "x" : "screenOriginX + 75", + "y" : "screenOriginY + 40", + "width" : "1030", + "height" : "680" +}); + // Layout var HPSetupLayout = S.layout("HPSetupLayout", { "_before_" : { "operations" : showChat, "repeat-last" : true }, @@ -77,16 +85,16 @@ var SingleSetupLayout = S.layout("SingleSetupLayout", { "Terminal" : { - "operations" : [halfRight, hideChat], + "operations" : [upAndCenter], "title-order-regex" : [".+⌘1$"], "repeat" : true }, "Safari" : { - "operations" : [twoThirdsLeft] + "operations" : [upAndCenter] } }); -S.bind("space:ctrl", S.operation("layout", { "name" : HPSetupLayout })); -// S.bind("space:ctrl", S.operation("layout", { "name" : SingleSetupLayout })); +// S.bind("space:ctrl", S.operation("layout", { "name" : HPSetupLayout })); +S.bind("space:ctrl", S.operation("layout", { "name" : SingleSetupLayout })); S.default([monHP,monMain], HPSetupLayout); S.default([monMain], SingleSetupLayout);