-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
1 parent
03251ad
commit 61b2a27
Showing
23 changed files
with
1,566 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
2 changes: 1 addition & 1 deletion
2
extras/alacritty_cyberdream.toml → extras/alacritty/cyberdream.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# cyberdream theme for helix | ||
"ui.background" = "bg" | ||
"ui.text" = "fg" | ||
"ui.cursor" = { bg = "fg", fg = "bg" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
extras/windows_terminal.json → extras/windowsterminal/cyberdream.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.