Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(extras): add many more extra themes #135

Merged
merged 19 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[default.extend-words]
noice = "noice"
iterm = "iterm"

[files]
extend-exclude = ["CHANGELOG.md"]
51 changes: 51 additions & 0 deletions lua/astrotheme/extras/alacritty.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
local util = require "astrotheme.extras"

local M = {}

--- @param colors AstroThemePalette
function M.generate(colors)
return util.template(
[=[
# AstroTheme Alacritty Colors
# Default colors
[colors.primary]
background = '${ui.base}'
foreground = '${ui.text}'

# Normal colors
[colors.normal]
black = '${term.black}'
red = '${term.red}'
green = '${term.green}'
yellow = '${term.yellow}'
blue = '${term.blue}'
magenta = '${term.purple}'
cyan = '${term.cyan}'
white = '${term.white}'

# Bright colors
[colors.bright]
black = '${term.bright_black}'
red = '${term.bright_red}'
green = '${term.bright_green}'
yellow = '${term.bright_yellow}'
blue = '${term.bright_blue}'
magenta = '${term.bright_purple}'
cyan = '${term.bright_cyan}'
white = '${term.bright_white}'

# Indexed Colors
[[colors.indexed_colors]]
index = 16
color = '${ui.orange}'

[[colors.indexed_colors]]
index = 17
color = '${ui.red}'

]=],
colors
)
end

return M
26 changes: 26 additions & 0 deletions lua/astrotheme/extras/delta.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
local util = require "astrotheme.extras"

local M = {}

--- @param colors AstroThemePalette
function M.generate(colors)
return util.template(
[[
[delta]
minus-style = syntax "${syntax.red}"
minus-non-emph-style = syntax "${syntax.red}"
minus-emph-style = syntax "${ui.red}"
minus-empty-line-marker-style = syntax "${syntax.red}"
line-numbers-minus-style = "syntax.red"
plus-style = syntax "${syntax.green}"
plus-non-emph-style = syntax "${syntax.green}"
plus-emph-style = syntax "${ui.green}"
plus-empty-line-marker-style = syntax "${syntax.green}"
line-numbers-plus-style = "syntax.green"
line-numbers-zero-style = "${ui.base}"
]],
colors
)
end

return M
31 changes: 31 additions & 0 deletions lua/astrotheme/extras/dunst.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
local util = require "astrotheme.extras"

local M = {}

--- @param colors AstroThemePalette
function M.generate(colors)
return util.template(
[[
# ${_style_name} colors for dunst
# For more configuration options see https://github.com/dunst-project/dunst/blob/master/dunstrc

[urgency_low]
background = "${ui.inactive_base}"
foreground = "${syntax.text}"
frame_color = "${ui.border}"

[urgency_normal]
background = "${ui.base}"
foreground = "${syntax.text}"
frame_color = "${ui.border}"

[urgency_critical]
background = "${ui.highlight}"
foreground = "${syntax.red}"
frame_color = "${syntax.red}"
]],
colors
)
end

return M
55 changes: 55 additions & 0 deletions lua/astrotheme/extras/fish.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
local util = require "astrotheme.extras"

local M = {}

--- @param colors AstroThemePalette
function M.generate(colors)
local function normalize_colors(_colors)
local new_colors = {}
for k, v in pairs(_colors) do
new_colors[k] = type(v) == "string" and v:gsub("^#", "") or normalize_colors(v)
end
return new_colors
end
return util.template(
[[
# ${_style_name} Color Palette
set -l foreground ${syntax.text}
set -l selection ${ui.selection}
set -l comment ${syntax.comment}
set -l red ${syntax.red}
set -l orange ${syntax.orange}
set -l yellow ${syntax.yellow}
set -l green ${syntax.green}
set -l purple ${syntax.purple}
set -l cyan ${syntax.cyan}
set -l pink ${syntax.purple}

# Syntax Highlighting Colors
set -g fish_color_normal $foreground
set -g fish_color_command $cyan
set -g fish_color_keyword $pink
set -g fish_color_quote $yellow
set -g fish_color_redirection $foreground
set -g fish_color_end $orange
set -g fish_color_error $red
set -g fish_color_param $purple
set -g fish_color_comment $comment
set -g fish_color_selection --background=$selection
set -g fish_color_search_match --background=$selection
set -g fish_color_operator $green
set -g fish_color_escape $pink
set -g fish_color_autosuggestion $comment

# Completion Pager Colors
set -g fish_pager_color_progress $comment
set -g fish_pager_color_prefix $cyan
set -g fish_pager_color_completion $foreground
set -g fish_pager_color_description $comment
set -g fish_pager_color_selected_background --background=$selection
]],
normalize_colors(colors)
)
end

