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 | "use strict" ;
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | const esc = {
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | reset: { on: '' } ,
|
41 |
|
42 |
|
43 |
|
44 | saveCursor: { on: '' } ,
|
45 | restoreCursor: { on: '' } ,
|
46 |
|
47 | up: { on: '%D' } ,
|
48 | down: { on: '%D' } ,
|
49 | right: { on: '%D' } ,
|
50 | left: { on: '%D' } ,
|
51 | nextLine: { on: '%D' } ,
|
52 | previousLine: { on: '%D' } ,
|
53 |
|
54 |
|
55 | column: {
|
56 | on: '%[column:%a]F' ,
|
57 | handler: x => {
|
58 | if ( typeof x !== 'number' || ! x || x <= 1 || x === Infinity ) { return '' ; }
|
59 | return ' '.repeat( x - 1 ) ;
|
60 | }
|
61 | } ,
|
62 | row: { on: '%D' } ,
|
63 | moveTo: { on: '%D%D' , optimized: () => '' } ,
|
64 |
|
65 | hideCursor: { on: '' , off: '' } ,
|
66 |
|
67 | tabSet: { on: '' } ,
|
68 | tabClear: { on: '' } ,
|
69 | tabClearAll: { on: '' } ,
|
70 | forwardTab: { on: '%D' } ,
|
71 | backwardTab: { on: '%D' } ,
|
72 |
|
73 |
|
74 | blockCursor: { on: '' } ,
|
75 | blinkingBlockCursor: { on: '' } ,
|
76 | underlineCursor: { on: '' } ,
|
77 | blinkingUnderlineCursor: { on: '' } ,
|
78 | beamCursor: { on: '' } ,
|
79 | blinkingBeamCursor: { on: '' } ,
|
80 |
|
81 |
|
82 |
|
83 | clear: { on: '' } ,
|
84 | eraseDisplayBelow: { on: '' } ,
|
85 | eraseDisplayAbove: { on: '' } ,
|
86 | eraseDisplay: { on: '' } ,
|
87 | eraseSavedLine: { on: '' } ,
|
88 | eraseLineAfter: { on: '' } ,
|
89 | eraseLineBefore: { on: '' } ,
|
90 | eraseLine: { on: '' } ,
|
91 | insertLine: { on: '%D' } ,
|
92 | deleteLine: { on: '%D' } ,
|
93 | insert: { on: '%D' } ,
|
94 | 'delete': { on: '%D' } ,
|
95 | backDelete: { on: '' } ,
|
96 | scrollUp: { on: '%D' } ,
|
97 | scrollDown: { on: '%D' } ,
|
98 | scrollingRegion: { on: '%D%D' } ,
|
99 | resetScrollingRegion: { on: '' } ,
|
100 |
|
101 |
|
102 | alternateScreenBuffer: { on: '' , off: '' } ,
|
103 |
|
104 |
|
105 |
|
106 | beep: { on: '' } ,
|
107 | bell: { on: '' } ,
|
108 |
|
109 |
|
110 |
|
111 | styleReset: { on: '' } ,
|
112 |
|
113 | bold: { on: '' , off: '' } ,
|
114 | dim: { on: '' , off: '' } ,
|
115 | italic: { on: '' , off: '' } ,
|
116 | underline: { on: '' , off: '' } ,
|
117 | blink: { on: '' , off: '' } ,
|
118 | inverse: { on: '' , off: '' } ,
|
119 | hidden: { on: '' , off: '' } ,
|
120 | strike: { on: '' , off: '' } ,
|
121 |
|
122 |
|
123 | defaultColor: { on: '' } ,
|
124 | black: { on: '' , off: '' } ,
|
125 | red: { on: '' , off: '' } ,
|
126 | green: { on: '' , off: '' } ,
|
127 | yellow: { on: '' , off: '' } ,
|
128 | blue: { on: '' , off: '' } ,
|
129 | magenta: { on: '' , off: '' } ,
|
130 | cyan: { on: '' , off: '' } ,
|
131 | white: { on: '' , off: '' } ,
|
132 | darkColor: { on: '%D' , off: '' } ,
|
133 | brightBlack: { on: '' , off: '' } ,
|
134 | brightRed: { on: '' , off: '' } ,
|
135 | brightGreen: { on: '' , off: '' } ,
|
136 | brightYellow: { on: '' , off: '' } ,
|
137 | brightBlue: { on: '' , off: '' } ,
|
138 | brightMagenta: { on: '' , off: '' } ,
|
139 | brightCyan: { on: '' , off: '' } ,
|
140 | brightWhite: { on: '' , off: '' } ,
|
141 | brightColor: { on: '%D' , off: '' } ,
|
142 |
|
143 |
|
144 | bgDefaultColor: { on: '' } ,
|
145 | bgBlack: { on: '' , off: '' } ,
|
146 | bgRed: { on: '' , off: '' } ,
|
147 | bgGreen: { on: '' , off: '' } ,
|
148 | bgYellow: { on: '' , off: '' } ,
|
149 | bgBlue: { on: '' , off: '' } ,
|
150 | bgMagenta: { on: '' , off: '' } ,
|
151 | bgCyan: { on: '' , off: '' } ,
|
152 | bgWhite: { on: '' , off: '' } ,
|
153 | bgDarkColor: { on: '%D' , off: '' } ,
|
154 | bgBrightBlack: { on: '' , off: '' } ,
|
155 | bgBrightRed: { on: '' , off: '' } ,
|
156 | bgBrightGreen: { on: '' , off: '' } ,
|
157 | bgBrightYellow: { on: '' , off: '' } ,
|
158 | bgBrightBlue: { on: '' , off: '' } ,
|
159 | bgBrightMagenta: { on: '' , off: '' } ,
|
160 | bgBrightCyan: { on: '' , off: '' } ,
|
161 | bgBrightWhite: { on: '' , off: '' } ,
|
162 | bgBrightColor: { on: '%D' , off: '' } ,
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 | requestCursorLocation: { on: '' , na: true } ,
|
171 |
|
172 |
|
173 | requestScreenSize: { on: '' } ,
|
174 |
|
175 |
|
176 | requestColor: { on: '%D' , na: true } ,
|
177 |
|
178 |
|
179 | mouseButton: { on: '' , off: '' } ,
|
180 |
|
181 |
|
182 | mouseHilight: { on: '' , off: '' } ,
|
183 |
|
184 |
|
185 | mouseDrag: { on: '' , off: '' } ,
|
186 |
|
187 |
|
188 | mouseMotion: { on: '' , off: '' } ,
|
189 |
|
190 |
|
191 | mouseSGR: { on: '' , off: '' } ,
|
192 |
|
193 |
|
194 | focusEvent: { on: '' , off: '' } ,
|
195 |
|
196 |
|
197 | applicationKeypad: { on: '' , off: '' } ,
|
198 |
|
199 |
|
200 |
|
201 |
|
202 | windowTitle: { on: '%D' } ,
|
203 | iconName: { on: '%D' } ,
|
204 | cwd: { on: '%D' } ,
|
205 | notify: { on: '%D%D' } ,
|
206 |
|
207 |
|
208 |
|
209 | setCursorColorRgb: { on: '%D%D%D' } ,
|
210 | resetCursorColorRgb: { on: '' } ,
|
211 | setDefaultColorRgb: { on: '%D%D%D' } ,
|
212 | resetDefaultColorRgb: { on: '' } ,
|
213 | setDefaultBgColorRgb: { on: '%D%D%D' } ,
|
214 | resetDefaultBgColorRgb: { on: '' } ,
|
215 | setHighlightBgColorRgb: { on: '%D%D%D' } ,
|
216 | resetHighlightBgColorRgb: { on: '' } ,
|
217 | setColorLL: { on: '%D%D%D%D' } ,
|
218 | resetColorLL: { on: '%D' } ,
|
219 |
|
220 | setClipboardLL: { na: true } ,
|
221 | requestClipboard: { na: true } ,
|
222 |
|
223 | setFont: { on: '%D' } ,
|
224 | color24bits: { on: '%D%D%D' , na: true } ,
|
225 | bgColor24bits: { on: '%D%D%D' , na: true } ,
|
226 |
|
227 |
|
228 |
|
229 | color256: { on: '%D' , off: '' } ,
|
230 | bgColor256: { on: '%D' , off: '' } ,
|
231 | setCursorColor: { on: '%D%D' , off: '' }
|
232 | } ;
|
233 |
|
234 |
|
235 |
|
236 | const handler = {} ;
|
237 | const keymap = {} ;
|
238 |
|
239 |
|
240 |
|
241 | module.exports = {
|
242 | esc: esc ,
|
243 | keymap: keymap ,
|
244 | handler: handler ,
|
245 | support: {
|
246 | deltaEscapeSequence: false ,
|
247 | "256colors": false ,
|
248 | "24bitsColors": false ,
|
249 | "trueColor": false
|
250 | } ,
|
251 |
|
252 | colorRegister: require( '../colorScheme/linux.json' )
|
253 | } ;
|
254 |
|