forked from nordtheme/hyper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
117 lines (114 loc) · 2.94 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
/*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* title Nord Hyper +
* project nord-hyper +
* repository https://github.com/arcticicestudio/nord-hyper +
* author Arctic Ice Studio +
* email [email protected] +
* copyright Copyright (c) 2017 +
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
const nord = {
nord0: "#2E3440",
nord1: "#3B4252",
nord2: "#434C5E",
nord3: "#4C566A",
nord4: "#D8DEE9",
nord5: "#E5E9F0",
nord6: "#ECEFF4",
nord7: "#8FBCBB",
nord8: "#88C0D0",
nord9: "#81A1C1",
nord10: "#5E81AC",
nord11: "#BF616A",
nord12: "#D08770",
nord13: "#EBCB8B",
nord14: "#A3BE8C",
nord15: "#B48EAD"
};
const backgroundColor = nord.nord0;
const foregroundColor = nord.nord4;
const cursorColor = nord.nord4;
const borderColor = backgroundColor;
const colors = {
black: nord.nord1,
red: nord.nord11,
green: nord.nord14,
yellow: nord.nord13,
blue: nord.nord9,
magenta: nord.nord15,
cyan: nord.nord8,
white: nord.nord5,
lightBlack: nord.nord3,
lightRed: nord.nord11,
lightGreen: nord.nord14,
lightYellow: nord.nord13,
lightBlue: nord.nord9,
lightMagenta: nord.nord15,
lightCyan: nord.nord7,
lightWhite: nord.nord6,
colorCubes: nord.nord6,
grayscale: foregroundColor
};
exports.decorateConfig = config => {
return Object.assign({}, config, {
foregroundColor,
backgroundColor,
borderColor,
cursorColor: cursorColor,
colors,
cursorShape: config.cursorShape || "BEAM",
fontSize: config.fontSize || 16,
fontFamily: config.fontFamily || "'Source Code Pro', Hack",
termCSS: `
${config.termCSS || ""}
::selection {
background: rgba(67, 76, 94, 0.8) !important;
}
.cursor-node {
border-left-width: 2px;
}
@keyframes blink {
10%, 50% { opacity: 0 }
60%, 100% { opacity: 1 }
}
.cursor-node[focus=true] {
mix-blend-mode: difference;
}
`,
css: `
${config.css || ""}
* {
text-rendering: optimizeLegibility !important;
}
.header_header {
background-color: ${backgroundColor} !important;
top: 0 !important;
right: 0 !important;
left: 0 !important;
}
::selection {
background: rgba(67, 76, 94, 0.8) !important;
}
.tab_first {
margin-left: 0 !important;
padding: 0 !important;
}
.tabs_list,
.tab_tab {
border: 0 !important;
}
.tab_tab {
color: ${foregroundColor} !important;
transition: color 400ms ease, background 400ms ease;
}
.tab_tab.tab_active,
.tab_tab:hover {
background-color: ${nord.nord1};
}
.splitpane_divider {
background-color: rgba(67, 76, 94, 0.8) !important;
}
`
});
};