comparison slate.js @ 212:aba6fdee2489

Center windows in single display mode
author zegervdv <zegervdv@me.com>
date Sat, 29 Nov 2014 18:25:35 +0100
parents 2575264385c9
children
comparison
equal deleted inserted replaced
211:499a3887f569 212:aba6fdee2489
59 "y" : "0", 59 "y" : "0",
60 "width" : "screenSizeX * 2 / 3", 60 "width" : "screenSizeX * 2 / 3",
61 "height" : "screenSizeY" 61 "height" : "screenSizeY"
62 }); 62 });
63 63
64 var upAndCenter = S.operation("move", {
65 "screen" : monMain,
66 "x" : "screenOriginX + 75",
67 "y" : "screenOriginY + 40",
68 "width" : "1030",
69 "height" : "680"
70 });
71
64 // Layout 72 // Layout
65 var HPSetupLayout = S.layout("HPSetupLayout", { 73 var HPSetupLayout = S.layout("HPSetupLayout", {
66 "_before_" : { "operations" : showChat, "repeat-last" : true }, 74 "_before_" : { "operations" : showChat, "repeat-last" : true },
67 "_after_" : { "operations" : focusTerm }, 75 "_after_" : { "operations" : focusTerm },
68 "Terminal" : { 76 "Terminal" : {
75 } 83 }
76 }); 84 });
77 85
78 var SingleSetupLayout = S.layout("SingleSetupLayout", { 86 var SingleSetupLayout = S.layout("SingleSetupLayout", {
79 "Terminal" : { 87 "Terminal" : {
80 "operations" : [halfRight, hideChat], 88 "operations" : [upAndCenter],
81 "title-order-regex" : [".+⌘1$"], 89 "title-order-regex" : [".+⌘1$"],
82 "repeat" : true 90 "repeat" : true
83 }, 91 },
84 "Safari" : { 92 "Safari" : {
85 "operations" : [twoThirdsLeft] 93 "operations" : [upAndCenter]
86 } 94 }
87 }); 95 });
88 96
89 S.bind("space:ctrl", S.operation("layout", { "name" : HPSetupLayout })); 97 // S.bind("space:ctrl", S.operation("layout", { "name" : HPSetupLayout }));
90 // S.bind("space:ctrl", S.operation("layout", { "name" : SingleSetupLayout })); 98 S.bind("space:ctrl", S.operation("layout", { "name" : SingleSetupLayout }));
91 S.default([monHP,monMain], HPSetupLayout); 99 S.default([monHP,monMain], HPSetupLayout);
92 S.default([monMain], SingleSetupLayout); 100 S.default([monMain], SingleSetupLayout);