-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
118 lines (113 loc) · 2.68 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
'use strict';
// Base colors
const backgroundColor = 'rgba(150, 204, 50, 0.87)';
const backgroundColorWithoutTransparency = '#0a1d32';
const foregroundColor = '#dbe9f4';
// Common colors
const red = '#fa5482';
const orange = '#f09030';
const yellow = '#fae13e';
const green = '#89e33d';
const cyan = '#61dfff';
const blue = '#53bdff';
const magenta = '#ac5ce5';
const white = '#f1f5f7';
const gray = '#a6b4bd';
// Decorate user configuration
exports.decorateConfig = (config) => {
const {
termCSS = '',
css = '',
hyperAqua: {
vibrancy = false,
statusLine = true,
overrides = {},
} = {},
} = config;
// Set vibrancy
exports.onWindow = (win) => win.setVibrancy(vibrancy);
// eslint-disable-next-line no-restricted-properties
return Object.assign({}, config, {
cursorColor: yellow,
cursorAccentColor: yellow,
backgroundColor: vibrancy ? backgroundColor : backgroundColorWithoutTransparency,
foregroundColor,
borderColor: 'transparent',
selectionColor: 'rgba(225, 237, 243, 0.3)',
colors: {
black: backgroundColorWithoutTransparency,
red,
green,
yellow,
blue,
magenta,
cyan,
white,
lightBlack: gray,
lightRed: red,
lightGreen: green,
lightYellow: yellow,
lightBlue: blue,
lightMagenta: magenta,
lightCyan: cyan,
lightWhite: foregroundColor,
},
termCSS: `
${termCSS}
*::-webkit-scrollbar {
width: 4px;
height: 4px;
background-color: transparent;
}
*::-webkit-scrollbar-track {
background-color: transparent;
}
*::-webkit-scrollbar-thumb {
background: rgba(121, 158, 201, 0.2);
}
*::-webkit-scrollbar-thumb:window-inactive {
background: transparent;
}
`,
css: `
${css}
.hyper_main {
border: none;
}
.tab_tab {
border: none;
color: rgba(255, 255, 255, 0.2);
}
.tab_tab::before {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
background-color: white;
transform: scaleX(0);
transition: none;
}
.tab_tab.tab_active {
color: #FFF;
}
.tab_tab.tab_active::before {
transform: scaleX(1);
transition: all 300ms cubic-bezier(0.0, 0.0, 0.2, 1)
}
.tabs_title, .tabs_list {
font-weight: bold;
}
.splitpane_divider {
background-color: rgba(0, 0, 0, 0.2) !important;
}
`,
hyperStatusLine: statusLine
? {
dirtyColor: orange,
aheadColor: blue,
}
: {},
}, overrides);
};