refactor!: move extras in seperate directories

This commit is contained in:
Folke Lemaitre
2022-09-18 23:51:39 +02:00
parent 11b3130068
commit 1d1d1722e0
45 changed files with 6 additions and 5 deletions

View File

@@ -3,7 +3,7 @@
## name: Tokyo Night Day ## name: Tokyo Night Day
## license: MIT ## license: MIT
## author: Folke Lemaitre ## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_day.conf ## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_day.conf
background #e1e2e7 background #e1e2e7

View File

@@ -3,7 +3,7 @@
## name: Tokyo Night Moon ## name: Tokyo Night Moon
## license: MIT ## license: MIT
## author: Folke Lemaitre ## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_moon.conf ## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_moon.conf
background #222436 background #222436

View File

@@ -3,7 +3,7 @@
## name: Tokyo Night ## name: Tokyo Night
## license: MIT ## license: MIT
## author: Folke Lemaitre ## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_night.conf ## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_night.conf
background #1a1b26 background #1a1b26

View File

@@ -3,7 +3,7 @@
## name: Tokyo Night Storm ## name: Tokyo Night Storm
## license: MIT ## license: MIT
## author: Folke Lemaitre ## author: Folke Lemaitre
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty_tokyonight_storm.conf ## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_storm.conf
background #24283b background #24283b

View File

@@ -2,6 +2,7 @@ local M = {}
local function write(str, fileName) local function write(str, fileName)
print("[write] extra/" .. fileName) print("[write] extra/" .. fileName)
vim.fn.mkdir(vim.fs.dirname("extras/" .. fileName), "p")
local file = io.open("extras/" .. fileName, "w") local file = io.open("extras/" .. fileName, "w")
file:write(str) file:write(str)
file:close() file:close()
@@ -38,7 +39,7 @@ function M.setup()
for style, style_name in pairs(styles) do for style, style_name in pairs(styles) do
config.setup({ style = style }) config.setup({ style = style })
local colors = require("tokyonight.colors").setup({ transform = true }) local colors = require("tokyonight.colors").setup({ transform = true })
local fname = extra .. "_tokyonight_" .. style .. "." .. ext local fname = extra .. "/tokyonight_" .. style .. "." .. ext
colors["_upstream_url"] = "https://github.com/folke/tokyonight.nvim/raw/main/extras/" .. fname colors["_upstream_url"] = "https://github.com/folke/tokyonight.nvim/raw/main/extras/" .. fname
colors["_style_name"] = "Tokyo Night" .. style_name colors["_style_name"] = "Tokyo Night" .. style_name
write(plugin.generate(colors), fname) write(plugin.generate(colors), fname)