-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
102 lines (92 loc) · 2.19 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
/*jslint node: true */
'use strict';
const path = require('path');
const transparent = 'rgba(0, 0, 0, 0)';
const mainColor = '#171924';
const backgroundColor = '#282a36';
const foregroundColor = '#dcddd9';
const borderColor = '#424448';
const cursorColor = '#97979b';
const selectionColor = 'rgba(151, 151, 155, 0.3)';
const highlightLine = 'rgba(0, 120, 0, 0.6)';
const red = '#ff3B30';
const green = '#4cd964';
const yellow = '#ffcc00';
const blue = '#0095ff';
const magenta = '#ff2d55';
const cyan = '#5ac8fa';
const white = '#d5d5d5';
const lightBlack = '#bbb0b0';
const imagePath = path
.join(path.resolve(__dirname, 'backgrounds'), 'aliens.png')
.replace(/\\/g, '/');
exports.decorateConfig = (config) =>
Object.assign({}, config, {
backgroundColor: transparent,
foregroundColor,
borderColor,
cursorColor,
cursorAccentColor: backgroundColor,
selectionColor,
colors: {
black: backgroundColor,
red,
green,
yellow,
blue,
magenta,
cyan,
white,
lightBlack,
lightRed: red,
lightGreen: green,
lightYellow: yellow,
lightBlue: blue,
lightMagenta: magenta,
lightCyan: cyan,
lightWhite: foregroundColor,
},
css: `
${config.css || ''}
/* Title background color */
.hyper_main {
background-color: ${mainColor};
}
/* Terminal background image */
.terms_terms {
background: url("file://${imagePath}") center;
background-size: cover;
}
/* Title colors */
.tab_tab {
color: #bfbfbf !important;
}
/* Add a highlight line below the active tab */
.tab_tab::before {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 3px;
background-color: ${highlightLine};
transform: scaleX(0);
will-change: transform;
}
.tab_tab.tab_active::before {
transform: scaleX(1);
transition: all 300ms cubic-bezier(0, 0, 0.2, 1);
}
/* Fade the title of inactive tabs and the content of inactive panes */
.tab_text,
.term_term {
opacity: 0.6;
will-change: opacity;
}
.tab_active .tab_text,
.term_active .term_term {
opacity: 1;
transition: opacity 0.12s ease-in-out;
}
`,
});