Skip to content

Commit b9d857d

Browse files
committed
(term) add srcery colorscheme
Just ran across it, seemed nice and the list of included ones was a little bit barebones so might as well. Going forward, this should all be exposed as the 'preroll' stage for 'tui' and 'terminal'.
1 parent b2ea0c7 commit b9d857d

File tree

3 files changed

+103
-78
lines changed

3 files changed

+103
-78
lines changed

COPYING

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,5 @@ Default Frameservers:
6464
encode, 3-Clause BSD (depends: FFMPEG, GPLv2+ licensed)
6565
decode-vlc, 3-Clause BSD (depends: libvlc-, LGPL)
6666
remoting, 3-Clause BSD (depends: libvncserver, GPLv2+)
67-
terminal, MIT (see COPYING in terminal/default/tsm), manually included dep.
67+
terminal, MIT (see COPYING in terminal/default/tsm), manually included dep.)
68+
srcery-colorscheme, MIT

src/frameserver/terminal/default/arcterm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static void dump_help()
8282
" scroll \t steps \t (experimental) smooth scrolling, (default:0=off) steps px/upd\n"
8383
" palette \t name \t use built-in palette (below)\n"
8484
"Built-in palettes:\n"
85-
"default, solarized, solarized-black, solarized-white\n"
85+
"default, solarized, solarized-black, solarized-white, srcery\n"
8686
"---------\t-----------\t----------------\n"
8787
);
8888
}

src/frameserver/terminal/default/tsm/tsm_vte.c

Lines changed: 100 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -145,91 +145,113 @@ const static int MOUSE_PROTO = MOUSE_SGR | MOUSE_X10 | MOUSE_RXVT;
145145
#define FLAG_PASTE_BRACKET 0x00040000 /* Bracketed Paste mode */
146146

147147
static uint8_t color_palette[VTE_COLOR_NUM][3] = {
148-
[VTE_COLOR_BLACK] = { 0, 0, 0 }, /* black */
149-
[VTE_COLOR_RED] = { 205, 0, 0 }, /* red */
150-
[VTE_COLOR_GREEN] = { 0, 205, 0 }, /* green */
151-
[VTE_COLOR_YELLOW] = { 205, 205, 0 }, /* yellow */
152-
[VTE_COLOR_BLUE] = { 0, 0, 238 }, /* blue */
153-
[VTE_COLOR_MAGENTA] = { 205, 0, 205 }, /* magenta */
154-
[VTE_COLOR_CYAN] = { 0, 205, 205 }, /* cyan */
155-
[VTE_COLOR_LIGHT_GREY] = { 229, 229, 229 }, /* light grey */
156-
[VTE_COLOR_DARK_GREY] = { 127, 127, 127 }, /* dark grey */
157-
[VTE_COLOR_LIGHT_RED] = { 255, 0, 0 }, /* light red */
158-
[VTE_COLOR_LIGHT_GREEN] = { 0, 255, 0 }, /* light green */
159-
[VTE_COLOR_LIGHT_YELLOW] = { 255, 255, 0 }, /* light yellow */
160-
[VTE_COLOR_LIGHT_BLUE] = { 92, 92, 255 }, /* light blue */
161-
[VTE_COLOR_LIGHT_MAGENTA] = { 255, 0, 255 }, /* light magenta */
162-
[VTE_COLOR_LIGHT_CYAN] = { 0, 255, 255 }, /* light cyan */
163-
[VTE_COLOR_WHITE] = { 255, 255, 255 }, /* white */
164-
165-
[VTE_COLOR_FOREGROUND] = { 229, 229, 229 }, /* light grey */
166-
[VTE_COLOR_BACKGROUND] = { 0, 0, 0 }, /* black */
148+
[VTE_COLOR_BLACK] = { 0, 0, 0 },
149+
[VTE_COLOR_RED] = { 205, 0, 0 },
150+
[VTE_COLOR_GREEN] = { 0, 205, 0 },
151+
[VTE_COLOR_YELLOW] = { 205, 205, 0 },
152+
[VTE_COLOR_BLUE] = { 0, 0, 238 },
153+
[VTE_COLOR_MAGENTA] = { 205, 0, 205 },
154+
[VTE_COLOR_CYAN] = { 0, 205, 205 },
155+
[VTE_COLOR_LIGHT_GREY] = { 229, 229, 229 },
156+
[VTE_COLOR_DARK_GREY] = { 127, 127, 127 },
157+
[VTE_COLOR_LIGHT_RED] = { 255, 0, 0 },
158+
[VTE_COLOR_LIGHT_GREEN] = { 0, 255, 0 },
159+
[VTE_COLOR_LIGHT_YELLOW] = { 255, 255, 0 },
160+
[VTE_COLOR_LIGHT_BLUE] = { 92, 92, 255 },
161+
[VTE_COLOR_LIGHT_MAGENTA] = { 255, 0, 255 },
162+
[VTE_COLOR_LIGHT_CYAN] = { 0, 255, 255 },
163+
[VTE_COLOR_WHITE] = { 255, 255, 255 },
164+
165+
[VTE_COLOR_FOREGROUND] = { 229, 229, 229 },
166+
[VTE_COLOR_BACKGROUND] = { 0, 0, 0 },
167167
};
168168

