forked from gielcobben/verminal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
119 lines (116 loc) · 3.06 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
module.exports.onWindow = browserWindow =>
browserWindow.setVibrancy("ultra-dark");
const foregroundColor = "#fff";
const backgroundColor = "rgba(0, 0, 0, .65)";
const overlap = "rgba(0, 0, 0, .15)";
const red = "#FF3B30";
const green = "#4CD964";
const yellow = "#FFCC00";
const blue = "#0095FF";
const magenta = "#FF2D55";
const cyan = "#5AC8FA";
const white = "#FFFFFF";
const defaultConfig = {
fontFamily:
'"SF Mono", "Monaco", "Inconsolata", "Fira Mono", "Droid Sans Mono", "Source Code Pro", monospace',
fontSize: 12,
};
// Check if Verminal configuration exists in ~/.hyper.js. If not, fall back to default configuration.
const checkConfig = function(config, setting) {
return (
(config.hasOwnProperty("verminal") && config.verminal[setting]) ||
defaultConfig[setting]
);
};
exports.decorateConfig = config =>
Object.assign({}, config, {
fontFamily: checkConfig(config, "fontFamily"),
fontSize: checkConfig(config, "fontSize"),
fontWeight: checkConfig(config, "fontWeight"),
fontWeightBold: checkConfig(config, "fontWeightBold"),
backgroundColor,
foregroundColor,
borderColor: overlap,
cursorColor: blue,
colors: {
black: backgroundColor,
red,
green,
yellow,
blue,
magenta,
cyan,
white,
lightBlack: "#686868",
lightRed: red,
lightGreen: green,
lightYellow: yellow,
lightBlue: blue,
lightMagenta: magenta,
lightCyan: cyan,
lightWhite: foregroundColor,
},
css: `
${config.css}
.hyper_main {
border: none !important;
}
.header_header {
background-color: ${overlap} !important;
}
.tabs_borderShim {
border-color: transparent !important;
}
.tab_tab {
border: 0;
}
.tab_textActive {
background: rgba(255, 255, 255, .05);
}
.hyper-search-wrapper {
border: 0 !important;
padding: 0 !important;
background-color: transparent !important;
display: flex;
opacity: 0.8 !important;
}
.hyper-search-wrapper button {
top: 0 !important;
opacity: 0.8 !important;
padding: 0 6px;
cursor: pointer;
}
.hyper-search-wrapper button:hover {
opacity: 1.0 !important;
}
.hyper-search-wrapper button:nth-of-type(1) {
border-radius: 4px 0 0 4px !important;
border-right: 1px solid #ddd !important;
}
.hyper-search-wrapper button:nth-of-type(2) {
border-radius: 0 4px 4px 0 !important;
}
.hyper-search-wrapper:before {
width: 20px;
color: #000;
position: absolute;
content: "🔍";
font-size: 10px;
margin: 7px;
z-index: 999;
}
#hyper-search-input {
background-color: #fff !important;
border-radius: 4px;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
padding: 3px 6px 3px 24px !important;
color: #000 !important;
opacity: 0.9 !important;
margin-right: 2px;
}
#hyper-search-input:focus {
opacity: 1.0 !important;
box-shadow: 0 1px 10px rgba(0, 0, 0, 1.0);
}
`,
});