comparison slate.js @ 205:2575264385c9

Add extra layout to slate
author zegervdv <zegervdv@me.com>
date Mon, 24 Nov 2014 21:24:37 +0100
parents 489b51bdbc9b
children aba6fdee2489
comparison
equal deleted inserted replaced
204:489b51bdbc9b 205:2575264385c9
37 "y" : "screenOriginY + 10", 37 "y" : "screenOriginY + 10",
38 "width" : "1080", 38 "width" : "1080",
39 "height" : "1020", 39 "height" : "1020",
40 }); 40 });
41 41
42 var halfRight = S.operation("move", {
43 "screen" : monMain,
44 "x" : "screenSizeX/2",
45 "y" : "0",
46 "width" : "screenSizeX/2",
47 "height" : "screenSizeY"
48 });
49
50 var hideChat = S.operation("hide", { "app" : "Terminal" });
51 var showChat = S.operation("show", {
52 "app" : ["Terminal"]
53 });
54 var focusTerm = S.operation("focus", { "app" : "Terminal" });
55
56 var twoThirdsLeft = S.operation("move", {
57 "screen" : monMain,
58 "x" : "0",
59 "y" : "0",
60 "width" : "screenSizeX * 2 / 3",
61 "height" : "screenSizeY"
62 });
63
42 // Layout 64 // Layout
43 var HPsetupLayout = S.layout("HPsetupLayout", { 65 var HPSetupLayout = S.layout("HPSetupLayout", {
66 "_before_" : { "operations" : showChat, "repeat-last" : true },
67 "_after_" : { "operations" : focusTerm },
44 "Terminal" : { 68 "Terminal" : {
45 "operations" : [bottomRight, topRight], 69 "operations" : [bottomRight, topRight],
46 "title-order-regex" : [".+⌘1$"], 70 "title-order-regex" : [".+⌘1$"],
47 "repeat" : true 71 "repeat" : true
48 }, 72 },
49 "Safari" : { 73 "Safari" : {
50 "operations" : [mainLeft] 74 "operations" : [mainLeft]
51 } 75 }
52 }); 76 });
53 77
54 S.bind("space:ctrl", S.operation("layout", { "name" : HPsetupLayout })); 78 var SingleSetupLayout = S.layout("SingleSetupLayout", {
55 S.default([monHP,monMain], HPsetupLayout); 79 "Terminal" : {
80 "operations" : [halfRight, hideChat],
81 "title-order-regex" : [".+⌘1$"],
82 "repeat" : true
83 },
84 "Safari" : {
85 "operations" : [twoThirdsLeft]
86 }
87 });
88
89 S.bind("space:ctrl", S.operation("layout", { "name" : HPSetupLayout }));
90 // S.bind("space:ctrl", S.operation("layout", { "name" : SingleSetupLayout }));
91 S.default([monHP,monMain], HPSetupLayout);
92 S.default([monMain], SingleSetupLayout);