per-theme navidown styles
|
|
@ -5,6 +5,7 @@
|
|||
- [Markdown viewer](markdown-viewer.md)
|
||||
- [Image support](image-requirements.md)
|
||||
- [Customization](customization.md)
|
||||
- [Themes](themes.md)
|
||||
- [ruki](ruki/index.md)
|
||||
- [tiki format](tiki-format.md)
|
||||
- [Quick capture](quick-capture.md)
|
||||
|
|
|
|||
79
.doc/doki/doc/themes.md
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
# Themes
|
||||
|
||||
## Setting a theme
|
||||
|
||||
Set the theme in your `config.yaml` under the `appearance` section (see [Configuration](config.md) for file locations and merging rules):
|
||||
|
||||
```yaml
|
||||
appearance:
|
||||
theme: dracula
|
||||
```
|
||||
|
||||
Available values:
|
||||
- `auto` — detects your terminal background and picks `dark` or `light` automatically (default)
|
||||
- `dark`, `light` — built-in base themes
|
||||
- Any named theme listed below
|
||||
|
||||
## Dark themes
|
||||
|
||||
### dark
|
||||
|
||||
The built-in dark base theme. Used by `auto` when a dark terminal background is detected.
|
||||
|
||||

|
||||
|
||||
### dracula
|
||||
|
||||

|
||||
|
||||
### tokyo-night
|
||||
|
||||

|
||||
|
||||
### gruvbox-dark
|
||||
|
||||

|
||||
|
||||
### catppuccin-mocha
|
||||
|
||||

|
||||
|
||||
### solarized-dark
|
||||
|
||||

|
||||
|
||||
### nord
|
||||
|
||||

|
||||
|
||||
### monokai
|
||||
|
||||

|
||||
|
||||
### one-dark
|
||||
|
||||

|
||||
|
||||
## Light themes
|
||||
|
||||
### light
|
||||
|
||||
The built-in light base theme. Used by `auto` when a light terminal background is detected.
|
||||
|
||||

|
||||
|
||||
### catppuccin-latte
|
||||
|
||||

|
||||
|
||||
### solarized-light
|
||||
|
||||

|
||||
|
||||
### gruvbox-light
|
||||
|
||||

|
||||
|
||||
### github-light
|
||||
|
||||

