-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
131 lines (119 loc) · 3.91 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
/**
* Map GitHub VSCode Dark Dimmed theme to Hyper.
*
* @author Brian Zelip
* @version v1.0.0
* @license MIT
* @see {@link https://github.com/brianzelip/hyper-github-dark-dimmed}
*/
// Data
const theme = require('github-vscode-themes').darkDimmed;
// ANSI
const black = theme.colors['terminal.ansiBlack'];
const red = theme.colors['terminal.ansiRed'];
const green = theme.colors['terminal.ansiGreen'];
const yellow = theme.colors['terminal.ansiYellow'];
const blue = theme.colors['terminal.ansiBlue'];
const magenta = theme.colors['terminal.ansiMagenta'];
const cyan = theme.colors['terminal.ansiCyan'];
const white = theme.colors['terminal.ansiWhite'];
const lightBlack = theme.colors['terminal.ansiBrightBlack'];
const lightRed = theme.colors['terminal.ansiBrightRed'];
const lightGreen = theme.colors['terminal.ansiBrightGreen'];
const lightYellow = theme.colors['terminal.ansiBrightYellow'];
const lightBlue = theme.colors['terminal.ansiBrightBlue'];
const lightMagenta = theme.colors['terminal.ansiBrightMagenta'];
const lightCyan = theme.colors['terminal.ansiBrightCyan'];
const lightWhite = theme.colors['terminal.ansiBrightWhite'];
// Hyper API
const cursorColor = theme.colors['editorCursor.foreground'];
const foregroundColor = theme.colors['editor.foreground'];
const backgroundColor = theme.colors['editor.background'];
const selectionColor = theme.colors['editor.selectionBackground'];
const borderColor = theme.colors['tab.border'];
// State
const tabInactiveForeground = theme.colors['tab.inactiveForeground'];
const tabInactiveBackground = theme.colors['tab.inactiveBackground'];
const tabActiveForeground = theme.colors['tab.activeForeground'];
const tabActiveBackground = theme.colors['tab.activeBackground'];
const tabActiveBorderTop = theme.colors['tab.activeBorderTop'];
const tabHoverBackground = theme.colors['tab.hoverBackground'];
const listHoverBackground = theme.colors['list.hoverBackground'];
exports.decorateConfig = (config) =>
Object.assign({}, config, {
cursorColor,
foregroundColor,
backgroundColor,
selectionColor,
borderColor,
css: `
${config.css || ''}
.tabs_nav {
border: 0;
border-bottom: 1px solid ${borderColor} !important;
}
.tabs_title {
/* One tab only */
border-top: 1px solid transparent;
color: ${tabActiveForeground} !important;
}
.tab_tab {
border: 0;
}
.tab_tab:first-of-type {
padding-left: 0;
}
.tab_tab > .tab_text {
border-top: 1px solid transparent !important;
border-right: 1px solid ${borderColor} !important;
border-bottom: 1px solid ${borderColor} !important;
border-left: 1px solid transparent !important;
color: ${tabInactiveForeground} !important;
background-color: ${tabInactiveBackground} !important;
}
.tab_tab > .tab_text:hover {
background-color: ${tabHoverBackground} !important;
}
.tab_tab:first-of-type > .tab_text {
border-left-color: ${borderColor} !important;
}
.tab_tab:last-of-type > .tab_text {
border-top-right-radius: 10px;
border-right-color: transparent !important;
}
.tab_tab:last-of-type > .tab_text.tab_textActive {
border-top-right-radius: 0px;
}
.tab_tab > .tab_text.tab_textActive {
border-top: 1px solid ${tabActiveBorderTop} !important;
border-bottom: 1px solid transparent !important;
color: ${tabActiveForeground} !important;
background-color: ${tabActiveBackground} !important;
}
.tab_icon.tab_iconHovered {
color: ${foregroundColor} !important;
background-color: ${listHoverBackground} !important;
}
.tabs_borderShim {
display: none;
}
`,
colors: {
black,
red,
green,
yellow,
blue,
magenta,
cyan,
white,
lightBlack,
lightRed,
lightGreen,
lightYellow,
lightBlue,
lightMagenta,
lightCyan,
lightWhite
}
});