diff --git a/colorschemes/Makefile b/colorschemes/Makefile new file mode 100644 index 0000000..8d90804 --- /dev/null +++ b/colorschemes/Makefile @@ -0,0 +1,23 @@ +# https://tech.davis-hansson.com/p/make/ +SHELL := bash +.ONESHELL: +.SHELLFLAGS := -eu -o pipefail -c +.DELETE_ON_ERROR: +MAKEFLAGS += --warn-undefined-variables +MAKEFLAGS += --no-builtin-rules + +.PHONY: all clean + +OUT_DIR := out +OUT_FILES := iterm.itermcolors kitty.conf vim.vim setvtrgb.txt zsh.zsh termux.properties + +all: $(OUT_DIR) $(addprefix $(OUT_DIR)/,$(OUT_FILES)) + +clean: + rm -rv out + +out: + mkdir -p $@ + +$(OUT_DIR)/%: %.py + ./$< > $@ diff --git a/colorschemes/build.sh b/colorschemes/build.sh deleted file mode 100755 index 2c504f8..0000000 --- a/colorschemes/build.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cd "$(dirname "${BASH_SOURCE[0]}")" - -mkdir -p out - -declare -A apps=( - [iterm]=itermcolors - [kitty]=conf - [nvim]=vim - [setvtrgb]=txt - [shell]=zsh - [termux]=properties -) - -for app in "${!apps[@]}"; do - output_file="$app.${apps[$app]}" - echo "$output_file" - ./"$app".py > ./out/"$output_file" -done diff --git a/colorschemes/iterm.py b/colorschemes/iterm.itermcolors.py similarity index 100% rename from colorschemes/iterm.py rename to colorschemes/iterm.itermcolors.py diff --git a/colorschemes/kitty.py b/colorschemes/kitty.conf.py similarity index 100% rename from colorschemes/kitty.py rename to colorschemes/kitty.conf.py diff --git a/colorschemes/out/nvim.vim b/colorschemes/out/vim.vim similarity index 100% rename from colorschemes/out/nvim.vim rename to colorschemes/out/vim.vim diff --git a/colorschemes/out/shell.zsh b/colorschemes/out/zsh.zsh similarity index 100% rename from colorschemes/out/shell.zsh rename to colorschemes/out/zsh.zsh diff --git a/colorschemes/setvtrgb.py b/colorschemes/setvtrgb.txt.py similarity index 100% rename from colorschemes/setvtrgb.py rename to colorschemes/setvtrgb.txt.py diff --git a/colorschemes/termux.py b/colorschemes/termux.properties.py similarity index 100% rename from colorschemes/termux.py rename to colorschemes/termux.properties.py diff --git a/colorschemes/nvim.py b/colorschemes/vim.vim.py similarity index 100% rename from colorschemes/nvim.py rename to colorschemes/vim.vim.py diff --git a/colorschemes/shell.py b/colorschemes/zsh.zsh.py similarity index 100% rename from colorschemes/shell.py rename to colorschemes/zsh.zsh.py diff --git a/nvim/colors/dotfiles.vim b/nvim/colors/dotfiles.vim index b418764..07ccfca 100644 --- a/nvim/colors/dotfiles.vim +++ b/nvim/colors/dotfiles.vim @@ -3,7 +3,7 @@ " Color definitions {{{ - execute 'source' fnameescape(g:nvim_dotfiles_dir.'/../colorschemes/out/nvim.vim') + execute 'source' fnameescape(g:nvim_dotfiles_dir.'/../colorschemes/out/vim.vim') if !&termguicolors && exists('$_COLORSCHEME_TERMINAL') set notermguicolors diff --git a/zsh/colorscheme.zsh b/zsh/colorscheme.zsh index 73f5275..bd4d4a4 100644 --- a/zsh/colorscheme.zsh +++ b/zsh/colorscheme.zsh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # partially based on https://github.com/chriskempson/base16-shell/blob/master/templates/default.mustache -source "$ZSH_DOTFILES/../colorschemes/out/shell.zsh" +source "$ZSH_DOTFILES/../colorschemes/out/zsh.zsh" if [[ -n "$TMUX" ]]; then # tmux