feat(theming): add catppuccin, dracula, nord, tokyonight themes
This commit is contained in:
13
internal/theming/assets/catppuccin/lazygit.yml
Normal file
13
internal/theming/assets/catppuccin/lazygit.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
gui:
|
||||||
|
theme:
|
||||||
|
activeBorderColor:
|
||||||
|
- "#f9e2af"
|
||||||
|
- bold
|
||||||
|
inactiveBorderColor:
|
||||||
|
- "#585b70"
|
||||||
|
selectedLineBgColor:
|
||||||
|
- "#313244"
|
||||||
|
cherryPickedCommitFgColor:
|
||||||
|
- "#a6e3a1"
|
||||||
|
defaultFgColor:
|
||||||
|
- "#cdd6f4"
|
||||||
26
internal/theming/assets/catppuccin/starship.toml
Normal file
26
internal/theming/assets/catppuccin/starship.toml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
palette = "catppuccin_mocha"
|
||||||
|
format = """$directory$git_branch$git_status$character"""
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
style = "bold fg:bright-yellow"
|
||||||
|
truncation_length = 3
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
style = "bold fg:bright-green"
|
||||||
|
format = " [$branch]($style) "
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
style = "bold fg:bright-red"
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = "[❯](bold fg:bright-green)"
|
||||||
|
error_symbol = "[❯](bold fg:bright-red)"
|
||||||
|
|
||||||
|
[palettes.catppuccin_mocha]
|
||||||
|
bright-yellow = "#f9e2af"
|
||||||
|
bright-green = "#a6e3a1"
|
||||||
|
bright-red = "#f38ba8"
|
||||||
|
bright-blue = "#89b4fa"
|
||||||
|
bright-purple = "#cba6f7"
|
||||||
|
bright-aqua = "#94e2d5"
|
||||||
|
bright-orange = "#fab387"
|
||||||
2
internal/theming/assets/catppuccin/theme.yaml
Normal file
2
internal/theming/assets/catppuccin/theme.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
display_name: "Catppuccin Mocha"
|
||||||
|
nvchad: "catppuccin"
|
||||||
30
internal/theming/assets/catppuccin/yazi.toml
Normal file
30
internal/theming/assets/catppuccin/yazi.toml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[manager]
|
||||||
|
cwd = { fg = "#f9e2af" }
|
||||||
|
tab_active = { fg = "#1e1e2e", bg = "#f9e2af" }
|
||||||
|
tab_inactive = { fg = "#bac2de", bg = "#313244" }
|
||||||
|
border_symbol = "│"
|
||||||
|
border_style = { fg = "#585b70" }
|
||||||
|
count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" }
|
||||||
|
count_cut = { fg = "#1e1e2e", bg = "#f38ba8" }
|
||||||
|
count_selected = { fg = "#1e1e2e", bg = "#f9e2af" }
|
||||||
|
|
||||||
|
[status]
|
||||||
|
separator_open = ""
|
||||||
|
separator_close = ""
|
||||||
|
mode_normal = { fg = "#1e1e2e", bg = "#a6e3a1", bold = true }
|
||||||
|
mode_select = { fg = "#1e1e2e", bg = "#f9e2af", bold = true }
|
||||||
|
mode_unset = { fg = "#1e1e2e", bg = "#f38ba8", bold = true }
|
||||||
|
progress_label = { fg = "#cdd6f4", bold = true }
|
||||||
|
progress_normal = { fg = "#89b4fa", bg = "#313244" }
|
||||||
|
progress_error = { fg = "#f38ba8", bg = "#313244" }
|
||||||
|
|
||||||
|
[input]
|
||||||
|
border = { fg = "#f9e2af" }
|
||||||
|
title = {}
|
||||||
|
value = {}
|
||||||
|
selected = { reversed = true }
|
||||||
|
|
||||||
|
[select]
|
||||||
|
border = { fg = "#f9e2af" }
|
||||||
|
active = { fg = "#a6e3a1", bold = true }
|
||||||
|
inactive = {}
|
||||||
35
internal/theming/assets/catppuccin/zellij.kdl
Normal file
35
internal/theming/assets/catppuccin/zellij.kdl
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
theme "catppuccin-mocha"
|
||||||
|
default_layout "default"
|
||||||
|
default_mode "normal"
|
||||||
|
pane_frames false
|
||||||
|
simplified_ui true
|
||||||
|
mouse_mode false
|
||||||
|
|
||||||
|
keybinds {
|
||||||
|
shared {
|
||||||
|
bind "Alt h" { MoveFocusOrTab "Left"; }
|
||||||
|
bind "Alt l" { MoveFocusOrTab "Right"; }
|
||||||
|
bind "Alt j" { MoveFocus "Down"; }
|
||||||
|
bind "Alt k" { MoveFocus "Up"; }
|
||||||
|
bind "Alt n" { NewPane "Down"; }
|
||||||
|
bind "Alt v" { NewPane "Right"; }
|
||||||
|
bind "Alt f" { ToggleFloatingPanes; }
|
||||||
|
bind "Alt t" { NewTab; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
themes {
|
||||||
|
catppuccin-mocha {
|
||||||
|
fg "#cdd6f4"
|
||||||
|
bg "#1e1e2e"
|
||||||
|
black "#181825"
|
||||||
|
red "#f38ba8"
|
||||||
|
green "#a6e3a1"
|
||||||
|
yellow "#f9e2af"
|
||||||
|
blue "#89b4fa"
|
||||||
|
magenta "#cba6f7"
|
||||||
|
cyan "#94e2d5"
|
||||||
|
white "#bac2de"
|
||||||
|
orange "#fab387"
|
||||||
|
}
|
||||||
|
}
|
||||||
13
internal/theming/assets/dracula/lazygit.yml
Normal file
13
internal/theming/assets/dracula/lazygit.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
gui:
|
||||||
|
theme:
|
||||||
|
activeBorderColor:
|
||||||
|
- "#f1fa8c"
|
||||||
|
- bold
|
||||||
|
inactiveBorderColor:
|
||||||
|
- "#6272a4"
|
||||||
|
selectedLineBgColor:
|
||||||
|
- "#44475a"
|
||||||
|
cherryPickedCommitFgColor:
|
||||||
|
- "#50fa7b"
|
||||||
|
defaultFgColor:
|
||||||
|
- "#f8f8f2"
|
||||||
26
internal/theming/assets/dracula/starship.toml
Normal file
26
internal/theming/assets/dracula/starship.toml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
palette = "dracula"
|
||||||
|
format = """$directory$git_branch$git_status$character"""
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
style = "bold fg:bright-yellow"
|
||||||
|
truncation_length = 3
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
style = "bold fg:bright-green"
|
||||||
|
format = " [$branch]($style) "
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
style = "bold fg:bright-red"
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = "[❯](bold fg:bright-green)"
|
||||||
|
error_symbol = "[❯](bold fg:bright-red)"
|
||||||
|
|
||||||
|
[palettes.dracula]
|
||||||
|
bright-yellow = "#f1fa8c"
|
||||||
|
bright-green = "#50fa7b"
|
||||||
|
bright-red = "#ff5555"
|
||||||
|
bright-blue = "#bd93f9"
|
||||||
|
bright-purple = "#ff79c6"
|
||||||
|
bright-aqua = "#8be9fd"
|
||||||
|
bright-orange = "#ffb86c"
|
||||||
2
internal/theming/assets/dracula/theme.yaml
Normal file
2
internal/theming/assets/dracula/theme.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
display_name: "Dracula"
|
||||||
|
nvchad: "dracula"
|
||||||
30
internal/theming/assets/dracula/yazi.toml
Normal file
30
internal/theming/assets/dracula/yazi.toml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[manager]
|
||||||
|
cwd = { fg = "#f1fa8c" }
|
||||||
|
tab_active = { fg = "#282a36", bg = "#f1fa8c" }
|
||||||
|
tab_inactive = { fg = "#bfbfbf", bg = "#44475a" }
|
||||||
|
border_symbol = "│"
|
||||||
|
border_style = { fg = "#6272a4" }
|
||||||
|
count_copied = { fg = "#282a36", bg = "#50fa7b" }
|
||||||
|
count_cut = { fg = "#282a36", bg = "#ff5555" }
|
||||||
|
count_selected = { fg = "#282a36", bg = "#f1fa8c" }
|
||||||
|
|
||||||
|
[status]
|
||||||
|
separator_open = ""
|
||||||
|
separator_close = ""
|
||||||
|
mode_normal = { fg = "#282a36", bg = "#50fa7b", bold = true }
|
||||||
|
mode_select = { fg = "#282a36", bg = "#f1fa8c", bold = true }
|
||||||
|
mode_unset = { fg = "#282a36", bg = "#ff5555", bold = true }
|
||||||
|
progress_label = { fg = "#f8f8f2", bold = true }
|
||||||
|
progress_normal = { fg = "#bd93f9", bg = "#44475a" }
|
||||||
|
progress_error = { fg = "#ff5555", bg = "#44475a" }
|
||||||
|
|
||||||
|
[input]
|
||||||
|
border = { fg = "#f1fa8c" }
|
||||||
|
title = {}
|
||||||
|
value = {}
|
||||||
|
selected = { reversed = true }
|
||||||
|
|
||||||
|
[select]
|
||||||
|
border = { fg = "#f1fa8c" }
|
||||||
|
active = { fg = "#50fa7b", bold = true }
|
||||||
|
inactive = {}
|
||||||
35
internal/theming/assets/dracula/zellij.kdl
Normal file
35
internal/theming/assets/dracula/zellij.kdl
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
theme "dracula"
|
||||||
|
default_layout "default"
|
||||||
|
default_mode "normal"
|
||||||
|
pane_frames false
|
||||||
|
simplified_ui true
|
||||||
|
mouse_mode false
|
||||||
|
|
||||||
|
keybinds {
|
||||||
|
shared {
|
||||||
|
bind "Alt h" { MoveFocusOrTab "Left"; }
|
||||||
|
bind "Alt l" { MoveFocusOrTab "Right"; }
|
||||||
|
bind "Alt j" { MoveFocus "Down"; }
|
||||||
|
bind "Alt k" { MoveFocus "Up"; }
|
||||||
|
bind "Alt n" { NewPane "Down"; }
|
||||||
|
bind "Alt v" { NewPane "Right"; }
|
||||||
|
bind "Alt f" { ToggleFloatingPanes; }
|
||||||
|
bind "Alt t" { NewTab; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
themes {
|
||||||
|
dracula {
|
||||||
|
fg "#f8f8f2"
|
||||||
|
bg "#282a36"
|
||||||
|
black "#21222c"
|
||||||
|
red "#ff5555"
|
||||||
|
green "#50fa7b"
|
||||||
|
yellow "#f1fa8c"
|
||||||
|
blue "#bd93f9"
|
||||||
|
magenta "#ff79c6"
|
||||||
|
cyan "#8be9fd"
|
||||||
|
white "#bfbfbf"
|
||||||
|
orange "#ffb86c"
|
||||||
|
}
|
||||||
|
}
|
||||||
13
internal/theming/assets/nord/lazygit.yml
Normal file
13
internal/theming/assets/nord/lazygit.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
gui:
|
||||||
|
theme:
|
||||||
|
activeBorderColor:
|
||||||
|
- "#ebcb8b"
|
||||||
|
- bold
|
||||||
|
inactiveBorderColor:
|
||||||
|
- "#4c566a"
|
||||||
|
selectedLineBgColor:
|
||||||
|
- "#3b4252"
|
||||||
|
cherryPickedCommitFgColor:
|
||||||
|
- "#a3be8c"
|
||||||
|
defaultFgColor:
|
||||||
|
- "#d8dee9"
|
||||||
26
internal/theming/assets/nord/starship.toml
Normal file
26
internal/theming/assets/nord/starship.toml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
palette = "nord"
|
||||||
|
format = """$directory$git_branch$git_status$character"""
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
style = "bold fg:bright-yellow"
|
||||||
|
truncation_length = 3
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
style = "bold fg:bright-green"
|
||||||
|
format = " [$branch]($style) "
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
style = "bold fg:bright-red"
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = "[❯](bold fg:bright-green)"
|
||||||
|
error_symbol = "[❯](bold fg:bright-red)"
|
||||||
|
|
||||||
|
[palettes.nord]
|
||||||
|
bright-yellow = "#ebcb8b"
|
||||||
|
bright-green = "#a3be8c"
|
||||||
|
bright-red = "#bf616a"
|
||||||
|
bright-blue = "#81a1c1"
|
||||||
|
bright-purple = "#b48ead"
|
||||||
|
bright-aqua = "#88c0d0"
|
||||||
|
bright-orange = "#d08770"
|
||||||
2
internal/theming/assets/nord/theme.yaml
Normal file
2
internal/theming/assets/nord/theme.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
display_name: "Nord"
|
||||||
|
nvchad: "nord"
|
||||||
30
internal/theming/assets/nord/yazi.toml
Normal file
30
internal/theming/assets/nord/yazi.toml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[manager]
|
||||||
|
cwd = { fg = "#ebcb8b" }
|
||||||
|
tab_active = { fg = "#2e3440", bg = "#ebcb8b" }
|
||||||
|
tab_inactive = { fg = "#e5e9f0", bg = "#3b4252" }
|
||||||
|
border_symbol = "│"
|
||||||
|
border_style = { fg = "#4c566a" }
|
||||||
|
count_copied = { fg = "#2e3440", bg = "#a3be8c" }
|
||||||
|
count_cut = { fg = "#2e3440", bg = "#bf616a" }
|
||||||
|
count_selected = { fg = "#2e3440", bg = "#ebcb8b" }
|
||||||
|
|
||||||
|
[status]
|
||||||
|
separator_open = ""
|
||||||
|
separator_close = ""
|
||||||
|
mode_normal = { fg = "#2e3440", bg = "#a3be8c", bold = true }
|
||||||
|
mode_select = { fg = "#2e3440", bg = "#ebcb8b", bold = true }
|
||||||
|
mode_unset = { fg = "#2e3440", bg = "#bf616a", bold = true }
|
||||||
|
progress_label = { fg = "#d8dee9", bold = true }
|
||||||
|
progress_normal = { fg = "#81a1c1", bg = "#3b4252" }
|
||||||
|
progress_error = { fg = "#bf616a", bg = "#3b4252" }
|
||||||
|
|
||||||
|
[input]
|
||||||
|
border = { fg = "#ebcb8b" }
|
||||||
|
title = {}
|
||||||
|
value = {}
|
||||||
|
selected = { reversed = true }
|
||||||
|
|
||||||
|
[select]
|
||||||
|
border = { fg = "#ebcb8b" }
|
||||||
|
active = { fg = "#a3be8c", bold = true }
|
||||||
|
inactive = {}
|
||||||
35
internal/theming/assets/nord/zellij.kdl
Normal file
35
internal/theming/assets/nord/zellij.kdl
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
theme "nord"
|
||||||
|
default_layout "default"
|
||||||
|
default_mode "normal"
|
||||||
|
pane_frames false
|
||||||
|
simplified_ui true
|
||||||
|
mouse_mode false
|
||||||
|
|
||||||
|
keybinds {
|
||||||
|
shared {
|
||||||
|
bind "Alt h" { MoveFocusOrTab "Left"; }
|
||||||
|
bind "Alt l" { MoveFocusOrTab "Right"; }
|
||||||
|
bind "Alt j" { MoveFocus "Down"; }
|
||||||
|
bind "Alt k" { MoveFocus "Up"; }
|
||||||
|
bind "Alt n" { NewPane "Down"; }
|
||||||
|
bind "Alt v" { NewPane "Right"; }
|
||||||
|
bind "Alt f" { ToggleFloatingPanes; }
|
||||||
|
bind "Alt t" { NewTab; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
themes {
|
||||||
|
nord {
|
||||||
|
fg "#d8dee9"
|
||||||
|
bg "#2e3440"
|
||||||
|
black "#3b4252"
|
||||||
|
red "#bf616a"
|
||||||
|
green "#a3be8c"
|
||||||
|
yellow "#ebcb8b"
|
||||||
|
blue "#81a1c1"
|
||||||
|
magenta "#b48ead"
|
||||||
|
cyan "#88c0d0"
|
||||||
|
white "#e5e9f0"
|
||||||
|
orange "#d08770"
|
||||||
|
}
|
||||||
|
}
|
||||||
13
internal/theming/assets/tokyonight/lazygit.yml
Normal file
13
internal/theming/assets/tokyonight/lazygit.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
gui:
|
||||||
|
theme:
|
||||||
|
activeBorderColor:
|
||||||
|
- "#e0af68"
|
||||||
|
- bold
|
||||||
|
inactiveBorderColor:
|
||||||
|
- "#3b4261"
|
||||||
|
selectedLineBgColor:
|
||||||
|
- "#283457"
|
||||||
|
cherryPickedCommitFgColor:
|
||||||
|
- "#9ece6a"
|
||||||
|
defaultFgColor:
|
||||||
|
- "#c0caf5"
|
||||||
26
internal/theming/assets/tokyonight/starship.toml
Normal file
26
internal/theming/assets/tokyonight/starship.toml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
palette = "tokyonight"
|
||||||
|
format = """$directory$git_branch$git_status$character"""
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
style = "bold fg:bright-yellow"
|
||||||
|
truncation_length = 3
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
style = "bold fg:bright-green"
|
||||||
|
format = " [$branch]($style) "
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
style = "bold fg:bright-red"
|
||||||
|
|
||||||
|
[character]
|
||||||
|
success_symbol = "[❯](bold fg:bright-green)"
|
||||||
|
error_symbol = "[❯](bold fg:bright-red)"
|
||||||
|
|
||||||
|
[palettes.tokyonight]
|
||||||
|
bright-yellow = "#e0af68"
|
||||||
|
bright-green = "#9ece6a"
|
||||||
|
bright-red = "#f7768e"
|
||||||
|
bright-blue = "#7aa2f7"
|
||||||
|
bright-purple = "#bb9af7"
|
||||||
|
bright-aqua = "#7dcfff"
|
||||||
|
bright-orange = "#ff9e64"
|
||||||
2
internal/theming/assets/tokyonight/theme.yaml
Normal file
2
internal/theming/assets/tokyonight/theme.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
display_name: "Tokyo Night"
|
||||||
|
nvchad: "tokyonight"
|
||||||
30
internal/theming/assets/tokyonight/yazi.toml
Normal file
30
internal/theming/assets/tokyonight/yazi.toml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[manager]
|
||||||
|
cwd = { fg = "#e0af68" }
|
||||||
|
tab_active = { fg = "#1a1b26", bg = "#e0af68" }
|
||||||
|
tab_inactive = { fg = "#a9b1d6", bg = "#283457" }
|
||||||
|
border_symbol = "│"
|
||||||
|
border_style = { fg = "#3b4261" }
|
||||||
|
count_copied = { fg = "#1a1b26", bg = "#9ece6a" }
|
||||||
|
count_cut = { fg = "#1a1b26", bg = "#f7768e" }
|
||||||
|
count_selected = { fg = "#1a1b26", bg = "#e0af68" }
|
||||||
|
|
||||||
|
[status]
|
||||||
|
separator_open = ""
|
||||||
|
separator_close = ""
|
||||||
|
mode_normal = { fg = "#1a1b26", bg = "#9ece6a", bold = true }
|
||||||
|
mode_select = { fg = "#1a1b26", bg = "#e0af68", bold = true }
|
||||||
|
mode_unset = { fg = "#1a1b26", bg = "#f7768e", bold = true }
|
||||||
|
progress_label = { fg = "#c0caf5", bold = true }
|
||||||
|
progress_normal = { fg = "#7aa2f7", bg = "#283457" }
|
||||||
|
progress_error = { fg = "#f7768e", bg = "#283457" }
|
||||||
|
|
||||||
|
[input]
|
||||||
|
border = { fg = "#e0af68" }
|
||||||
|
title = {}
|
||||||
|
value = {}
|
||||||
|
selected = { reversed = true }
|
||||||
|
|
||||||
|
[select]
|
||||||
|
border = { fg = "#e0af68" }
|
||||||
|
active = { fg = "#9ece6a", bold = true }
|
||||||
|
inactive = {}
|
||||||
35
internal/theming/assets/tokyonight/zellij.kdl
Normal file
35
internal/theming/assets/tokyonight/zellij.kdl
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
theme "tokyonight"
|
||||||
|
default_layout "default"
|
||||||
|
default_mode "normal"
|
||||||
|
pane_frames false
|
||||||
|
simplified_ui true
|
||||||
|
mouse_mode false
|
||||||
|
|
||||||
|
keybinds {
|
||||||
|
shared {
|
||||||
|
bind "Alt h" { MoveFocusOrTab "Left"; }
|
||||||
|
bind "Alt l" { MoveFocusOrTab "Right"; }
|
||||||
|
bind "Alt j" { MoveFocus "Down"; }
|
||||||
|
bind "Alt k" { MoveFocus "Up"; }
|
||||||
|
bind "Alt n" { NewPane "Down"; }
|
||||||
|
bind "Alt v" { NewPane "Right"; }
|
||||||
|
bind "Alt f" { ToggleFloatingPanes; }
|
||||||
|
bind "Alt t" { NewTab; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
themes {
|
||||||
|
tokyonight {
|
||||||
|
fg "#c0caf5"
|
||||||
|
bg "#1a1b26"
|
||||||
|
black "#15161e"
|
||||||
|
red "#f7768e"
|
||||||
|
green "#9ece6a"
|
||||||
|
yellow "#e0af68"
|
||||||
|
blue "#7aa2f7"
|
||||||
|
magenta "#bb9af7"
|
||||||
|
cyan "#7dcfff"
|
||||||
|
white "#a9b1d6"
|
||||||
|
orange "#ff9e64"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -148,3 +148,36 @@ func TestApplyNoChadrcIsFine(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestAllFiveThemesPresent(t *testing.T) {
|
||||||
|
want := []string{"catppuccin", "dracula", "gruvbox", "nord", "tokyonight"}
|
||||||
|
themes := List()
|
||||||
|
if len(themes) != len(want) {
|
||||||
|
t.Fatalf("want %d themes, got %d", len(want), len(themes))
|
||||||
|
}
|
||||||
|
for i, id := range want {
|
||||||
|
if themes[i].ID != id {
|
||||||
|
t.Fatalf("themes[%d].ID = %q, want %q", i, themes[i].ID, id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestApplyEachThemeWritesStarship(t *testing.T) {
|
||||||
|
for _, id := range []string{"catppuccin", "dracula", "nord", "tokyonight"} {
|
||||||
|
id := id
|
||||||
|
t.Run(id, func(t *testing.T) {
|
||||||
|
home := t.TempDir()
|
||||||
|
t.Setenv("HOME", home)
|
||||||
|
if err := Apply(config.Config{}, id); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
data, err := os.ReadFile(filepath.Join(home, ".config", "starship.toml"))
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if len(data) == 0 {
|
||||||
|
t.Fatal("empty starship.toml")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user