169169
static uint8_t color_palette_solarized[VTE_COLOR_NUM][3] = {
170-
[VTE_COLOR_BLACK] = { 7, 54, 66 }, /* black */
171-
[VTE_COLOR_RED] = { 220, 50, 47 }, /* red */
172-
[VTE_COLOR_GREEN] = { 133, 153, 0 }, /* green */
173-
[VTE_COLOR_YELLOW] = { 181, 137, 0 }, /* yellow */
174-
[VTE_COLOR_BLUE] = { 38, 139, 210 }, /* blue */
175-
[VTE_COLOR_MAGENTA] = { 211, 54, 130 }, /* magenta */
176-
[VTE_COLOR_CYAN] = { 42, 161, 152 }, /* cyan */
177-
[VTE_COLOR_LIGHT_GREY] = { 238, 232, 213 }, /* light grey */
178-
[VTE_COLOR_DARK_GREY] = { 0, 43, 54 }, /* dark grey */
179-
[VTE_COLOR_LIGHT_RED] = { 203, 75, 22 }, /* light red */
180-
[VTE_COLOR_LIGHT_GREEN] = { 88, 110, 117 }, /* light green */
181-
[VTE_COLOR_LIGHT_YELLOW] = { 101, 123, 131 }, /* light yellow */
182-
[VTE_COLOR_LIGHT_BLUE] = { 131, 148, 150 }, /* light blue */
183-
[VTE_COLOR_LIGHT_MAGENTA] = { 108, 113, 196 }, /* light magenta */
184-
[VTE_COLOR_LIGHT_CYAN] = { 147, 161, 161 }, /* light cyan */
185-
[VTE_COLOR_WHITE] = { 253, 246, 227 }, /* white */
186-
187-
[VTE_COLOR_FOREGROUND] = { 238, 232, 213 }, /* light grey */
188-
[VTE_COLOR_BACKGROUND] = { 7, 54, 66 }, /* black */
170+
[VTE_COLOR_BLACK] = { 7, 54, 66 },
171+
[VTE_COLOR_RED] = { 220, 50, 47 },
172+
[VTE_COLOR_GREEN] = { 133, 153, 0 },
173+
[VTE_COLOR_YELLOW] = { 181, 137, 0 },
174+
[VTE_COLOR_BLUE] = { 38, 139, 210 },
175+
[VTE_COLOR_MAGENTA] = { 211, 54, 130 },
176+
[VTE_COLOR_CYAN] = { 42, 161, 152 },
177+
[VTE_COLOR_LIGHT_GREY] = { 238, 232, 213 },
178+
[VTE_COLOR_DARK_GREY] = { 0, 43, 54 },
179+
[VTE_COLOR_LIGHT_RED] = { 203, 75, 22 },
180+
[VTE_COLOR_LIGHT_GREEN] = { 88, 110, 117 },
181+
[VTE_COLOR_LIGHT_YELLOW] = { 101, 123, 131 },
182+
[VTE_COLOR_LIGHT_BLUE] = { 131, 148, 150 },
183+
[VTE_COLOR_LIGHT_MAGENTA] = { 108, 113, 196 },
184+
[VTE_COLOR_LIGHT_CYAN] = { 147, 161, 161 },
185+
[VTE_COLOR_WHITE] = { 253, 246, 227 },
186+
187+
[VTE_COLOR_FOREGROUND] = { 238, 232, 213 },
188+
[VTE_COLOR_BACKGROUND] = { 7, 54, 66 },
189189
};
190190

