diff --git a/.github/workflows/extras.yml b/.github/workflows/extras.yml new file mode 100644 index 0000000..0cceb77 --- /dev/null +++ b/.github/workflows/extras.yml @@ -0,0 +1,24 @@ +name: Generate Extras +on: + push: + +jobs: + generate-extras: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install Neovim + uses: rhysd/action-setup-vim@v1 + with: + neovim: true + version: stable + + - name: Generate Extras + run: | + nvim -u NONE -E -R --headless --cmd "set rtp^=." --cmd "lua require('cyberdream.extra').generate_all_extras()" --cmd qa + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "chore: generate extras" diff --git a/extras/alacritty_cyberdream.toml b/extras/alacritty/cyberdream.toml similarity index 94% rename from extras/alacritty_cyberdream.toml rename to extras/alacritty/cyberdream.toml index 0c7b0e1..483299a 100644 --- a/extras/alacritty_cyberdream.toml +++ b/extras/alacritty/cyberdream.toml @@ -1,4 +1,4 @@ -# cyberdream theme for Alacritty +# cyberdream theme for alacritty [[colors.indexed_colors]] color = "0xffbd5e" index = 16 diff --git a/extras/fish/cyberdream.theme b/extras/fish/cyberdream.theme index f5d453b..a76d50d 100644 --- a/extras/fish/cyberdream.theme +++ b/extras/fish/cyberdream.theme @@ -1,30 +1,30 @@ # name: 'cyberdream' # url: 'https://github.com/scottmckendry/cyberdream.nvim' -# preferred_background: 16181A +# preferred_background: 16181a fish_color_normal ffffff -fish_color_command 52cfff -fish_color_param f2cdcd +fish_color_command 5ef1ff +fish_color_param ffaecf fish_color_keyword 5eff6c fish_color_quote f1ff5e fish_color_redirection 5ea1ff fish_color_end bd5eff -fish_color_comment 7f849c +fish_color_comment 7b8496 fish_color_error ff6e5e -fish_color_gray 6c7086 +fish_color_gray 7b8496 fish_color_selection --background=3c4048 fish_color_search_match --background=3c4048 fish_color_option f1ff5e fish_color_operator 5ea1ff -fish_color_escape eba0ac -fish_color_autosuggestion 6c7086 +fish_color_escape ffaecf +fish_color_autosuggestion 7b8496 fish_color_cancel ff6e5e -fish_color_cwd f9e2af -fish_color_user 94e2d5 +fish_color_cwd ffbd5e +fish_color_user 5ef5d2 fish_color_host 5eff6c fish_color_host_remote f1ff5e fish_color_status ff6e5e -fish_pager_color_progress 6c7086 +fish_pager_color_progress 7b8496 fish_pager_color_prefix 5ea1ff fish_pager_color_completion ffffff -fish_pager_color_description 6c7086 +fish_pager_color_description 7b8496 diff --git a/extras/gitui/theme.ron b/extras/gitui/cyberdream.ron similarity index 56% rename from extras/gitui/theme.ron rename to extras/gitui/cyberdream.ron index 9df130c..2f1fb26 100644 --- a/extras/gitui/theme.ron +++ b/extras/gitui/cyberdream.ron @@ -1,23 +1,23 @@ ( - selected_tab: Rgb(5, 241, 255), // bright cyan for highlight + selected_tab: Rgb(94, 241, 255), // bright cyan for highlight command_fg: Rgb(255, 255, 255), // white for commands foreground selection_bg: Rgb(60, 64, 72), // darker grey for selection background selection_fg: Rgb(255, 255, 255), // white for selected text cmdbar_bg: Rgb(22, 24, 26), // very dark grey almost black for command bar background cmdbar_extra_lines_bg: Rgb(22, 24, 26), // very dark grey almost black for extra lines in command bar - disabled_fg: Rgb(128, 135, 162), // a soft grey for disabled elements, adjusted to fit the theme + disabled_fg: Rgb(123, 132, 150), // a soft grey for disabled elements, adjusted to fit the theme diff_line_add: Rgb(94, 255, 108), // vibrant green for added lines diff_line_delete: Rgb(255, 110, 94), // vibrant red for deleted lines diff_file_added: Rgb(241, 255, 94), // yellow for added files - diff_file_removed: Rgb(237, 135, 150), // light red for removed files + diff_file_removed: Rgb(255, 94, 160), // light red for removed files diff_file_moved: Rgb(189, 94, 255), // purple for moved files diff_file_modified: Rgb(94, 161, 255), // blue for modified files - commit_hash: Rgb(183, 189, 248), // light purplish for commit hashes - commit_time: Rgb(184, 192, 224), // greyish blue for commit time - commit_author: Rgb(125, 196, 228), // soft blue for author + commit_hash: Rgb(222, 174, 255), // light purplish for commit hashes + commit_time: Rgb(108, 146, 202), // greyish blue for commit time + commit_author: Rgb(94, 161, 255), // soft blue for author danger_fg: Rgb(255, 110, 94), // vibrant red for danger - push_gauge_bg: Rgb(138, 173, 244), // soft blue for push gauge background - push_gauge_fg: Rgb(36, 39, 58), // dark blue for push gauge foreground - tag_fg: Rgb(244, 219, 214), // light pastel pink for tags - branch_fg: Rgb(139, 213, 202) // soft turquoise for branches + push_gauge_bg: Rgb(94, 161, 255), // soft blue for push gauge background + push_gauge_fg: Rgb(62, 97, 145), // dark blue for push gauge foreground + tag_fg: Rgb(255, 174, 207), // light pastel pink for tags + branch_fg: Rgb(94, 245, 210) // soft turquoise for branches ) diff --git a/extras/helix/cyberdream.toml b/extras/helix/cyberdream.toml index 6d4580c..5050f04 100644 --- a/extras/helix/cyberdream.toml +++ b/extras/helix/cyberdream.toml @@ -1,3 +1,4 @@ +# cyberdream theme for helix "ui.background" = "bg" "ui.text" = "fg" "ui.cursor" = { bg = "fg", fg = "bg" } diff --git a/extras/lazygit.yml b/extras/lazygit/cyberdream.yml similarity index 95% rename from extras/lazygit.yml rename to extras/lazygit/cyberdream.yml index a53f07e..b19c95f 100644 --- a/extras/lazygit.yml +++ b/extras/lazygit/cyberdream.yml @@ -1,4 +1,5 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json +# cyberdream theme for lazygit gui: border: rounded theme: diff --git a/extras/pywal-theme.json b/extras/pywal/cyberdream.json similarity index 100% rename from extras/pywal-theme.json rename to extras/pywal/cyberdream.json diff --git a/extras/cyberdream.tmTheme b/extras/textmate/cyberdream.tmTheme similarity index 100% rename from extras/cyberdream.tmTheme rename to extras/textmate/cyberdream.tmTheme diff --git a/extras/cyberdream.json b/extras/tilix/cyberdream.json similarity index 89% rename from extras/cyberdream.json rename to extras/tilix/cyberdream.json index d3bdd13..b572ea8 100644 --- a/extras/cyberdream.json +++ b/extras/tilix/cyberdream.json @@ -1,9 +1,9 @@ { "name": "cyberdream", "comment": "A high-contrast, futuristic & vibrant colourscheme", - "background-color": "#16181A ", + "background-color": "#16181a", "foreground-color": "#ffffff", - "badge-color": "#16181A ", + "badge-color": "#16181a", "bold-color": "#5ef1ff", "cursor-color": "#ffffff", "highlight-background-color": "#3c4048", @@ -18,7 +18,7 @@ "#5ef1ff", "#ffffff", "#3c4048", - "#ff6e5e", + #ff6e5e", "#5eff6c", "#f1ff5e", "#5ea1ff", diff --git a/extras/wezterm.lua b/extras/wezterm/cyberdream.lua similarity index 89% rename from extras/wezterm.lua rename to extras/wezterm/cyberdream.lua index e4e9b18..2b2e2a1 100644 --- a/extras/wezterm.lua +++ b/extras/wezterm/cyberdream.lua @@ -1,9 +1,10 @@ +-- cyberdream theme for wezterm return { foreground = "#ffffff", background = "#16181a", cursor_bg = "#ffffff", - cursor_fg = "#000000", + cursor_fg = "#16181a", cursor_border = "#ffffff", selection_fg = "#ffffff", diff --git a/extras/windows_terminal.json b/extras/windowsterminal/cyberdream.json similarity index 94% rename from extras/windows_terminal.json rename to extras/windowsterminal/cyberdream.json index 4ff0323..d713c97 100644 --- a/extras/windows_terminal.json +++ b/extras/windowsterminal/cyberdream.json @@ -1,5 +1,5 @@ { - "background": "#16181A ", + "background": "#16181a", "black": "#16181a", "blue": "#5ea1ff", "brightBlack": "#3c4048", diff --git a/lua/cyberdream/extra/alacritty.lua b/lua/cyberdream/extra/alacritty.lua new file mode 100644 index 0000000..f6569bc --- /dev/null +++ b/lua/cyberdream/extra/alacritty.lua @@ -0,0 +1,68 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Format a color for use in allacritty. +--- @param hex string: The hex color to format. Must be in the format "#RRGGBB". +local function format_color(hex) + return "0x" .. string.sub(hex, 2) +end + +--- Iterate over the colors in a table and format them. +--- @param t table: The table of colors to format. +local function format_colors(t) + local formatted = {} + for k, v in pairs(t) do + formatted[k] = format_color(v) + end + return formatted +end + +--- Generate the theme for alacritty. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local t = format_colors(colors[variant]) + local template = [==[ +# cyberdream theme for alacritty +[[colors.indexed_colors]] +color = "${orange}" +index = 16 + +[[colors.indexed_colors]] +color = "${red}" +index = 17 + +[colors.bright] +black = "${bgHighlight}" +blue = "${blue}" +cyan = "${cyan}" +green = "${green}" +magenta = "${purple}" +red = "${red}" +white = "${fg}" +yellow = "${yellow}" + +[colors.normal] +black = "${bg}" +blue = "${blue}" +cyan = "${cyan}" +green = "${green}" +magenta = "${purple}" +red = "${red}" +white = "${fg}" +yellow = "${yellow}" + +[colors.primary] +background = "${bg}" +foreground = "${fg}" + +[colors.selection] +background = "${bgHighlight}" +foreground = "${fg}" +]==] + + return util.parse_extra_template(template, t) +end + +return M diff --git a/lua/cyberdream/extra/fish.lua b/lua/cyberdream/extra/fish.lua new file mode 100644 index 0000000..0856d21 --- /dev/null +++ b/lua/cyberdream/extra/fish.lua @@ -0,0 +1,64 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Format a color for use in fish. +--- @param hex string: The hex color to format. Must be in the format "#RRGGBB". +local function format_color(hex) + return string.sub(hex, 2) +end + +--- Iterate over the colors in a table and format them. +--- @param t table: The table of colors to format. +local function format_colors(t) + local formatted = {} + for k, v in pairs(t) do + formatted[k] = format_color(v) + end + return formatted +end + +--- Generate the theme for fish. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local t = format_colors(colors[variant]) + t.pastel_pink = format_color(util.blend(colors[variant].fg, colors[variant].pink)) + t.turquoise = format_color(util.blend(colors[variant].green, colors[variant].cyan, 0.3)) + local template = [==[ +# name: 'cyberdream' +# url: 'https://github.com/scottmckendry/cyberdream.nvim' +# preferred_background: ${bg} + +fish_color_normal ${fg} +fish_color_command ${cyan} +fish_color_param ${pastel_pink} +fish_color_keyword ${green} +fish_color_quote ${yellow} +fish_color_redirection ${blue} +fish_color_end ${purple} +fish_color_comment ${grey} +fish_color_error ${red} +fish_color_gray ${grey} +fish_color_selection --background=${bgHighlight} +fish_color_search_match --background=${bgHighlight} +fish_color_option ${yellow} +fish_color_operator ${blue} +fish_color_escape ${pastel_pink} +fish_color_autosuggestion ${grey} +fish_color_cancel ${red} +fish_color_cwd ${orange} +fish_color_user ${turquoise} +fish_color_host ${green} +fish_color_host_remote ${yellow} +fish_color_status ${red} +fish_pager_color_progress ${grey} +fish_pager_color_prefix ${blue} +fish_pager_color_completion ${fg} +fish_pager_color_description ${grey} +]==] + + return util.parse_extra_template(template, t) +end + +return M diff --git a/lua/cyberdream/extra/gitui.lua b/lua/cyberdream/extra/gitui.lua new file mode 100644 index 0000000..2cc121b --- /dev/null +++ b/lua/cyberdream/extra/gitui.lua @@ -0,0 +1,66 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Format a color for use in gitui +--- @param hex string: The hex color to formatted. Must be in the format "#RRGGBB". +local function format_color(hex) + local r = tonumber(string.sub(hex, 2, 3), 16) + local g = tonumber(string.sub(hex, 4, 5), 16) + local b = tonumber(string.sub(hex, 6, 7), 16) + + return string.format("%d, %d, %d", r, g, b) +end + +--- Iterate over the colors in a table and format them. +--- @param t table: The table of colors to formaunformatted. +local function format_colors(t) + local formatted = {} + for k, v in pairs(t) do + formatted[k] = format_color(v) + end + return formatted +end + +--- Generate the theme for gitui +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local unformatted = colors[variant] + unformatted.light_purple = util.blend(unformatted.fg, unformatted.purple) + unformatted.grey_blue = util.blend(unformatted.grey, unformatted.blue) + unformatted.dark_blue = util.blend(unformatted.bgAlt, unformatted.blue) + unformatted.pastel_pink = util.blend(unformatted.fg, unformatted.pink) + unformatted.turquoise = util.blend(unformatted.green, unformatted.cyan, 0.3) + + local t = format_colors(unformatted) + local template = [==[ +( + selected_tab: Rgb(${cyan}), // bright cyan for highlight + command_fg: Rgb(${fg}), // white for commands foreground + selection_bg: Rgb(${bgHighlight}), // darker grey for selection background + selection_fg: Rgb(${fg}), // white for selected text + cmdbar_bg: Rgb(${bg}), // very dark grey almost black for command bar background + cmdbar_extra_lines_bg: Rgb(${bg}), // very dark grey almost black for extra lines in command bar + disabled_fg: Rgb(${grey}), // a soft grey for disabled elements, adjusted to fit the theme + diff_line_add: Rgb(${green}), // vibrant green for added lines + diff_line_delete: Rgb(${red}), // vibrant red for deleted lines + diff_file_added: Rgb(${yellow}), // yellow for added files + diff_file_removed: Rgb(${pink}), // light red for removed files + diff_file_moved: Rgb(${purple}), // purple for moved files + diff_file_modified: Rgb(${blue}), // blue for modified files + commit_hash: Rgb(${light_purple}), // light purplish for commit hashes + commit_time: Rgb(${grey_blue}), // greyish blue for commit time + commit_author: Rgb(${blue}), // soft blue for author + danger_fg: Rgb(${red}), // vibrant red for danger + push_gauge_bg: Rgb(${blue}), // soft blue for push gauge background + push_gauge_fg: Rgb(${dark_blue}), // dark blue for push gauge foreground + tag_fg: Rgb(${pastel_pink}), // light pastel pink for tags + branch_fg: Rgb(${turquoise}) // soft turquoise for branches +) +]==] + + return util.parse_extra_template(template, t) +end + +return M diff --git a/lua/cyberdream/extra/helix.lua b/lua/cyberdream/extra/helix.lua new file mode 100644 index 0000000..4957d41 --- /dev/null +++ b/lua/cyberdream/extra/helix.lua @@ -0,0 +1,102 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for helix. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +# cyberdream theme for helix +"ui.background" = "bg" +"ui.text" = "fg" +"ui.cursor" = { bg = "fg", fg = "bg" } +"ui.linenr" = "grey" +"ui.statusline" = { fg = "cyan" } +"ui.selection" = "green" +"ui.selection.primary" = "magenta" + +# Syntax Highlighting for Code +"comment" = { fg = "grey", modifiers = ["italic"] } +"comment.line" = { fg = "grey", modifiers = ["italic"] } +"comment.block" = { fg = "grey", modifiers = ["italic"] } +"comment.documentation" = { fg = "blue", modifiers = ["italic"] } +"keyword" = "orange" +"keyword.control" = "orange" +"keyword.operator" = "pink" +"keyword.function" = "orange" +"type" = "cyan" +"type.builtin" = "cyan" +"function" = "blue" +"function.builtin" = "pink" +"function.method" = "blue" +"variable" = "fg" +"variable.builtin" = "magenta" +"variable.parameter" = "cyan" +"string" = "green" +"string.special" = "pink" +"constant" = "fg" +"constant.builtin" = "red" +"constant.numeric" = "yellow" +"constant.character" = "pink" +"constant.boolean" = "red" +"attribute" = "magenta" +"operator" = "purple" +"tag" = { fg = "purple", modifiers = ["bold"] } +"tag.special" = { fg = "orange", modifiers = ["bold"] } +"namespace" = "purple" +"macro" = "orange" +"label" = "red" + +# Interface specific +"ui.cursorline.primary" = { bg = "bgHighlight" } +"ui.cursorline.secondary" = { bg = "bgAlt" } +"ui.cursorcolumn.primary" = { bg = "bgHighlight" } +"ui.cursorcolumn.secondary" = { bg = "bgAlt" } +"ui.statusline.normal" = { fg = "fg", bg = "bg" } +"ui.statusline.insert" = { fg = "green", bg = "bg" } +"ui.statusline.select" = { fg = "blue", bg = "bg" } +"ui.statusline.command" = { fg = "red", bg = "bg" } +"ui.statusline.visual" = { fg = "purple", bg = "bg" } + +# Diagnostic styles +"warning" = { fg = "yellow", modifiers = ["bold"] } +"error" = { fg = "red", modifiers = ["bold"] } +"info" = { fg = "cyan", modifiers = ["bold"] } +"hint" = { fg = "blue", modifiers = ["bold"] } +"diagnostic.error" = { fg = "red" } +"diagnostic.warning" = { fg = "yellow" } +"diagnostic.info" = { fg = "cyan" } +"diagnostic.hint" = { fg = "blue" } + +# Popups and Menus +"ui.popup" = { fg = "fg", bg = "bg" } +"ui.popup.info" = { fg = "cyan", bg = "bgAlt" } +"ui.menu" = { fg = "fg", bg = "bg" } +"ui.menu.selected" = { fg = "bg", bg = "fg" } + +# Additional overrides +"ui.virtual.whitespace" = "grey" +"ui.virtual.indent-guide" = { fg = "grey", style = "dotted" } + +[palette] +bg = "${bg}" +fg = "${fg}" +grey = "${grey}" +blue = "${blue}" +green = "${green}" +cyan = "${cyan}" +red = "${red}" +yellow = "${yellow}" +magenta = "${magenta}" +pink = "${pink}" +orange = "${orange}" +purple = "${purple}" +bgAlt = "${bgAlt}" +bgHighlight = "${bgHighlight}" +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/init.lua b/lua/cyberdream/extra/init.lua new file mode 100644 index 0000000..67356f5 --- /dev/null +++ b/lua/cyberdream/extra/init.lua @@ -0,0 +1,51 @@ +local M = {} + +M.variants = { default = "default" } + +M.extras = { + alacritty = { extension = "toml", name = "alacritty" }, + fish = { extension = "theme", name = "fish" }, + gitui = { extension = "ron", name = "gitui" }, + helix = { extension = "toml", name = "helix" }, + lazygit = { extension = "yml", name = "lazygit" }, + pywal = { extension = "json", name = "pywal" }, + textmate = { extension = "tmTheme", name = "textmate" }, + tilix = { extension = "json", name = "tilix" }, + wezterm = { extension = "lua", name = "wezterm" }, + windowsterminal = { extension = "json", name = "windowsterminal" }, +} + +--- Create/overwrite a file in the extras directory. +--- @param str string: The string to write to the file. +local function write(str, filename) + print("writing extra: extras/" .. filename) + vim.fn.mkdir(vim.fs.dirname("extras/" .. filename), "p") + local file = io.open("extras/" .. filename, "w") + if file then + file:write(str) + file:close() + else + print("Failed to write to file: extras/" .. filename) + end +end + +--- Generate the extras for a given variant. +--- @param variant string: Variation of the colorscheme to use. Defaults to "default". +local function generate_extras(variant) + local suffix = variant == "default" and "" or "-" .. variant + + for name, extra in pairs(M.extras) do + local extra_module = require("cyberdream.extra." .. name) + local str = extra_module.generate(variant) + write(str, extra.name .. "/" .. "cyberdream" .. suffix .. "." .. extra.extension) + end +end + +--- Generate Extras for all styles. +function M.generate_all_extras() + for variant, _ in pairs(M.variants) do + generate_extras(variant) + end +end + +return M diff --git a/lua/cyberdream/extra/lazygit.lua b/lua/cyberdream/extra/lazygit.lua new file mode 100644 index 0000000..de238fa --- /dev/null +++ b/lua/cyberdream/extra/lazygit.lua @@ -0,0 +1,38 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate the theme for lazygit +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +# yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json +# cyberdream theme for lazygit +gui: + border: rounded + theme: + activeBorderColor: + - "${cyan}" + inactiveBorderColor: + - "${grey}" + searchingActiveBorderColor: + - "${magenta}" + optionsTextColor: + - "${bgHighlight}" + selectedLineBgColor: + - "${bgHighlight}" + cherryPickedCommitBgColor: + - "${bgHighlight}" + cherryPickedCommitFgColor: + - "${pink}" + unstagedChangesColor: + - "${orange}" + defaultFgColor: + - "${fg}" +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/pywal.lua b/lua/cyberdream/extra/pywal.lua new file mode 100644 index 0000000..807fb46 --- /dev/null +++ b/lua/cyberdream/extra/pywal.lua @@ -0,0 +1,42 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for pywal. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +{ + "colors": { + "color0": "${bg}", + "color1": "${red}", + "color2": "${green}", + "color3": "${yellow}", + "color4": "${blue}", + "color5": "${purple}", + "color6": "${cyan}", + "color7": "${fg}", + "color8": "${bgHighlight}", + "color9": "${red}", + "color10": "${green}", + "color11": "${yellow}", + "color12": "${blue}", + "color13": "${purple}", + "color14": "${cyan}", + "color15": "${fg}", + "color16": "${orange}", + "color17": "${red}" + }, + "special": { + "foreground": "${fg}", + "background": "${bg}", + "cursor": "${fg}" + } +} +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/textmate.lua b/lua/cyberdream/extra/textmate.lua new file mode 100644 index 0000000..fe753af --- /dev/null +++ b/lua/cyberdream/extra/textmate.lua @@ -0,0 +1,952 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for textmate. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ + + + + + name + Cyberdream + settings + + + settings + + background + ${bg} + caret + ${fg} + block_caret + ${grey} + foreground + ${fg} + invisibles + ${bg} + lineHighlight + ${bgHighlight} + selection + ${bgHighlight} + findHighlight + ${cyan} + findHighlightForeground + ${bgAlt} + selectionBorder + ${bg} + activeGuide + ${orange} + bracketsForeground + ${pink} + bracketsOptions + underline + bracketContentsForeground + ${fg} + bracketContentsOptions + underline + tagsOptions + stippled_underline + + + + name + Comment + scope + comment + settings + + foreground + ${grey} + fontStyle + + + + + name + String + scope + string + settings + + foreground + ${green} + + + + name + Number + scope + constant.numeric + settings + + foreground + ${fg} + + + + name + Built-in constant + scope + constant.language + settings + + foreground + ${fg} + + + + name + User-defined constant + scope + constant.character, constant.other + settings + + foreground + ${fg} + + + + name + Variable + scope + variable + settings + + fontStyle + + + + + name + Ruby's @variable + scope + variable.other.readwrite.instance + settings + + fontStyle + + foreground + ${orange} + + + + name + String interpolation + scope + constant.character.escaped, constant.character.escape, string source, string source.ruby + settings + + fontStyle + + foreground + #ff5ef1 + + + + name + Ruby Regexp + scope + source.ruby string.regexp.classic.ruby,source.ruby string.regexp.mod-r.ruby + settings + + fontStyle + + foreground + #ff6e5e + + + + name + Keyword + scope + keyword + settings + + foreground + ${orange} + + + + name + Keyword Operator + scope + keyword.operator + settings + + foreground + ${purple} + + + + name + Storage + scope + storage + settings + + fontStyle + + foreground + ${pink} + + + + name + Storage type + scope + storage.type + settings + + fontStyle + italic + foreground + ${cyan} + + + + name + Storage Type Namespace + scope + storage.type.namespace + settings + + fontStyle + italic + foreground + ${purple} + + + + name + Storage Type Class + scope + storage.type.class + settings + + fontStyle + italic + foreground + ${purple} + + + + name + Class name + scope + entity.name.class + settings + + fontStyle + underline + foreground + ${purple} + + + + name + Meta Path + scope + meta.path + settings + + fontStyle + underline + foreground + ${cyan} + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + fontStyle + italic underline + foreground + ${purple} + + + + name + Function name + scope + entity.name.function + settings + + fontStyle + + foreground + ${blue} + + + + name + Function argument + scope + variable.parameter + settings + + fontStyle + italic + foreground + ${purple} + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + + foreground + ${cyan} + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + fontStyle + + foreground + ${cyan} + + + + name + Library function + scope + support.function + settings + + fontStyle + + foreground + ${blue} + + + + name + Library constant + scope + support.constant + settings + + fontStyle + + foreground + ${fg} + + + + name + Library class/type + scope + support.type, support.class + settings + + fontStyle + italic + foreground + ${purple} + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Support Other Namespace + scope + support.other.namespace + settings + + fontStyle + italic + foreground + ${purple} + + + + name + Invalid + scope + invalid + settings + + background + ${pink} + fontStyle + + foreground + ${fg} + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + background + ${purple} + foreground + ${fg} + + + + name + JSON String + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + ${fg} + + + + name + diff.header + scope + meta.diff, meta.diff.header + settings + + foreground + ${grey} + + + + name + diff.deleted + scope + markup.deleted + settings + + foreground + #ff6e5e + + + + name + diff.inserted + scope + markup.inserted + settings + + foreground + ${green} + + + + name + diff.changed + scope + markup.changed + settings + + foreground + ${cyan} + + + + scope + constant.numeric.line-number.find-in-files - match + settings + + foreground + #ff5ef1 + + + + scope + entity.name.filename + settings + + foreground + ${green} + + + + scope + message.error + settings + + foreground + #ff6e5e + + + + name + JSON Punctuation + scope + punctuation.definition.string.begin.json - meta.structure.dictionary.value.json, punctuation.definition.string.end.json - meta.structure.dictionary.value.json + settings + + foreground + ${fg} + + + + name + JSON Structure + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + ${fg} + + + + name + JSON String + scope + meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + ${fg} + + + + name + JSON: 6 deep + scope + meta meta meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + ${pink} + + + + name + JSON: 5 deep + scope + meta meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + #ff5ef1 + + + + name + JSON: 4 deep + scope + meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + ${purple} + + + + name + JSON: 3 deep + scope + meta meta meta meta.structure.dictionary.value string + settings + + foreground + ${blue} + + + + name + JSON: 2 deep + scope + meta meta meta.structure.dictionary.value string + settings + + foreground + ${cyan} + + + + name + JSON: 1 deep + scope + meta meta.structure.dictionary.value string + settings + + foreground + ${orange} + + + + + + name + Markup: strike + scope + markup.strike + settings + + fontStyle + italic + foreground + ${orange} + + + + name + Markup: bold + scope + markup.bold + settings + + fontStyle + bold + foreground + ${orange} + + + + name + Markup: italic + scope + markup.italic + settings + + fontStyle + italic + foreground + ${orange} + + + + name + Markdown: heading + scope + markup.heading + settings + + foreground + ${orange} + + + + name + Markdown: List Items Punctuation + scope + punctuation.definition.list_item.markdown + settings + + foreground + ${pink} + + + + name + Markdown: Blockquote + scope + markup.quote + settings + + fontStyle + italic + foreground + ${fg} + + + + name + Markdown: Blockquote Punctuation + scope + punctuation.definition.blockquote.markdown + settings + + fontStyle + italic + foreground + ${fg} + + + + name + Markdown: Separator + scope + meta.separator + settings + + foreground + ${grey} + + + + name + Markup: raw inline + scope + text.html.markdown markup.raw.inline + settings + + foreground + ${green} + + + + name + Markup: underline + scope + markup.underline + settings + + fontStyle + underline + foreground + ${purple} + + + + name + Markup: Raw block + scope + markup.raw.block + settings + + foreground + ${fg} + + + + name + Markdown: Raw Block fenced source + scope + markup.raw.block.fenced.markdown source + settings + + foreground + ${fg} + + + + name + Markdown: Fenced Bode Block + scope + punctuation.definition.fenced.markdown, variable.language.fenced.markdown + settings + + fontStyle + italic + foreground + ${grey} + + + + name + Markdown: Fenced Language + scope + variable.language.fenced.markdown + settings + + fontStyle + italic + foreground + ${grey} + + + + name + Punctuation Accessor + scope + punctuation.accessor + settings + + foreground + ${pink} + + + + name + Meta Function Return Type + scope + meta.function.return-type + settings + + foreground + ${purple} + + + + name + Punctuation Section Block Begin + scope + punctuation.section.block.begin + settings + + foreground + ${fg} + + + + name + Punctuation Section Block End + scope + punctuation.section.block.end + settings + + foreground + ${fg} + + + + name + Punctuation Section Embedded Begin + scope + punctuation.section.embedded.begin + settings + + foreground + ${pink} + + + + name + Punctuation Section Embedded End + scope + punctuation.section.embedded.end + settings + + foreground + ${pink} + + + + name + Punctuation Separator Namespace + scope + punctuation.separator.namespace + settings + + foreground + ${pink} + + + + name + Variable Function + scope + variable.function + settings + + foreground + ${blue} + + + + name + Variable Other + scope + variable.other + settings + + foreground + ${fg} + + + + name + Variable Language + scope + variable.language + settings + + foreground + ${purple} + + + + name + Entity Name Module Ruby + scope + entity.name.module.ruby + settings + + foreground + ${cyan} + + + + name + Entity Name Constant Ruby + scope + entity.name.constant.ruby + settings + + foreground + ${blue} + + + + name + Support Function Builtin Ruby + scope + support.function.builtin.ruby + settings + + foreground + ${fg} + + + + name + Storage Type Namespace CS + scope + storage.type.namespace.cs + settings + + foreground + ${pink} + + + + name + Entity Name Namespace CS + scope + entity.name.namespace.cs + settings + + foreground + ${cyan} + + + + uuid + 68394a4e-1404-4971-bdfc-81dd7f9d29f6 + colorSpaceName + sRGB + semanticClass + theme.cyberdream + author + Scott McKendry + + +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/tilix.lua b/lua/cyberdream/extra/tilix.lua new file mode 100644 index 0000000..5ac22d1 --- /dev/null +++ b/lua/cyberdream/extra/tilix.lua @@ -0,0 +1,49 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for tilix. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +{ + "name": "cyberdream", + "comment": "A high-contrast, futuristic & vibrant colourscheme", + "background-color": "${bg}", + "foreground-color": "${fg}", + "badge-color": "${bg}", + "bold-color": "${cyan}", + "cursor-color": "${fg}", + "highlight-background-color": "${bgHighlight}", + "highlight-foreground-color": "${fg}", + "palette": [ + "${bg}", + "${red}", + "${green}", + "${yellow}", + "${blue}", + "${purple}", + "${cyan}", + "${fg}", + "${bgHighlight}", + ${red}", + "${green}", + "${yellow}", + "${blue}", + "${purple}", + "${cyan}", + "${fg}" + ], + "use-badge-color": false, + "use-bold-color": false, + "use-cursor-color": true, + "use-highlight-color": true, + "use-theme-colors": false +} +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/wezterm.lua b/lua/cyberdream/extra/wezterm.lua new file mode 100644 index 0000000..bad11eb --- /dev/null +++ b/lua/cyberdream/extra/wezterm.lua @@ -0,0 +1,34 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for wezterm. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +-- cyberdream theme for wezterm +return { + foreground = "${fg}", + background = "${bg}", + + cursor_bg = "${fg}", + cursor_fg = "${bg}", + cursor_border = "${fg}", + + selection_fg = "${fg}", + selection_bg = "${bgHighlight}", + + scrollbar_thumb = "${bg}", + split = "${bg}", + + ansi = { "${bg}", "${red}", "${green}", "${yellow}", "${blue}", "${purple}", "${cyan}", "${fg}" }, + brights = { "${bgHighlight}", "${red}", "${green}", "${yellow}", "${blue}", "${purple}", "${cyan}", "${fg}" }, + indexed = { [16] = "${orange}", [17] = "${red}" }, +} +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/extra/windowsterminal.lua b/lua/cyberdream/extra/windowsterminal.lua new file mode 100644 index 0000000..f9c1248 --- /dev/null +++ b/lua/cyberdream/extra/windowsterminal.lua @@ -0,0 +1,38 @@ +local colors = require("cyberdream.colors") +local util = require("cyberdream.util") + +local M = {} + +--- Generate cyberdream theme for windows terminal. +--- @param variant string: Variation of the colorscheme to use. +function M.generate(variant) + local template = [==[ +{ + "background": "${bg}", + "black": "${bg}", + "blue": "${blue}", + "brightBlack": "${bgHighlight}", + "brightBlue": "${blue}", + "brightCyan": "${cyan}", + "brightGreen": "${green}", + "brightPurple": "${purple}", + "brightRed": "${red}", + "brightWhite": "${fg}", + "brightYellow": "${yellow}", + "cursorColor": "${fg}", + "cyan": "${cyan}", + "foreground": "${fg}", + "green": "${green}", + "name": "cyberdream", + "purple": "${purple}", + "red": "${red}", + "selectionBackground": "${bgHighlight}", + "white": "${fg}", + "yellow": "${yellow}" +} +]==] + + return util.parse_extra_template(template, colors[variant]) +end + +return M diff --git a/lua/cyberdream/util.lua b/lua/cyberdream/util.lua index 4846cc2..7b01f09 100644 --- a/lua/cyberdream/util.lua +++ b/lua/cyberdream/util.lua @@ -64,4 +64,12 @@ function M.blend(color1, color2, weight) return string.format("#%02x%02x%02x", rgb_blended[1], rgb_blended[2], rgb_blended[3]) end +function M.parse_extra_template(template, t) + for k, v in pairs(t) do + template = template:gsub("%${" .. k .. "}", v) + end + + return template +end + return M