Skip to content
Draft
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
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: all
all: colors/yui.vim colors/yui_dark.vim colors/yui_light.vim doc/yui.txt autoload/lightline/colorscheme/yui_dark.vim autoload/lightline/colorscheme/yui.vim alacritty/yui_dark.toml alacritty/yui_dark.yml alacritty/yui_light.yml alacritty/yui_light.toml alacritty/yui_dark_msg.sh alacritty/yui_light_msg.sh fish/yui.fish fish/yui_dark.fish css/yui.css css/yui_light.css css/yui_dark.css html/index.html ghostty/yui_dark ghostty/yui_light
all: colors/yui.vim colors/yui_dark.vim colors/yui_light.vim doc/yui.txt autoload/lightline/colorscheme/yui_dark.vim autoload/lightline/colorscheme/yui.vim alacritty/yui_dark.toml alacritty/yui_dark.yml alacritty/yui_light.yml alacritty/yui_light.toml alacritty/yui_dark_msg.sh alacritty/yui_light_msg.sh fish/yui.fish fish/yui_dark.fish css/yui.css css/yui_light.css css/yui_dark.css html/index.html ghostty/yui_dark ghostty/yui_light warp/yui_light.yaml warp/yui_dark.yaml

lua_path = src/?.lua;src/lib/?.lua
lua_files = $(shell find src)
Expand Down Expand Up @@ -84,6 +84,14 @@ ghostty/yui_light: $(lua_files)
@mkdir -p ghostty
LUA_PATH="$(lua_path)" lua -e 'print(require("main").light.ghostty)' > $@

warp/yui_light.yaml: $(lua_files)
@mkdir -p warp
LUA_PATH="$(lua_path)" lua -e 'print(require("main").light.warp)' > $@

warp/yui_dark.yaml: $(lua_files)
@mkdir -p warp
LUA_PATH="$(lua_path)" lua -e 'print(require("main").dark.warp)' > $@

.PHONY: clean
clean:
@rm -rf colors/ autoload/lightline/ alacritty/ fish/ ghostty/ doc/ css/ html/
@rm -rf colors/ autoload/lightline/ alacritty/ fish/ ghostty/ warp/ doc/ css/ html/
6 changes: 6 additions & 0 deletions src/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ local dsl = require "lib/dsl"
local theme_fns = {
(require "themes/alacritty/theme"),
(require "themes/ghostty/theme"),
(require "themes/warp/theme"),
(require "themes/lightline/theme"),
(require "themes/fish/theme"),
(require "themes/css/theme"),
Expand Down Expand Up @@ -97,6 +98,10 @@ return {
),
fish = require "themes/fish/template"(kv.light),
ghostty = require "themes/ghostty/template"(kv.light),
warp = require "themes/warp/template"(
kv.light,
context.light.theme_name
),
},
dark = {
nvim = require "themes/nvim/template"(kv.dark, context.dark.theme_name),
Expand All @@ -112,5 +117,6 @@ return {
),
fish = require "themes/fish/template"(kv.dark),
ghostty = require "themes/ghostty/template"(kv.dark),
warp = require "themes/warp/template"(kv.dark, context.dark.theme_name),
},
}
36 changes: 36 additions & 0 deletions src/themes/warp/template.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
local interpolate = require("lib/strings").interpolate
local merge = require("lib/table").merge

-- Keys are alphabetical, matching the layout Warp writes itself.
return function(colors, name)
return interpolate(
[[
accent: "${warp_accent}"
background: "${warp_background}"
cursor: "${warp_cursor}"
details: ${warp_details}
foreground: "${warp_foreground}"
name: "${theme_name}"
terminal_colors:
bright:
black: "${warp_bright_black}"
blue: "${warp_bright_blue}"
cyan: "${warp_bright_cyan}"
green: "${warp_bright_green}"
magenta: "${warp_bright_magenta}"
red: "${warp_bright_red}"
white: "${warp_bright_white}"
yellow: "${warp_bright_yellow}"
normal:
black: "${warp_normal_black}"
blue: "${warp_normal_blue}"
cyan: "${warp_normal_cyan}"
green: "${warp_normal_green}"
magenta: "${warp_normal_magenta}"
red: "${warp_normal_red}"
white: "${warp_normal_white}"
yellow: "${warp_normal_yellow}"
]],
merge(colors, { theme_name = name })
)
end
35 changes: 35 additions & 0 deletions src/themes/warp/theme.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-- Warp reads 'details' to decide whether its own chrome sits lighter or
-- darker than the terminal background, so it tracks the variant, not a color.
local function gen_variant(context, dsl, details)
local get = dsl.get
return {
warp_details = details,
warp_accent = context.accent.fg_normal,
warp_background = get { "Normal", "guibg" },
warp_foreground = get { "Normal", "guifg" },
warp_cursor = context.accent.fg_normal,
warp_normal_black = get { "TermBlack" },
warp_normal_red = get { "TermRed" },
warp_normal_green = get { "TermGreen" },
warp_normal_yellow = get { "TermYellow" },
warp_normal_blue = get { "TermBlue" },
warp_normal_magenta = get { "TermPurple" },
warp_normal_cyan = get { "TermCyan" },
warp_normal_white = get { "TermWhite" },
warp_bright_black = get { "TermBrightBlack" },
warp_bright_red = get { "TermBrightRed" },
warp_bright_green = get { "TermBrightGreen" },
warp_bright_yellow = get { "TermBrightYellow" },
warp_bright_blue = get { "TermBrightBlue" },
warp_bright_magenta = get { "TermBrightPurple" },
warp_bright_cyan = get { "TermBrightCyan" },
warp_bright_white = get { "TermBrightWhite" },
}
end

return function(context, dsl)
return {
light = gen_variant(context.light, dsl, "lighter"),
dark = gen_variant(context.dark, dsl, "darker"),
}
end
26 changes: 26 additions & 0 deletions warp/yui_dark.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
accent: "#E66F51"
background: "#1F1F29"
cursor: "#E66F51"
details: darker
foreground: "#aaaab5"
name: "yui_dark"
terminal_colors:
bright:
black: "#46404a"
blue: "#69aafd"
cyan: "#18c6ce"
green: "#70cf92"
magenta: "#b5a0ff"
red: "#F55661"
white: "#f5f5f5"
yellow: "#cfb787"
normal:
black: "#bbbbbb"
blue: "#69aafd"
cyan: "#18c6ce"
green: "#70cf92"
magenta: "#b5a0ff"
red: "#F55661"
white: "#f5f5f5"
yellow: "#cfb787"

26 changes: 26 additions & 0 deletions warp/yui_light.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
accent: "#C43E1C"
background: "#F1EDED"
cursor: "#C43E1C"
details: lighter
foreground: "#3D3C44"
name: "yui"
terminal_colors:
bright:
black: "#c9babf"
blue: "#3856d1"
cyan: "#2c6a73"
green: "#346e27"
magenta: "#8f35bd"
red: "#B22E32"
white: "#909098"
yellow: "#b17900"
normal:
black: "#3D3C44"
blue: "#3856d1"
cyan: "#2c6a73"
green: "#346e27"
magenta: "#8f35bd"
red: "#B22E32"
white: "#909098"
yellow: "#b17900"