|
||||
BIN
.doc/doki/doc/themes/catppuccin-latte.png
vendored
Normal file
|
After Width: | Height: | Size: 268 KiB |
BIN
.doc/doki/doc/themes/catppuccin-mocha.png
vendored
Normal file
|
After Width: | Height: | Size: 277 KiB |
BIN
.doc/doki/doc/themes/dark.png
vendored
Normal file
|
After Width: | Height: | Size: 272 KiB |
BIN
.doc/doki/doc/themes/dracula.png
vendored
Normal file
|
After Width: | Height: | Size: 283 KiB |
BIN
.doc/doki/doc/themes/github-light.png
vendored
Normal file
|
After Width: | Height: | Size: 268 KiB |
BIN
.doc/doki/doc/themes/gruvbox-dark.png
vendored
Normal file
|
After Width: | Height: | Size: 264 KiB |
BIN
.doc/doki/doc/themes/gruvbox-light.png
vendored
Normal file
|
After Width: | Height: | Size: 268 KiB |
BIN
.doc/doki/doc/themes/light.png
vendored
Normal file
|
After Width: | Height: | Size: 265 KiB |
BIN
.doc/doki/doc/themes/monokai.png
vendored
Normal file
|
After Width: | Height: | Size: 272 KiB |
BIN
.doc/doki/doc/themes/nord.png
vendored
Normal file
|
After Width: | Height: | Size: 243 KiB |
BIN
.doc/doki/doc/themes/one-dark.png
vendored
Normal file
|
After Width: | Height: | Size: 237 KiB |
BIN
.doc/doki/doc/themes/solarized-dark.png
vendored
Normal file
|
After Width: | Height: | Size: 234 KiB |
BIN
.doc/doki/doc/themes/solarized-light.png
vendored
Normal file
|
After Width: | Height: | Size: 239 KiB |
BIN
.doc/doki/doc/themes/tokyo-night.png
vendored
Normal file
|
After Width: | Height: | Size: 260 KiB |
|
|
@ -503,7 +503,7 @@ func SolarizedLightPalette() Palette {
|
|||
// Ref: https://github.com/morhetz/gruvbox
|
||||
func GruvboxLightPalette() Palette {
|
||||
return Palette{
|
||||
HighlightColor: NewColorHex("#b57614"), // dark yellow
|
||||
HighlightColor: NewColorHex("#9d6104"), // dark yellow (deepened for light-bg contrast)
|
||||
TextColor: NewColorHex("#3c3836"), // fg (dark0_hard)
|
||||
TransparentColor: DefaultColor(),
|
||||
MutedColor: NewColorHex("#928374"), // gray
|
||||
|
|
|
|||
|
|
@ -26,18 +26,18 @@ var themeRegistry = map[string]ThemeInfo{
|
|||
// named dark themes
|
||||
"dracula": {Light: false, ChromaTheme: "dracula", NavidownStyle: "dracula", Palette: DraculaPalette},
|
||||
"tokyo-night": {Light: false, ChromaTheme: "tokyonight-night", NavidownStyle: "tokyo-night", Palette: TokyoNightPalette},
|
||||
"gruvbox-dark": {Light: false, ChromaTheme: "gruvbox", NavidownStyle: "dark", Palette: GruvboxDarkPalette},
|
||||
"catppuccin-mocha": {Light: false, ChromaTheme: "catppuccin-mocha", NavidownStyle: "dark", Palette: CatppuccinMochaPalette},
|
||||
"solarized-dark": {Light: false, ChromaTheme: "solarized-dark256", NavidownStyle: "dark", Palette: SolarizedDarkPalette},
|
||||
"nord": {Light: false, ChromaTheme: "nord", NavidownStyle: "dark", Palette: NordPalette},
|
||||
"monokai": {Light: false, ChromaTheme: "monokai", NavidownStyle: "dark", Palette: MonokaiPalette},
|
||||
"one-dark": {Light: false, ChromaTheme: "onedark", NavidownStyle: "dark", Palette: OneDarkPalette},
|
||||
"gruvbox-dark": {Light: false, ChromaTheme: "gruvbox", NavidownStyle: "gruvbox-dark", Palette: GruvboxDarkPalette},
|
||||
"catppuccin-mocha": {Light: false, ChromaTheme: "catppuccin-mocha", NavidownStyle: "catppuccin-mocha", Palette: CatppuccinMochaPalette},
|
||||
"solarized-dark": {Light: false, ChromaTheme: "solarized-dark256", NavidownStyle: "solarized-dark", Palette: SolarizedDarkPalette},
|
||||
"nord": {Light: false, ChromaTheme: "nord", NavidownStyle: "nord", Palette: NordPalette},
|
||||
"monokai": {Light: false, ChromaTheme: "monokai", NavidownStyle: "monokai", Palette: MonokaiPalette},
|
||||
"one-dark": {Light: false, ChromaTheme: "onedark", NavidownStyle: "one-dark", Palette: OneDarkPalette},
|
||||
|
||||
// named light themes
|
||||
"catppuccin-latte": {Light: true, ChromaTheme: "catppuccin-latte", NavidownStyle: "light", Palette: CatppuccinLattePalette},
|
||||
"solarized-light": {Light: true, ChromaTheme: "solarized-light", NavidownStyle: "light", Palette: SolarizedLightPalette},
|
||||
"gruvbox-light": {Light: true, ChromaTheme: "gruvbox-light", NavidownStyle: "light", Palette: GruvboxLightPalette},
|
||||
"github-light": {Light: true, ChromaTheme: "github", NavidownStyle: "light", Palette: GithubLightPalette},
|
||||
"catppuccin-latte": {Light: true, ChromaTheme: "catppuccin-latte", NavidownStyle: "catppuccin-latte", Palette: CatppuccinLattePalette},
|
||||
"solarized-light": {Light: true, ChromaTheme: "solarized-light", NavidownStyle: "solarized-light", Palette: SolarizedLightPalette},
|
||||
"gruvbox-light": {Light: true, ChromaTheme: "gruvbox-light", NavidownStyle: "gruvbox-light", Palette: GruvboxLightPalette},
|
||||
"github-light": {Light: true, ChromaTheme: "github", NavidownStyle: "github-light", Palette: GithubLightPalette},
|
||||
}
|
||||
|
||||
var defaultTheme = themeRegistry["dark"]
|
||||
|
|
|
|||
|
|
@ -97,6 +97,12 @@ func TestNavidownStylesValid(t *testing.T) {
|
|||
"dark": true, "light": true,
|
||||
"dracula": true, "tokyo-night": true,
|
||||
"pink": true, "ascii": true, "notty": true,
|
||||
// additional named themes
|
||||
"gruvbox-dark": true, "catppuccin-mocha": true,
|
||||
"solarized-dark": true, "nord": true,
|
||||
"monokai": true, "one-dark": true,
|
||||
"catppuccin-latte": true, "solarized-light": true,
|
||||
"gruvbox-light": true, "github-light": true,
|
||||
}
|
||||
for name, info := range themeRegistry {
|
||||
if !validNavidown[info.NavidownStyle] {
|
||||
|
|
|
|||
2
go.mod
|
|
@ -82,3 +82,5 @@ require (
|
|||
golang.org/x/text v0.35.0 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
)
|
||||
|
||||
replace github.com/boolean-maybe/navidown => ../navidown
|
||||
|
|
|
|||
2
go.sum
|
|
@ -27,8 +27,6 @@ github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3v
|
|||
github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E=
|
||||
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
|
||||
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
|
||||
github.com/boolean-maybe/navidown v0.4.17 h1:5xlXhgd6/nzjrmQAi0puSuD6p+rbDFJlcJbKhEnU/Nc=
|
||||
github.com/boolean-maybe/navidown v0.4.17/go.mod h1:uF4Z/5uTnEtC6ZWyfKRv5Qw8Nir1nfp4kUraggTRfrk=
|
||||
github.com/catppuccin/go v0.3.0 h1:d+0/YicIq+hSTo5oPuRi5kOpqkVA5tAsU6dNhvRu+aY=
|
||||
github.com/catppuccin/go v0.3.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc=
|
||||
github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 h1:JFgG/xnwFfbezlUnFMJy0nusZvytYysV4SCS2cYbvws=
|
||||
|
|
|
|||