Webconfig: Fix customizing ayu themes

These used a different object format, so they were passed to
interpret_color wrong.

Because the "common" and "syntax" division doesn't really help all
that much, let's just flatten the thing.

See #7596.
This commit is contained in:
Fabian Homborg 2021-01-02 16:20:54 +01:00
parent cf8219e3ce
commit f547c2fda8

View File

@ -258,91 +258,79 @@ var color_scheme_fish_default = {
var ayuTheme = { var ayuTheme = {
ayu_dark: { ayu_dark: {
common: { 'accent': 'E6B450',
accent: 'E6B450', 'bg': '0A0E14',
bg: '0A0E14', 'fg': 'B3B1AD',
fg: 'B3B1AD', 'ui': '4D5566',
ui: '4D5566' 'tag': '39BAE6',
}, 'func': 'FFB454',
syntax: { 'entity': '59C2FF',
tag: '39BAE6', 'string': 'C2D94C',
func: 'FFB454', 'regexp': '95E6CB',
entity: '59C2FF', 'markup': 'F07178',
string: 'C2D94C', 'keyword': 'FF8F40',
regexp: '95E6CB', 'special': 'E6B673',
markup: 'F07178', 'comment': '626A73',
keyword: 'FF8F40', 'constant': 'FFEE99',
special: 'E6B673', 'operator': 'F29668',
comment: '626A73', 'error': 'FF3333',
constant: 'FFEE99',
operator: 'F29668',
error: 'FF3333'
}
}, },
ayu_light: { ayu_light: {
common: { 'accent': 'FF9940',
accent: 'FF9940', 'bg': 'FAFAFA',
bg: 'FAFAFA', 'fg': '575F66',
fg: '575F66', 'ui': '8A9199',
ui: '8A9199' 'tag': '55B4D4',
}, 'func': 'F2AE49',
syntax: { 'entity': '399EE6',
tag: '55B4D4', 'string': '86B300',
func: 'F2AE49', 'regexp': '4CBF99',
entity: '399EE6', 'markup': 'F07171',
string: '86B300', 'keyword': 'FA8D3E',
regexp: '4CBF99', 'special': 'E6BA7E',
markup: 'F07171', 'comment': 'ABB0B6',
keyword: 'FA8D3E', 'constant': 'A37ACC',
special: 'E6BA7E', 'operator': 'ED9366',
comment: 'ABB0B6', 'error': 'F51818',
constant: 'A37ACC',
operator: 'ED9366',
error: 'F51818'
}
}, },
ayu_mirage: { ayu_mirage: {
common: { 'accent': 'FFCC66',
accent: 'FFCC66', 'bg': '1F2430',
bg: '1F2430', 'fg': 'CBCCC6',
fg: 'CBCCC6', 'ui': '707A8C',
ui: '707A8C' 'tag': '5CCFE6',
}, 'func': 'FFD580',
syntax: { 'entity': '73D0FF',
tag: '5CCFE6', 'string': 'BAE67E',
func: 'FFD580', 'regexp': '95E6CB',
entity: '73D0FF', 'markup': 'F28779',
string: 'BAE67E', 'keyword': 'FFA759',
regexp: '95E6CB', 'special': 'FFE6B3',
markup: 'F28779', 'comment': '5C6773',
keyword: 'FFA759', 'constant': 'D4BFFF',
special: 'FFE6B3', 'operator': 'F29E74',
comment: '5C6773', 'error': 'FF3333',
constant: 'D4BFFF',
operator: 'F29E74',
error: 'FF3333'
}
}, },
apply: function(theme, receiver) { apply: function(theme, receiver) {
receiver['preferred_background'] = theme.common.bg receiver['preferred_background'] = theme.bg
receiver['autosuggestion'] = theme.common.ui receiver['autosuggestion'] = theme.ui
receiver['command'] = theme.syntax.tag receiver['command'] = theme.tag
receiver['comment'] = theme.syntax.comment receiver['comment'] = theme.comment
receiver['cwd'] = theme.syntax.entity receiver['cwd'] = theme.entity
receiver['end'] = theme.syntax.operator receiver['end'] = theme.operator
receiver['error'] = theme.syntax.error receiver['error'] = theme.error
receiver['escape'] = theme.syntax.regexp receiver['escape'] = theme.regexp
receiver['match'] = theme.syntax.markup receiver['match'] = theme.markup
receiver['normal'] = theme.common.fg receiver['normal'] = theme.fg
receiver['operator'] = theme.syntax.accent receiver['operator'] = theme.accent
receiver['param'] = theme.common.fg receiver['param'] = theme.fg
receiver['quote'] = theme.syntax.string receiver['quote'] = theme.string
receiver['redirection'] = theme.syntax.constant receiver['redirection'] = theme.constant
receiver['search_match'] = theme.syntax.accent receiver['search_match'] = theme.accent
receiver['selection'] = theme.syntax.accent receiver['selection'] = theme.accent
receiver['colors'] = [] receiver['colors'] = []
for (var key in theme) receiver['colors'].push(theme[key]) for (var key in theme) receiver['colors'].push(theme[key])