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 7ad63d3 commit b42ad32
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 40 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
37 changes: 24 additions & 13 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 @@ -371,13 +371,24 @@ function M.generate(colors)
<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
33 changes: 23 additions & 10 deletions platforms/iTerm2/nordic.itermcolors
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.1411764705882353</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.1137254901960784</real>
<key>Red Component</key>
<real>0.0980392156862745</real>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.1411764705882353</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.1137254901960784</real>
<key>Red Component</key>
<real>0.0980392156862745</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
Expand Down Expand Up @@ -340,5 +340,18 @@
<key>Red Component</key>
<real>0.2313725490196079</real>
</dict>
<key>Tab Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.2000000000000000</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.1607843137254902</real>
<key>Red Component</key>
<real>0.1411764705882353</real>
</dict>
</dict>
</plist>

0 comments on commit b42ad32

Please sign in to comment.