mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[colorschemes] rewrite the buildscript as a makefile
This commit is contained in:
parent
afb70a6ad3
commit
0442601626
12 changed files with 25 additions and 24 deletions
23
colorschemes/Makefile
Normal file
23
colorschemes/Makefile
Normal file
|
@ -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
|
||||
./$< > $@
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue