mirror of
https://github.com/RGBCube/ThemeNix
synced 2025-07-28 00:47:44 +00:00
Add templates & a slug attribute to themes
This commit is contained in:
parent
813ba52ead
commit
d8ed419eff
256 changed files with 835 additions and 4 deletions
|
@ -24,6 +24,7 @@ def theme-to-nix [
|
|||
} else {
|
||||
$line
|
||||
| str replace "scheme" "name "
|
||||
| str replace "slug" "slug "
|
||||
| str replace '"' ""
|
||||
| str replace '"' ""
|
||||
| str replace ":" " ="
|
||||
|
@ -60,11 +61,11 @@ def main [] {
|
|||
ls base16-schemes
|
||||
| filter { ($in.name | str ends-with ".yml") or ($in.name | str ends-with ".yaml") }
|
||||
| each { |it|
|
||||
let new_path = "themes/" + ($it.name | path basename | split row "." | first) + ".nix"
|
||||
let new_path = "themes/" + ($it.name | path basename | split row "." | first)
|
||||
|
||||
echo $"converting ($it.name) to ($new_path)..."
|
||||
|
||||
theme-to-nix (open $it.name) | save --force $new_path
|
||||
theme-to-nix ({ slug: ($new_path | split row "/" | last) } | merge (open $it.name)) | save --force ($new_path + ".nix")
|
||||
}
|
||||
|
||||
generate-valid-themes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue