Skip to content

Commit

Permalink
feat(extra): add warp terminal to the extras
Browse files Browse the repository at this point in the history
  • Loading branch information
pauchiner committed Feb 12, 2024
1 parent 008e430 commit fcbef3d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/pastelnight/extra/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ M.extras = {
fish = { ext = "fish", url = "https://fishshell.com/docs/current/index.html", label = "Fish" },
fish_themes = { ext = "theme", url = "https://fishshell.com/docs/current/interactive.html#syntax-highlighting", label = "Fish Themes" },
alacritty = { ext = "yml", url = "https://github.com/alacritty/alacritty", label = "Alacritty" },
warp = { ext = "yaml", url = "https://docs.warp.dev/appearance/custom-themes", label = "Warp" },
wezterm = { ext = "toml", url = "https://wezfurlong.org/wezterm/config/files.html", label = "WezTerm" },
tmux = { ext = "tmux", url = "https://github.com/tmux/tmux/wiki", label = "Tmux" },
xresources = { ext = "Xresources", url = "https://wiki.archlinux.org/title/X_resources", label = "Xresources" },
Expand Down
46 changes: 46 additions & 0 deletions lua/pastelnight/extra/warp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
local util = require('pastelnight.util')

local M = {}

--- @param colors ColorScheme
function M.generate(colors)
local warpColors = {}
for k, v in pairs(colors) do
if type(v) == 'string' then
warpColors[k] = v:gsub('^#', '0x')
end
end

local warp = util.template(
[[
accent: '${purple}'
background: '${bg}'
details: darker
foreground: '${fg}'
terminal_colors:
bright:
black: '${base900}'
blue: '${blue}'
cyan: '${sky}'
green: '${green}'
magenta: '${purple}'
red: '${red}'
white: '${base50}'
yellow: '${yellow}'
normal:
black: '${black}'
blue: '${blue}'
cyan: '${sky}'
green: '${green}'
magenta: '${purple}'
red: '${red}'
white: '${fg}'
yellow: '${yellow}'
]],
warpColors
)

return warp
end

return M

0 comments on commit fcbef3d

Please sign in to comment.