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,33 +0,0 @@
[colors]
[colors.normal]
black = "#72696a"
red = "#fd6883"
green = "#adda78"
yellow = "#f9cc6c"
blue = "#f38d70"
magenta = "#a8a9eb"
cyan = "#85dacc"
white = "#e6d9db"
[colors.bright]
black = "#948a8b"
red = "#ff8297"
green = "#c8e292"
yellow = "#fcd675"
blue = "#f8a788"
magenta = "#bebffd"
cyan = "#9bf1e1"
white = "#f1e5e7"
[colors.cursor]
cursor = '#c3b7b8'
text = '#2c2525'
[colors.primary]
background = '#2c2525'
foreground = '#e6d9db'
[colors.selection]
background = '#403e41'
text = '#e6d9db'

View File

@@ -0,0 +1,26 @@
accent = "#f38d70"
active_border_color = "#e6d9db"
active_tab_background = "#f9cc6c"
cursor = "#c3b7b8"
foreground = "#e6d9db"
background = "#2c2525"
selection_foreground = "#e6d9db"
selection_background = "#403e41"
color0 = "#72696a"
color1 = "#fd6883"
color2 = "#adda78"
color3 = "#f9cc6c"
color4 = "#f38d70"
color5 = "#a8a9eb"
color6 = "#85dacc"
color7 = "#e6d9db"
color8 = "#948a8b"
color9 = "#ff8297"
color10 = "#c8e292"
color11 = "#fcd675"
color12 = "#f8a788"
color13 = "#bebffd"
color14 = "#9bf1e1"
color15 = "#f1e5e7"

View File

@@ -1,2 +0,0 @@
theme = Monokai Pro Ristretto
cursor-text = #000000

View File

@@ -1,94 +0,0 @@
@define-color foreground #e6d9db;
@define-color background #2c2525;
@define-color accent #f9cc6c;
@define-color muted #948a8b;
@define-color card_bg #403e41;
@define-color text_dark #2c2525;
@define-color accent_hover #fcd675;
@define-color selected_tab #f9cc6c;
@define-color text #e6d9db;
* {
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,9 +0,0 @@
$activeBorderColor = rgb(e6d9db)
general {
col.active_border = $activeBorderColor
}
group {
col.border_active = $activeBorderColor
}

View File

@@ -1,5 +0,0 @@
$color = rgba(44,37,37,1.0)
$inner_color = rgba(44,37,37,0.8)
$outer_color = rgba(230,217,219,1.0)
$font_color = rgba(230,217,219,1.0)
$check_color = rgba(253,104,131,1.0)

View File

@@ -1,53 +0,0 @@
## name : Ristretto
foreground #e6d9db
background #2c2525
selection_foreground #e6d9db
selection_background #403e41
cursor #c3b7b8
cursor_text_color #c3b7b8
url_color #e6d9db
active_border_color #e6d9db
inactive_border_color #595959
bell_border_color #595959
active_tab_foreground #2c2525
active_tab_background #f9cc6c
inactive_tab_foreground #e6d9db
inactive_tab_background #2c2525
tab_bar_background #404040
mark1_foreground #2c2525
mark1_background #404040
mark2_foreground #2c2525
mark2_background #2c2525
mark3_foreground #2c2525
mark3_background #a6a6a6
color0 #72696a
color8 #948a8b
color1 #fd6883
color9 #ff8297
color2 #adda78
color10 #c8e292
color3 #f9cc6c
color11 #fcd675
color4 #f38d70
color12 #f8a788
color5 #a8a9eb
color13 #bebffd
color6 #85dacc
color14 #9bf1e1
color7 #e6d9db
color15 #f1e5e7

View File

@@ -1,5 +0,0 @@
include=~/.local/share/omarchy/default/mako/core.ini
text-color=#e6d9db
border-color=#e6d9db
background-color=#2c2525

View File

@@ -1,5 +0,0 @@
@define-color background-color #2c2525;
@define-color border-color #c3b7b8;
@define-color label #c3b7b8;
@define-color image #c3b7b8;
@define-color progress #c3b7b8;

View File

@@ -1,6 +0,0 @@
@define-color selected-text #fabd2f;
@define-color text #e6d9db;
@define-color base #2c2525;
@define-color border #e6d9db;
@define-color foreground #e6d9db;
@define-color background #2c2525;

View File

@@ -1,2 +0,0 @@
@define-color foreground #e6d9db;
@define-color background #2c2525;