diff options
Diffstat (limited to '.config/wallust')
| -rw-r--r-- | .config/wallust/templates/vis-theme.lua | 19 | ||||
| -rw-r--r-- | .config/wallust/wallust.toml | 2 |
2 files changed, 18 insertions, 3 deletions
diff --git a/.config/wallust/templates/vis-theme.lua b/.config/wallust/templates/vis-theme.lua index 9fc9900..ef8245c 100644 --- a/.config/wallust/templates/vis-theme.lua +++ b/.config/wallust/templates/vis-theme.lua @@ -2,8 +2,23 @@ -- Source of truth: wallust/.config/wallust/templates/vis-theme.lua local lexers = vis.lexers +-- Blend two #rrggbb colors; t = weight of b (0..1). +local function mix(a, b, t) + local function parse(c) + c = c:gsub('#', '') + return tonumber(c:sub(1, 2), 16), tonumber(c:sub(3, 4), 16), tonumber(c:sub(5, 6), 16) + end + local ar, ag, ab = parse(a) + local br, bg_, bb = parse(b) + local function ch(x, y) + return string.format('%02x', math.floor(x + (y - x) * t + 0.5)) + end + return '#' .. ch(ar, br) .. ch(ag, bg_) .. ch(ab, bb) +end + + lexers.STYLE_DEFAULT = 'fore:{{foreground}},back:{{background}}' -lexers.STYLE_NOTHING = '' +lexers.STYLE_NOTHING = 'back:{{background}}' lexers.STYLE_CLASS = 'fore:{{color6}}' lexers.STYLE_COMMENT = 'fore:{{color8}},italics' lexers.STYLE_CONSTANT = 'fore:{{color13}}' @@ -24,7 +39,7 @@ lexers.STYLE_WHITESPACE = '' lexers.STYLE_EMBEDDED = 'fore:{{color13}}' lexers.STYLE_IDENTIFIER = '' -lexers.STYLE_LINENUMBER = 'fore:{{color8}}' +lexers.STYLE_LINENUMBER = 'fore:' .. mix('{{background}}', '{{color8}}', 0.35) lexers.STYLE_LINENUMBER_CURSOR = 'fore:{{color8}}' lexers.STYLE_CURSOR = 'back:{{color4}}' lexers.STYLE_CURSOR_PRIMARY = 'fore:{{background}},back:{{color6}},bold' diff --git a/.config/wallust/wallust.toml b/.config/wallust/wallust.toml index d2433d2..a8d7928 100644 --- a/.config/wallust/wallust.toml +++ b/.config/wallust/wallust.toml @@ -9,7 +9,7 @@ foottheme = { template = "foot-colors-custom.ini", target = "~/.cache/wallust/fo vicinae_dark = { template = "vicinae-dark.toml", target = "~/.cache/wallust/vicinae-dark.toml" } vicinae_light = { template = "vicinae-light.toml", target = "~/.cache/wallust/vicinae-light.toml" } mako = { template = "mako", target = "~/.cache/wallust/mako" } -vis = { template = "vis-theme.lua", target = "~/.cache/wallust/vis-theme.lua" } +vis = { template = "vis-theme.lua", target = "~/.config/vis/themes/wallust.lua" } starship = { template = "starship.toml", target = "~/.config/starship.toml" } niri = { template = "niri.kdl", target = "~/.cache/wallust/niri-theme.kdl" } |
