Skip to content

Commit 61b2a27

Browse files
feat(extras): auto-generate extras (#37)
* add helper functions for auto-generating extras * add alacritty template * small refactor + bug fixes * add wezterm extra * add lazygit extra * add gitui extra * add helix extra * add tilux extra * add textmate extra * add pywal extra * add windows terminal extra * add fish extra * add autogen workflow * move workflow to correct dir * delete extras ahead of auto generation * chore: generate extras --------- Co-authored-by: scottmckendry <[email protected]>
1 parent 03251ad commit 61b2a27

23 files changed

+1566
-27
lines changed

.github/workflows/extras.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Generate Extras
2+
on:
3+
push:
4+
5+
jobs:
6+
generate-extras:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
11+
- name: Install Neovim
12+
uses: rhysd/action-setup-vim@v1
13+
with:
14+
neovim: true
15+
version: stable
16+
17+
- name: Generate Extras
18+
run: |
19+
nvim -u NONE -E -R --headless --cmd "set rtp^=." --cmd "lua require('cyberdream.extra').generate_all_extras()" --cmd qa
20+
21+
- name: Commit changes
22+
uses: stefanzweifel/git-auto-commit-action@v4
23+
with:
24+
commit_message: "chore: generate extras"

extras/alacritty_cyberdream.toml extras/alacritty/cyberdream.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# cyberdream theme for Alacritty
1+
# cyberdream theme for alacritty
22
[[colors.indexed_colors]]
33
color = "0xffbd5e"
44
index = 16

extras/fish/cyberdream.theme

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
# name: 'cyberdream'
22
# url: 'https://github.com/scottmckendry/cyberdream.nvim'
3-
# preferred_background: 16181A
3+
# preferred_background: 16181a
44

55
fish_color_normal ffffff
6-
fish_color_command 52cfff
7-
fish_color_param f2cdcd
6+
fish_color_command 5ef1ff
7+
fish_color_param ffaecf
88
fish_color_keyword 5eff6c
99
fish_color_quote f1ff5e
1010
fish_color_redirection 5ea1ff
1111
fish_color_end bd5eff
12-
fish_color_comment 7f849c
12+
fish_color_comment 7b8496
1313
fish_color_error ff6e5e
14-
fish_color_gray 6c7086
14+
fish_color_gray 7b8496
1515
fish_color_selection --background=3c4048
1616
fish_color_search_match --background=3c4048
1717
fish_color_option f1ff5e
1818
fish_color_operator 5ea1ff
19-
fish_color_escape eba0ac
20-
fish_color_autosuggestion 6c7086
19+
fish_color_escape ffaecf
20+
fish_color_autosuggestion 7b8496
2121
fish_color_cancel ff6e5e
22-
fish_color_cwd f9e2af
23-
fish_color_user 94e2d5
22+
fish_color_cwd ffbd5e
23+
fish_color_user 5ef5d2
2424
fish_color_host 5eff6c
2525
fish_color_host_remote f1ff5e
2626
fish_color_status ff6e5e
27-
fish_pager_color_progress 6c7086
27+
fish_pager_color_progress 7b8496
2828
fish_pager_color_prefix 5ea1ff
2929
fish_pager_color_completion ffffff
30-
fish_pager_color_description 6c7086
30+
fish_pager_color_description 7b8496
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
(
2-
selected_tab: Rgb(5, 241, 255), // bright cyan for highlight
2+
selected_tab: Rgb(94, 241, 255), // bright cyan for highlight
33
command_fg: Rgb(255, 255, 255), // white for commands foreground
44
selection_bg: Rgb(60, 64, 72), // darker grey for selection background
55
selection_fg: Rgb(255, 255, 255), // white for selected text
66
cmdbar_bg: Rgb(22, 24, 26), // very dark grey almost black for command bar background
77
cmdbar_extra_lines_bg: Rgb(22, 24, 26), // very dark grey almost black for extra lines in command bar
8-
disabled_fg: Rgb(128, 135, 162), // a soft grey for disabled elements, adjusted to fit the theme
8+
disabled_fg: Rgb(123, 132, 150), // a soft grey for disabled elements, adjusted to fit the theme
99
diff_line_add: Rgb(94, 255, 108), // vibrant green for added lines
1010
diff_line_delete: Rgb(255, 110, 94), // vibrant red for deleted lines
1111
diff_file_added: Rgb(241, 255, 94), // yellow for added files
12-
diff_file_removed: Rgb(237, 135, 150), // light red for removed files
12+
diff_file_removed: Rgb(255, 94, 160), // light red for removed files
1313
diff_file_moved: Rgb(189, 94, 255), // purple for moved files
1414
diff_file_modified: Rgb(94, 161, 255), // blue for modified files
15-
commit_hash: Rgb(183, 189, 248), // light purplish for commit hashes
16-
commit_time: Rgb(184, 192, 224), // greyish blue for commit time
17-
commit_author: Rgb(125, 196, 228), // soft blue for author
15+
commit_hash: Rgb(222, 174, 255), // light purplish for commit hashes
16+
commit_time: Rgb(108, 146, 202), // greyish blue for commit time
17+
commit_author: Rgb(94, 161, 255), // soft blue for author
1818
danger_fg: Rgb(255, 110, 94), // vibrant red for danger
19-
push_gauge_bg: Rgb(138, 173, 244), // soft blue for push gauge background
20-
push_gauge_fg: Rgb(36, 39, 58), // dark blue for push gauge foreground
21-
tag_fg: Rgb(244, 219, 214), // light pastel pink for tags
22-
branch_fg: Rgb(139, 213, 202) // soft turquoise for branches
19+
push_gauge_bg: Rgb(94, 161, 255), // soft blue for push gauge background
20+
push_gauge_fg: Rgb(62, 97, 145), // dark blue for push gauge foreground
21+
tag_fg: Rgb(255, 174, 207), // light pastel pink for tags
22+
branch_fg: Rgb(94, 245, 210) // soft turquoise for branches
2323
)

extras/helix/cyberdream.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# cyberdream theme for helix
12
"ui.background" = "bg"
23
"ui.text" = "fg"
34
"ui.cursor" = { bg = "fg", fg = "bg" }

extras/lazygit.yml extras/lazygit/cyberdream.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json
2+
# cyberdream theme for lazygit
23
gui:
34
border: rounded
45
theme:
File renamed without changes.
File renamed without changes.

extras/cyberdream.json extras/tilix/cyberdream.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "cyberdream",
33
"comment": "A high-contrast, futuristic & vibrant colourscheme",
4-
"background-color": "#16181A ",
4+
"background-color": "#16181a",
55
"foreground-color": "#ffffff",
6-
"badge-color": "#16181A ",
6+
"badge-color": "#16181a",
77
"bold-color": "#5ef1ff",
88
"cursor-color": "#ffffff",
99
"highlight-background-color": "#3c4048",
@@ -18,7 +18,7 @@
1818
"#5ef1ff",
1919
"#ffffff",
2020
"#3c4048",
21-
"#ff6e5e",
21+
#ff6e5e",
2222
"#5eff6c",
2323
"#f1ff5e",
2424
"#5ea1ff",

extras/wezterm.lua extras/wezterm/cyberdream.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
-- cyberdream theme for wezterm
12
return {
23
foreground = "#ffffff",
34
background = "#16181a",
45

56
cursor_bg = "#ffffff",
6-
cursor_fg = "#000000",
7+
cursor_fg = "#16181a",
78
cursor_border = "#ffffff",
89

910
selection_fg = "#ffffff",

extras/windows_terminal.json extras/windowsterminal/cyberdream.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"background": "#16181A ",
2+
"background": "#16181a",
33
"black": "#16181a",
44
"blue": "#5ea1ff",
55
"brightBlack": "#3c4048",

lua/cyberdream/extra/alacritty.lua

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
local colors = require("cyberdream.colors")
2+
local util = require("cyberdream.util")
3+
4+
local M = {}
5+
6+
--- Format a color for use in allacritty.
7+
--- @param hex string: The hex color to format. Must be in the format "#RRGGBB".
8+
local function format_color(hex)
9+
return "0x" .. string.sub(hex, 2)
10+
end
11+
12+
--- Iterate over the colors in a table and format them.
13+
--- @param t table: The table of colors to format.
14+
local function format_colors(t)
15+
local formatted = {}
16+
for k, v in pairs(t) do
17+
formatted[k] = format_color(v)
18+
end
19+
return formatted
20+
end
21+
22+
--- Generate the theme for alacritty.
23+
--- @param variant string: Variation of the colorscheme to use.
24+
function M.generate(variant)
25+
local t = format_colors(colors[variant])
26+
local template = [==[
27+
# cyberdream theme for alacritty
28+
[[colors.indexed_colors]]
29+
color = "${orange}"
30+
index = 16
31+
32+
[[colors.indexed_colors]]
33+
color = "${red}"
34+
index = 17
35+
36+
[colors.bright]
37+
black = "${bgHighlight}"
38+
blue = "${blue}"
39+
cyan = "${cyan}"
40+
green = "${green}"
41+
magenta = "${purple}"
42+
red = "${red}"
43+
white = "${fg}"
44+
yellow = "${yellow}"
45+
46+
[colors.normal]
47+
black = "${bg}"
48+
blue = "${blue}"
49+
cyan = "${cyan}"
50+
green = "${green}"
51+
magenta = "${purple}"
52+
red = "${red}"
53+
white = "${fg}"
54+
yellow = "${yellow}"
55+
56+
[colors.primary]
57+
background = "${bg}"
58+
foreground = "${fg}"
59+
60+
[colors.selection]
61+
background = "${bgHighlight}"
62+
foreground = "${fg}"
63+
]==]
64+
65+
return util.parse_extra_template(template, t)
66+
end
67+
68+
return M

lua/cyberdream/extra/fish.lua

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
local colors = require("cyberdream.colors")
2+
local util = require("cyberdream.util")
3+
4+
local M = {}
5+
6+
--- Format a color for use in fish.
7+
--- @param hex string: The hex color to format. Must be in the format "#RRGGBB".
8+
local function format_color(hex)
9+
return string.sub(hex, 2)
10+
end
11+
12+
--- Iterate over the colors in a table and format them.
13+
--- @param t table: The table of colors to format.
14+
local function format_colors(t)
15+
local formatted = {}
16+
for k, v in pairs(t) do
17+
formatted[k] = format_color(v)
18+
end
19+
return formatted
20+
end
21+
22+
--- Generate the theme for fish.
23+
--- @param variant string: Variation of the colorscheme to use.
24+
function M.generate(variant)
25+
local t = format_colors(colors[variant])
26+
t.pastel_pink = format_color(util.blend(colors[variant].fg, colors[variant].pink))
27+
t.turquoise = format_color(util.blend(colors[variant].green, colors[variant].cyan, 0.3))
28+
local template = [==[
29+
# name: 'cyberdream'
30+
# url: 'https://github.com/scottmckendry/cyberdream.nvim'
31+
# preferred_background: ${bg}
32+
33+
fish_color_normal ${fg}
34+
fish_color_command ${cyan}
35+
fish_color_param ${pastel_pink}
36+
fish_color_keyword ${green}
37+
fish_color_quote ${yellow}
38+
fish_color_redirection ${blue}
39+
fish_color_end ${purple}
40+
fish_color_comment ${grey}
41+
fish_color_error ${red}
42+
fish_color_gray ${grey}
43+
fish_color_selection --background=${bgHighlight}
44+
fish_color_search_match --background=${bgHighlight}
45+
fish_color_option ${yellow}
46+
fish_color_operator ${blue}
47+
fish_color_escape ${pastel_pink}
48+
fish_color_autosuggestion ${grey}
49+
fish_color_cancel ${red}
50+
fish_color_cwd ${orange}
51+
fish_color_user ${turquoise}
52+
fish_color_host ${green}
53+
fish_color_host_remote ${yellow}
54+
fish_color_status ${red}
55+
fish_pager_color_progress ${grey}
56+
fish_pager_color_prefix ${blue}
57+
fish_pager_color_completion ${fg}
58+
fish_pager_color_description ${grey}
59+
]==]
60+
61+
return util.parse_extra_template(template, t)
62+
end
63+
64+
return M

lua/cyberdream/extra/gitui.lua

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
local colors = require("cyberdream.colors")
2+
local util = require("cyberdream.util")
3+
4+
local M = {}
5+
6+
--- Format a color for use in gitui
7+
--- @param hex string: The hex color to formatted. Must be in the format "#RRGGBB".
8+
local function format_color(hex)
9+
local r = tonumber(string.sub(hex, 2, 3), 16)
10+
local g = tonumber(string.sub(hex, 4, 5), 16)
11+
local b = tonumber(string.sub(hex, 6, 7), 16)
12+
13+
return string.format("%d, %d, %d", r, g, b)
14+
end
15+
16+
--- Iterate over the colors in a table and format them.
17+
--- @param t table: The table of colors to formaunformatted.
18+
local function format_colors(t)
19+
local formatted = {}
20+
for k, v in pairs(t) do
21+
formatted[k] = format_color(v)
22+
end
23+
return formatted
24+
end
25+
26+
--- Generate the theme for gitui
27+
--- @param variant string: Variation of the colorscheme to use.
28+
function M.generate(variant)
29+
local unformatted = colors[variant]
30+
unformatted.light_purple = util.blend(unformatted.fg, unformatted.purple)
31+
unformatted.grey_blue = util.blend(unformatted.grey, unformatted.blue)
32+
unformatted.dark_blue = util.blend(unformatted.bgAlt, unformatted.blue)
33+
unformatted.pastel_pink = util.blend(unformatted.fg, unformatted.pink)
34+
unformatted.turquoise = util.blend(unformatted.green, unformatted.cyan, 0.3)
35+
36+
local t = format_colors(unformatted)
37+
local template = [==[
38+
(
39+
selected_tab: Rgb(${cyan}), // bright cyan for highlight
40+
command_fg: Rgb(${fg}), // white for commands foreground
41+
selection_bg: Rgb(${bgHighlight}), // darker grey for selection background
42+
selection_fg: Rgb(${fg}), // white for selected text
43+
cmdbar_bg: Rgb(${bg}), // very dark grey almost black for command bar background
44+
cmdbar_extra_lines_bg: Rgb(${bg}), // very dark grey almost black for extra lines in command bar
45+
disabled_fg: Rgb(${grey}), // a soft grey for disabled elements, adjusted to fit the theme
46+
diff_line_add: Rgb(${green}), // vibrant green for added lines
47+
diff_line_delete: Rgb(${red}), // vibrant red for deleted lines
48+
diff_file_added: Rgb(${yellow}), // yellow for added files
49+
diff_file_removed: Rgb(${pink}), // light red for removed files
50+
diff_file_moved: Rgb(${purple}), // purple for moved files
51+
diff_file_modified: Rgb(${blue}), // blue for modified files
52+
commit_hash: Rgb(${light_purple}), // light purplish for commit hashes
53+
commit_time: Rgb(${grey_blue}), // greyish blue for commit time
54+
commit_author: Rgb(${blue}), // soft blue for author
55+
danger_fg: Rgb(${red}), // vibrant red for danger
56+
push_gauge_bg: Rgb(${blue}), // soft blue for push gauge background
57+
push_gauge_fg: Rgb(${dark_blue}), // dark blue for push gauge foreground
58+
tag_fg: Rgb(${pastel_pink}), // light pastel pink for tags
59+
branch_fg: Rgb(${turquoise}) // soft turquoise for branches
60+
)
61+
]==]
62+
63+
return util.parse_extra_template(template, t)
64+
end
65+
66+
return M

0 commit comments

Comments
 (0)