From b42ad32bf1463af73dc09e67f4393d4b3aadbe3d Mon Sep 17 00:00:00 2001 From: David Thievon Date: Sat, 18 Jan 2025 13:57:12 +0100 Subject: [PATCH] refactor(platforms): minor adjustments and fixes --- lua/nordic/platforms/fish_themes.lua | 4 +-- lua/nordic/platforms/foot.lua | 4 +-- lua/nordic/platforms/iTerm2.lua | 37 +++++++++++++++-------- lua/nordic/platforms/init.lua | 3 +- lua/nordic/platforms/kitty.lua | 4 +-- lua/nordic/platforms/wezterm.lua | 4 +-- lua/nordic/platforms/windows-terminal.lua | 4 +-- platforms/iTerm2/nordic.itermcolors | 33 ++++++++++++++------ 8 files changed, 53 insertions(+), 40 deletions(-) diff --git a/lua/nordic/platforms/fish_themes.lua b/lua/nordic/platforms/fish_themes.lua index 2fc7a4a..49c42c1 100644 --- a/lua/nordic/platforms/fish_themes.lua +++ b/lua/nordic/platforms/fish_themes.lua @@ -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 @@ -36,8 +36,6 @@ fish_pager_color_selected_background --background=${gray2} ]], fishColors ) - - return foot end return M diff --git a/lua/nordic/platforms/foot.lua b/lua/nordic/platforms/foot.lua index 9d864f2..ffb6515 100644 --- a/lua/nordic/platforms/foot.lua +++ b/lua/nordic/platforms/foot.lua @@ -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} @@ -45,8 +45,6 @@ bright7=${white1} ]], footColors ) - - return foot end return M diff --git a/lua/nordic/platforms/iTerm2.lua b/lua/nordic/platforms/iTerm2.lua index 64a2dbd..d12c94c 100644 --- a/lua/nordic/platforms/iTerm2.lua +++ b/lua/nordic/platforms/iTerm2.lua @@ -27,7 +27,7 @@ end local M = {} function M.generate(colors) - local foot = template( + return template( [[ @@ -35,16 +35,16 @@ function M.generate(colors) Ansi 0 Color - Alpha Component - 1 - Blue Component - ${black0.b} - Color Space - sRGB - Green Component - ${black0.g} - Red Component - ${black0.r} + Alpha Component + 1 + Blue Component + ${black0.b} + Color Space + sRGB + Green Component + ${black0.g} + Red Component + ${black0.r} Ansi 1 Color @@ -371,13 +371,24 @@ function M.generate(colors) Red Component ${bg_selected.r} + Tab Color + + Alpha Component + 1 + Blue Component + ${gray0.b} + Color Space + sRGB + Green Component + ${gray0.g} + Red Component + ${gray0.r} + ]], colors ) - - return foot end return M diff --git a/lua/nordic/platforms/init.lua b/lua/nordic/platforms/init.lua index 1e581ca..337e185 100644 --- a/lua/nordic/platforms/init.lua +++ b/lua/nordic/platforms/init.lua @@ -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" }, diff --git a/lua/nordic/platforms/kitty.lua b/lua/nordic/platforms/kitty.lua index 66a2054..ca57ab1 100644 --- a/lua/nordic/platforms/kitty.lua +++ b/lua/nordic/platforms/kitty.lua @@ -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. @@ -50,8 +50,6 @@ color15 ${white1} ]], colors ) - - return foot end return M diff --git a/lua/nordic/platforms/wezterm.lua b/lua/nordic/platforms/wezterm.lua index 161622e..b734090 100644 --- a/lua/nordic/platforms/wezterm.lua +++ b/lua/nordic/platforms/wezterm.lua @@ -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 @@ -42,8 +42,6 @@ brights = [ ]], colors ) - - return foot end return M diff --git a/lua/nordic/platforms/windows-terminal.lua b/lua/nordic/platforms/windows-terminal.lua index c8af586..119617d 100644 --- a/lua/nordic/platforms/windows-terminal.lua +++ b/lua/nordic/platforms/windows-terminal.lua @@ -3,7 +3,7 @@ local U = require('nordic.utils') local M = {} function M.generate(colors) - local foot = U.template( + return U.template( [[ { "name": "Nordic", @@ -40,8 +40,6 @@ function M.generate(colors) ]], colors ) - - return foot end return M diff --git a/platforms/iTerm2/nordic.itermcolors b/platforms/iTerm2/nordic.itermcolors index a9be612..d7f5aaf 100644 --- a/platforms/iTerm2/nordic.itermcolors +++ b/platforms/iTerm2/nordic.itermcolors @@ -4,16 +4,16 @@ Ansi 0 Color - Alpha Component - 1 - Blue Component - 0.1411764705882353 - Color Space - sRGB - Green Component - 0.1137254901960784 - Red Component - 0.0980392156862745 + Alpha Component + 1 + Blue Component + 0.1411764705882353 + Color Space + sRGB + Green Component + 0.1137254901960784 + Red Component + 0.0980392156862745 Ansi 1 Color @@ -340,5 +340,18 @@ Red Component 0.2313725490196079 + Tab Color + + Alpha Component + 1 + Blue Component + 0.2000000000000000 + Color Space + sRGB + Green Component + 0.1607843137254902 + Red Component + 0.1411764705882353 +