-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.js
132 lines (127 loc) · 3 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
'use strict';
const foregroundColor = '#383a42';
const red = '#e45649';
const green = '#50a14f';
const yellow = '#c18401';
const blue = '#4078f2';
const magenta = '#a626a4';
const cyan = '#0184bc';
const white = '#a0a1a7';
const lightBlack = '#696c77';
exports.decorateConfig = config => {
const backgroundColor = config.enableVibrancy ? 'transparent' : '#fafafa';
let tabListStyles = '';
if (process.platform === 'darwin') {
tabListStyles = `
.tabs_list {
margin-left: 0 !important;
padding-left: 76px;
}
.tabs_list::before {
content: "";
position: absolute;
z-index: 2;
top: 0;
left: 0;
bottom: 0;
width: 76px;
background-color: rgba(50, 50, 50, .09) !important;
border-bottom: 1px solid rgba(0, 0, 0, .12);
}
`;
}
const decoratedConfig = Object.assign({}, config, {
backgroundColor,
foregroundColor,
borderColor: 'transparent',
cursorColor: '#526eff',
colors: {
black: foregroundColor,
red,
green,
yellow,
blue,
magenta,
cyan,
white,
lightBlack,
lightRed: red,
lightGreen: green,
lightYellow: yellow,
lightBlue: blue,
lightMagenta: magenta,
lightCyan: cyan,
lightWhite: backgroundColor
},
css: `
${config.css || ''}
.header_header {
top: 0;
right: 0;
left: 0;
}
.header_shape,
.header_appTitle {
color: ${foregroundColor};
}
.splitpane_divider {
background-color: rgba(0, 0, 0, .12) !important;
}
${tabListStyles}
.tab_tab {
color: rgba(0, 0, 0, .3) !important;
background-color: rgba(50, 50, 50, .09) !important;
border-color: rgba(0, 0, 0, .12) !important;
}
.tab_tab.tab_active {
font-weight: 500;
background-color: transparent !important;
}
.tab_tab.tab_active::before {
border-bottom-color: transparent;
}
.tab_tab::after {
content: "";
position: absolute;
pointer-events: none;
z-index: 2;
top: 0px;
left: -1px;
bottom: 0;
width: 2px;
border-radius: 0;
background-color: #475fd7;
opacity: 0;
transition: opacity .16s;
}
.tab_tab.tab_active::after {
opacity: 1;
transition-duration: .32s;
}
.tabs_title, .tab_icon, .tab_tab.tab_active {
color: rgba(0, 0, 0, .57) !important;
}
.tab_tab.tab_hasActivity {
color: ${blue} !important;
}
`,
termCSS: `
${config.termCSS || ''}
x-row a {
color: ${cyan};
}
.cursor-node {
mix-blend-mode: multiply;
}
.cursor-node[focus="false"] {
opacity: 0 !important;
}
`
});
exports.onWindow = browserWindow => {
if (config.enableVibrancy === true) {
browserWindow.setVibrancy('light');
}
};
return decoratedConfig;
};