return M
45 changes: 45 additions & 0 deletions lua/astrotheme/extras/fish_themes.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
local util = require "astrotheme.extras"

local M = {}

--- @param colors AstroThemePalette
function M.generate(colors)
local function normalize_colors(_colors)
local new_colors = {}
for k, v in pairs(_colors) do
new_colors[k] = type(v) == "string" and v:gsub("^#", "") or normalize_colors(v)
end
return new_colors
end
return util.template(
[[
# ${_style_name}

# Syntax Highlighting Colors
fish_color_normal ${syntax.text}
fish_color_command ${syntax.cyan}
fish_color_keyword ${syntax.purple}
fish_color_quote ${syntax.yellow}
fish_color_redirection ${syntax.text}
fish_color_end ${syntax.orange}
fish_color_error ${syntax.red}
fish_color_param ${syntax.purple}
fish_color_comment ${syntax.comment}
fish_color_selection --background=${ui.selection}
fish_color_search_match --background=${ui.selection}
fish_color_operator ${syntax.green}
fish_color_escape ${syntax.purple}
fish_color_autosuggestion ${syntax.comment}

# Completion Pager Colors
fish_pager_color_progress ${syntax.comment}
fish_pager_color_prefix ${syntax.cyan}
fish_pager_color_completion ${syntax.text}
fish_pager_color_description ${syntax.comment}
fish_pager_color_selected_background --background=${ui.selection}
]],
normalize_colors(colors)
)
end

return M
50 changes: 50 additions & 0 deletions lua/astrotheme/extras/foot.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
local util = require "astrotheme.extras"

local M = {}

--- @param colors AstroThemePalette
function M.generate(colors)
local function normalize_colors(_colors)
local new_colors = {}
for k, v in pairs(_colors) do
new_colors[k] = type(v) == "string" and v:gsub("^#", "") or normalize_colors(v)
end
return new_colors
end
return util.template(
[[
[cursor]
color=${syntax.text} ${ui.selection}

[colors]
foreground=${syntax.text}
background=${ui.base}
selection-foreground=${syntax.text}
selection-background=${ui.selection}
urls=${syntax.blue}

regular0=${term.black}
regular1=${term.red}
regular2=${term.green}
regular3=${term.yellow}
regular4=${term.blue}
regular5=${term.purple}
regular6=${term.cyan}
regular7=${term.white}

bright0=${term.bright_black}
bright1=${term.bright_red}
bright2=${term.bright_green}
bright3=${term.bright_yellow}
bright4=${term.bright_blue}
bright5=${term.bright_purple}
bright6=${term.bright_cyan}
bright7=${term.bright_white}

16=${ui.orange}
17=${ui.red}]],
normalize_colors(colors)
)
end

return M
37 changes: 37 additions & 0 deletions lua/astrotheme/extras/gitui.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
local util = require "astrotheme.extras"

local M = {}

--- @param colors AstroThemePalette
function M.generate(colors)
return util.template(
[[
(
selected_tab: Some("${syntax.purple}"),
command_fg: Some("${syntax.comment}"),
selection_bg: Some("${ui.selection}"),
selection_fg: Some("${syntax.cyan}"),
cmdbar_bg: Some("${ui.base}"),
cmdbar_extra_lines_bg: Some("${ui.base}"),
disabled_fg: Some("${syntax.comment}"),
diff_line_add: Some("${syntax.green}"),
diff_line_delete: Some("${syntax.red}"),
diff_file_added: Some("${ui.green}"),
diff_file_removed: Some("${ui.red}"),
diff_file_moved: Some("${ui.purple}"),
diff_file_modified: Some("${ui.yellow}"),
commit_hash: Some("${syntax.purple}"),
commit_time: Some("${syntax.cyan}"),
commit_author: Some("${syntax.green}"),
danger_fg: Some("${ui.red}"),
push_gauge_bg: Some("${ui.base}"),
push_gauge_fg: Some("${syntax.text}"),
tag_fg: Some("${ui.purple}"),
branch_fg: Some("${ui.yellow}")
)
]],
colors
)
end

return M
Loading
Loading