Use theme config templates with singular color definition (#4053)

* Attempt to templaterize the theme specific files

* Cleanup

* Slim down

* Combine render into -set

* Pull out the dynamic template rendering again, but simpler

* Fix vars

* Variables are lowercase

* Better presentation

* Fix missing colors

* Provide stripped values too

* Fix colors for regular hex format

* Bring back explicit btop themes

They're too involved to derive from a basic color set

* Make an atomic swap of the theme directories

* No longer used by walker to cancel

* Explain why

* Remove redundant const

* Consistent const naming

* No longe have $THEMES_DIR

* Correct the blue

* Set opencode colors too

* Fix colors for readability

* Move the templates together with the others in default

* Split user themes and default themes

* Fix paths

* Look for both user themes and default themes

Plus speed things up

* Migrate to the new setup where default themes live inside omarchy

* Explicitly store the name of the current theme

* Cleanup

* No longer need omarchy-theme-next since themes are now fully rendered, not symlinks

* Get current theme name from the new theme.name file

* Look for user background images in dedicated directory

* Need yq for toml

* Need yq to parse colors.toml

* Look for backgrounds matching the new theme.name

We no longer have symlinks

* Migrate existing user backgrounds to the new proper location

* Install user backgrounds in the correct path

* Fix quoting

* Just rely on the system theme for opencode and get ready for USRSIG2 being available to live reload

* Fix template generation for rgb colors
This commit is contained in:
David Heinemeier Hansson
2026-01-03 18:22:14 -08:00
committed by GitHub
parent de2757466b
commit 4a07b94cb6
174 changed files with 809 additions and 3234 deletions

View File

@@ -1,29 +0,0 @@
[colors]
[colors.primary]
background = '#1a1b26'
foreground = '#a9b1d6'
# Normal colors
[colors.normal]
black = '#32344a'
red = '#f7768e'
green = '#9ece6a'
yellow = '#e0af68'
blue = '#7aa2f7'
magenta = '#ad8ee6'
cyan = '#449dab'
white = '#787c99'
# Bright colors
[colors.bright]
black = '#444b6a'
red = '#ff7a93'
green = '#b9f27c'
yellow = '#ff9e64'
blue = '#7da6ff'
magenta = '#bb9af7'
cyan = '#0db9d7'
white = '#acb0d0'
[colors.selection]
background = '#7aa2f7'

View File

@@ -0,0 +1,26 @@
accent = "#7aa2f7"
active_border_color = "#7aa2f7"
active_tab_background = "#7aa2f7"
cursor = "#c0caf5"
foreground = "#a9b1d6"
background = "#1a1b26"
selection_foreground = "#c0caf5"
selection_background = "#7aa2f7"
color0 = "#32344a"
color1 = "#f7768e"
color2 = "#9ece6a"
color3 = "#e0af68"
color4 = "#7aa2f7"
color5 = "#ad8ee6"
color6 = "#449dab"
color7 = "#787c99"
color8 = "#444b6a"
color9 = "#ff7a93"
color10 = "#b9f27c"
color11 = "#ff9e64"
color12 = "#7da6ff"
color13 = "#bb9af7"
color14 = "#0db9d7"
color15 = "#acb0d0"

View File

@@ -1 +0,0 @@
theme = TokyoNight

View File

@@ -1,94 +0,0 @@
@define-color foreground #c0caf5;
@define-color background #1a1b26;
@define-color accent #7aa2f7;
@define-color muted #565f89;
@define-color card_bg #24283b;
@define-color text_dark #15161e;
@define-color accent_hover #9ec1ff;
@define-color selected_tab #7dcfff;
@define-color text #c0caf5;
* {
all: unset;
font-family: JetBrains Mono NF;
color: @foreground;
font-weight: bold;
font-size: 16px;
}
.window {
background: alpha(@background, 0.95);
border: solid 2px @accent;
margin: 4px;
padding: 18px;
}
tabs {
padding: 0.5rem 1rem;
}
tabs > tab {
margin-right: 1rem;
}
.tab-label {
color: @text;
transition: all 0.2s ease;
}
tabs > tab:checked > .tab-label, tabs > tab:active > .tab-label {
text-decoration: underline currentColor;
color: @selected_tab;
}
tabs > tab:focus > .tab-label {
color: @foreground;
}
.page {
padding: 1rem;
}
.image-label {
font-size: 12px;
padding: 0.25rem;
}
flowboxchild > .card, button > .card {
transition: all 0.2s ease;
border: solid 2px transparent;
border-color: @background;
border-radius: 5px;
background-color: @card_bg;
padding: 5px;
}
flowboxchild:hover > .card, button:hover > .card, flowboxchild:active > .card, flowboxchild:selected > .card, button:active > .card, button:selected > .card, button:focus > .card {
border: solid 2px @accent;
}
.image {
border-radius: 5px;
}
.region-button {
padding: 0.5rem 1rem;
border-radius: 5px;
background-color: @accent;
color: @text_dark;
transition: all 0.2s ease;
}
.region-button > label {
color: @text_dark;
}
.region-button:not(:disabled):hover, .region-button:not(:disabled):focus {
background-color: @accent_hover;
color: @text_dark;
}
.region-button:disabled {
background-color: @muted;
color: @background;
}

View File

@@ -1,10 +0,0 @@
$activeBorderColor = rgba(33ccffee) rgba(00ff99ee) 45deg
general {
col.active_border = $activeBorderColor
}
group {
col.border_active = $activeBorderColor
}

View File

@@ -1,5 +0,0 @@
$color = rgba(26,27,38,1.0)
$inner_color = rgba(26,27,38,0.8)
$outer_color = rgba(205,214,244,1.0)
$font_color = rgba(205,214,244,1.0)
$check_color = rgba(68, 157, 171, 1.0)

View File

@@ -1,48 +0,0 @@
## name: Tokyo Night
## license: MIT
## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_night.conf
background #1a1b26
foreground #c0caf5
selection_background #283457
selection_foreground #c0caf5
url_color #73daca
cursor #c0caf5
cursor_text_color #1a1b26
# Tabs
active_tab_background #7aa2f7
active_tab_foreground #16161e
inactive_tab_background #292e42
inactive_tab_foreground #545c7e
#tab_bar_background #15161e
# Windows
active_border_color #7aa2f7
inactive_border_color #292e42
# normal
color0 #15161e
color1 #f7768e
color2 #9ece6a
color3 #e0af68
color4 #7aa2f7
color5 #bb9af7
color6 #7dcfff
color7 #a9b1d6
# bright
color8 #414868
color9 #f7768e
color10 #9ece6a
color11 #e0af68
color12 #7aa2f7
color13 #bb9af7
color14 #7dcfff
color15 #c0caf5
# extended colors
color16 #ff9e64
color17 #db4b4b

View File

@@ -1,5 +0,0 @@
include=~/.local/share/omarchy/default/mako/core.ini
text-color=#c0caf5
border-color=#33ccff
background-color=#1a1b26

View File

@@ -1,6 +0,0 @@
@define-color background-color #1a1b26;
@define-color border-color #33ccff;
@define-color label #a9b1d6;
@define-color image #a9b1d6;
@define-color progress #a9b1d6;

View File

@@ -1,6 +0,0 @@
@define-color selected-text #7dcfff;
@define-color text #cfc9c2;
@define-color base #1a1b26;
@define-color border #33ccff;
@define-color foreground #cfc9c2;
@define-color background #1a1b26;

View File

@@ -1,2 +0,0 @@
@define-color foreground #cdd6f4;
@define-color background #1a1b26;