191191
static uint8_t color_palette_solarized_black[VTE_COLOR_NUM][3] = {
192-
[VTE_COLOR_BLACK] = { 0, 0, 0 }, /* black */
193-
[VTE_COLOR_RED] = { 220, 50, 47 }, /* red */
194-
[VTE_COLOR_GREEN] = { 133, 153, 0 }, /* green */
195-
[VTE_COLOR_YELLOW] = { 181, 137, 0 }, /* yellow */
196-
[VTE_COLOR_BLUE] = { 38, 139, 210 }, /* blue */
197-
[VTE_COLOR_MAGENTA] = { 211, 54, 130 }, /* magenta */
198-
[VTE_COLOR_CYAN] = { 42, 161, 152 }, /* cyan */
199-
[VTE_COLOR_LIGHT_GREY] = { 238, 232, 213 }, /* light grey */
200-
[VTE_COLOR_DARK_GREY] = { 0, 43, 54 }, /* dark grey */
201-
[VTE_COLOR_LIGHT_RED] = { 203, 75, 22 }, /* light red */
202-
[VTE_COLOR_LIGHT_GREEN] = { 88, 110, 117 }, /* light green */
203-
[VTE_COLOR_LIGHT_YELLOW] = { 101, 123, 131 }, /* light yellow */
204-
[VTE_COLOR_LIGHT_BLUE] = { 131, 148, 150 }, /* light blue */
205-
[VTE_COLOR_LIGHT_MAGENTA] = { 108, 113, 196 }, /* light magenta */
206-
[VTE_COLOR_LIGHT_CYAN] = { 147, 161, 161 }, /* light cyan */
207-
[VTE_COLOR_WHITE] = { 253, 246, 227 }, /* white */
208-
209-
[VTE_COLOR_FOREGROUND] = { 238, 232, 213 }, /* light grey */
210-
[VTE_COLOR_BACKGROUND] = { 0, 0, 0 }, /* black */
192+
[VTE_COLOR_BLACK] = { 0, 0, 0 },
193+
[VTE_COLOR_RED] = { 220, 50, 47 },
194+
[VTE_COLOR_GREEN] = { 133, 153, 0 },
195+
[VTE_COLOR_YELLOW] = { 181, 137, 0 },
196+
[VTE_COLOR_BLUE] = { 38, 139, 210 },
197+
[VTE_COLOR_MAGENTA] = { 211, 54, 130 },
198+
[VTE_COLOR_CYAN] = { 42, 161, 152 },
199+
[VTE_COLOR_LIGHT_GREY] = { 238, 232, 213 },
200+
[VTE_COLOR_DARK_GREY] = { 0, 43, 54 },
201+
[VTE_COLOR_LIGHT_RED] = { 203, 75, 22 },
202+
[VTE_COLOR_LIGHT_GREEN] = { 88, 110, 117 },
203+
[VTE_COLOR_LIGHT_YELLOW] = { 101, 123, 131 },
204+
[VTE_COLOR_LIGHT_BLUE] = { 131, 148, 150 },
205+
[VTE_COLOR_LIGHT_MAGENTA] = { 108, 113, 196 },
206+
[VTE_COLOR_LIGHT_CYAN] = { 147, 161, 161 },
207+
[VTE_COLOR_WHITE] = { 253, 246, 227 },
208+
209+
[VTE_COLOR_FOREGROUND] = { 238, 232, 213 },
210+
[VTE_COLOR_BACKGROUND] = { 0, 0, 0 },
211211
};
212212

