Skip to content

Commit

Permalink
refactor(platforms): minor adjustments and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DOD-101 committed Jan 18, 2025
1 parent 7a59d74 commit 04890a8
Show file tree
Hide file tree
Showing 8 changed files with 275 additions and 262 deletions.
4 changes: 1 addition & 3 deletions lua/nordic/platforms/fish_themes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local M = {}
function M.generate(colors)
local fishColors = U.removeHash(colors)

local foot = U.template(
return U.template(
[[
# Name: Nordic
# Auother: XXiaoA
Expand Down Expand Up @@ -36,8 +36,6 @@ fish_pager_color_selected_background --background=${gray2}
]],
fishColors
)

return foot
end

return M
4 changes: 1 addition & 3 deletions lua/nordic/platforms/foot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local M = {}
function M.generate(colors)
local footColors = U.removeHash(colors)

local foot = U.template(
return U.template(
[[
[colors]
foreground=${fg}
Expand Down Expand Up @@ -45,8 +45,6 @@ bright7=${white1}
]],
footColors
)

return foot
end

return M
259 changes: 135 additions & 124 deletions lua/nordic/platforms/iTerm2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@ end
local M = {}

function M.generate(colors)
local foot = template(
return template(
[[
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${black0.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${black0.g}</real>
<key>Red Component</key>
<real>${black0.r}</real>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${black0.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${black0.g}</real>
<key>Red Component</key>
<real>${black0.r}</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
Expand Down Expand Up @@ -260,124 +260,135 @@ function M.generate(colors)
<real>0.5</real>
<key>Blue Component</key>
<real>${blue1.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${blue1.g}</real>
<key>Red Component</key>
<real>${blue1.r}</real>
</dict>
<key>Bold Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${cyan.dim.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${cyan.dim.g}</real>
<key>Red Component</key>
<real>${cyan.dim.r}</real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${fg.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${fg.g}</real>
<key>Red Component</key>
<real>${fg.r}</real>
</dict>
<key>Cursor Guide Color</key>
<dict>
<key>Alpha Component</key>
<real>0.25</real>
<key>Blue Component</key>
<real>${fg.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${fg.g}</real>
<key>Red Component</key>
<real>${fg.r}</real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${bg.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${bg.g}</real>
<key>Red Component</key>
<real>${bg.r}</real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${fg.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${fg.g}</real>
<key>Red Component</key>
<real>${fg.r}</real>
</dict>
<key>Link Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${blue1.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${blue1.g}</real>
<key>Red Component</key>
<real>${blue1.r}</real>
</dict>
<key>Selected Text Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${fg.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${fg.g}</real>
<key>Red Component</key>
<real>${fg.r}</real>
</dict>
<key>Selection Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${bg_selected.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${bg_selected.g}</real>
<key>Red Component</key>
<real>${bg_selected.r}</real>
</dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${blue1.g}</real>
<key>Red Component</key>
<real>${blue1.r}</real>
</dict>
<key>Bold Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${cyan.dim.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${cyan.dim.g}</real>
<key>Red Component</key>
<real>${cyan.dim.r}</real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${fg.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${fg.g}</real>
<key>Red Component</key>
<real>${fg.r}</real>
</dict>
<key>Cursor Guide Color</key>
<dict>
<key>Alpha Component</key>
<real>0.25</real>
<key>Blue Component</key>
<real>${fg.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${fg.g}</real>
<key>Red Component</key>
<real>${fg.r}</real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${bg.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${bg.g}</real>
<key>Red Component</key>
<real>${bg.r}</real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${fg.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${fg.g}</real>
<key>Red Component</key>
<real>${fg.r}</real>
</dict>
<key>Link Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${blue1.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${blue1.g}</real>
<key>Red Component</key>
<real>${blue1.r}</real>
</dict>
<key>Selected Text Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${fg.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${fg.g}</real>
<key>Red Component</key>
<real>${fg.r}</real>
</dict>
<key>Selection Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${bg_selected.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${bg_selected.g}</real>
<key>Red Component</key>
<real>${bg_selected.r}</real>
</dict>
<key>Tab Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>${gray0.b}</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>${gray0.g}</real>
<key>Red Component</key>
<real>${gray0.r}</real>
</dict>
</dict>
</plist>
]],
colors
)

return foot
end

return M
3 changes: 1 addition & 2 deletions lua/nordic/platforms/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ M.platforms = {
-- fish = { ext = "theme", url = "https://fishshell.com/docs/current/index.html" },
fish_themes = { ext = "theme", url = "https://fishshell.com/docs/current/interactive.html#syntax-highlighting" },
foot = { ext = "ini", url = "https://codeberg.org/dnkl/foot" },
iTerm2 = { ext = "itermcolors", url = "https://iterm2.com/" },

iTerm2 = { ext = "itermcolors", url = "https://iterm2.com/" },
kitty = { ext = "conf", url = "https://sw.kovidgoyal.net/kitty/conf.html" },
konsole = { ext = "colorscheme", url = "https://konsole.kde.org/" },
wezterm = { ext = "toml", url = "https://wezfurlong.org/wezterm/config/files.html" },
Expand Down
4 changes: 1 addition & 3 deletions lua/nordic/platforms/kitty.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local U = require('nordic.utils')
local M = {}

function M.generate(colors)
local foot = U.template(
return U.template(
[[
# Nordic Colorscheme for Kitty.
# Based on https://github.com/AlexvZyl/nordic.nvim.
Expand Down Expand Up @@ -50,8 +50,6 @@ color15 ${white1}
]],
colors
)

return foot
end

return M
4 changes: 1 addition & 3 deletions lua/nordic/platforms/wezterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local U = require('nordic.utils')
local M = {}

function M.generate(colors)
local foot = U.template(
return U.template(
[[
# Nordic Colorscheme for Wezterm.
# Based on https://github.com/AlexvZyl/nordic.nvim
Expand Down Expand Up @@ -42,8 +42,6 @@ brights = [
]],
colors
)

return foot
end

return M
4 changes: 1 addition & 3 deletions lua/nordic/platforms/windows-terminal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local U = require('nordic.utils')
local M = {}

function M.generate(colors)
local foot = U.template(
return U.template(
[[
{
"name": "Nordic",
Expand Down Expand Up @@ -40,8 +40,6 @@ function M.generate(colors)
]],
colors
)

return foot
end

return M
Loading

0 comments on commit 04890a8

Please sign in to comment.