213213
static uint8_t color_palette_solarized_white[VTE_COLOR_NUM][3] = {
214-
[VTE_COLOR_BLACK] = { 7, 54, 66 }, /* black */
215-
[VTE_COLOR_RED] = { 220, 50, 47 }, /* red */
216-
[VTE_COLOR_GREEN] = { 133, 153, 0 }, /* green */
217-
[VTE_COLOR_YELLOW] = { 181, 137, 0 }, /* yellow */
218-
[VTE_COLOR_BLUE] = { 38, 139, 210 }, /* blue */
219-
[VTE_COLOR_MAGENTA] = { 211, 54, 130 }, /* magenta */
220-
[VTE_COLOR_CYAN] = { 42, 161, 152 }, /* cyan */
221-
[VTE_COLOR_LIGHT_GREY] = { 238, 232, 213 }, /* light grey */
222-
[VTE_COLOR_DARK_GREY] = { 0, 43, 54 }, /* dark grey */
223-
[VTE_COLOR_LIGHT_RED] = { 203, 75, 22 }, /* light red */
224-
[VTE_COLOR_LIGHT_GREEN] = { 88, 110, 117 }, /* light green */
225-
[VTE_COLOR_LIGHT_YELLOW] = { 101, 123, 131 }, /* light yellow */
226-
[VTE_COLOR_LIGHT_BLUE] = { 131, 148, 150 }, /* light blue */
227-
[VTE_COLOR_LIGHT_MAGENTA] = { 108, 113, 196 }, /* light magenta */
228-
[VTE_COLOR_LIGHT_CYAN] = { 147, 161, 161 }, /* light cyan */
229-
[VTE_COLOR_WHITE] = { 253, 246, 227 }, /* white */
230-
231-
[VTE_COLOR_FOREGROUND] = { 7, 54, 66 }, /* black */
232-
[VTE_COLOR_BACKGROUND] = { 238, 232, 213 }, /* light grey */
214+
[VTE_COLOR_BLACK] = { 7, 54, 66 },
215+
[VTE_COLOR_RED] = { 220, 50, 47 },
216+
[VTE_COLOR_GREEN] = { 133, 153, 0 },
217+
[VTE_COLOR_YELLOW] = { 181, 137, 0 },
218+
[VTE_COLOR_BLUE] = { 38, 139, 210 },
219+
[VTE_COLOR_MAGENTA] = { 211, 54, 130 },
220+
[VTE_COLOR_CYAN] = { 42, 161, 152 },
221+
[VTE_COLOR_LIGHT_GREY] = { 238, 232, 213 },
222+
[VTE_COLOR_DARK_GREY] = { 0, 43, 54 },
223+
[VTE_COLOR_LIGHT_RED] = { 203, 75, 22 },
224+
[VTE_COLOR_LIGHT_GREEN] = { 88, 110, 117 },
225+
[VTE_COLOR_LIGHT_YELLOW] = { 101, 123, 131 },
226+
[VTE_COLOR_LIGHT_BLUE] = { 131, 148, 150 },
227+
[VTE_COLOR_LIGHT_MAGENTA] = { 108, 113, 196 },
228+
[VTE_COLOR_LIGHT_CYAN] = { 147, 161, 161 },
229+
[VTE_COLOR_WHITE] = { 253, 246, 227 },
230+
231+
[VTE_COLOR_FOREGROUND] = { 7, 54, 66 },
232+
[VTE_COLOR_BACKGROUND] = { 238, 232, 213 },
233+
};
234+
235+
static uint8_t color_palette_srcery[VTE_COLOR_NUM][3] = {
236+
[VTE_COLOR_BLACK] = { 28, 27, 25 },
237+
[VTE_COLOR_RED] = { 239, 47, 39 },
238+
[VTE_COLOR_GREEN] = { 81, 159, 80 },
239+
[VTE_COLOR_YELLOW] = { 251, 184, 41 },
240+
[VTE_COLOR_BLUE] = { 44, 120, 190 },
241+
[VTE_COLOR_MAGENTA] = { 224, 44, 109 },
242+
[VTE_COLOR_CYAN] = { 10, 174, 179 },
243+
[VTE_COLOR_LIGHT_GREY] = { 145, 129, 117 },
244+
[VTE_COLOR_DARK_GREY] = { 45, 44, 41 },
245+
[VTE_COLOR_LIGHT_RED] = { 247, 83, 65 },
246+
[VTE_COLOR_LIGHT_GREEN] = { 152, 188, 55 },
247+
[VTE_COLOR_LIGHT_YELLOW] = { 254, 208, 110 },
248+
[VTE_COLOR_LIGHT_BLUE] = { 104, 168, 228 },
249+
[VTE_COLOR_LIGHT_MAGENTA] = { 255, 92, 143 },
250+
[VTE_COLOR_LIGHT_CYAN] = { 83, 253, 233 },
251+
[VTE_COLOR_WHITE] = { 252, 232, 195 },
252+
253+
[VTE_COLOR_FOREGROUND] = {0xfc,0xe8,0xc3 },
254+
[VTE_COLOR_BACKGROUND] = {0x12,0x12,0x12 },
233255
};
234256

235257
static uint8_t (*get_palette(struct tsm_vte *vte))[3]
@@ -243,6 +265,8 @@ static uint8_t (*get_palette(struct tsm_vte *vte))[3]
243265
return color_palette_solarized_black;
244266
if (!strcmp(vte->palette_name, "solarized-white"))
245267
return color_palette_solarized_white;
268+
if (!strcmp(vte->palette_name, "srcery"))
269+
return color_palette_srcery;
246270

247271
return color_palette;
248272
}

0 commit comments

Comments
 (0)