feat: bundle Terebi Sunset as a selectable local theme
This commit is contained in:
@@ -11,7 +11,7 @@ DARK_NOTIFY_LOG := $(HOME)/Library/Logs/dark-notify.log
|
||||
CONFIG_MARKER := $(CONFIG_DIR)/.tint-installed-config
|
||||
STATE_MARKER := $(CONFIG_DIR)/.tint-installed-state
|
||||
|
||||
.PHONY: install uninstall
|
||||
.PHONY: install install-schemes uninstall
|
||||
install: default-state.toml config.toml
|
||||
@command -v tinty >/dev/null || { echo "tinty is required" >&2; exit 1; }
|
||||
@command -v dark-notify >/dev/null || { echo "dark-notify is required" >&2; exit 1; }
|
||||
@@ -31,6 +31,7 @@ install: default-state.toml config.toml
|
||||
touch "$(HERDR_CONFIG)" "$(HERDR_MARKER)"; \
|
||||
fi
|
||||
XDG_CONFIG_HOME="$(XDG_CONFIG_HOME)" tinty sync
|
||||
$(MAKE) install-schemes
|
||||
@dark_notify="$$(command -v dark-notify)"; \
|
||||
tinty_dir="$$(dirname "$$(command -v tinty)")"; \
|
||||
printf '%s\n' \
|
||||
@@ -69,9 +70,19 @@ install: default-state.toml config.toml
|
||||
@launchctl bootout "gui/$$(id -u)/$(LAUNCH_AGENT_LABEL)" 2>/dev/null || true
|
||||
launchctl bootstrap "gui/$$(id -u)" "$(LAUNCH_AGENT)"
|
||||
|
||||
install-schemes: schemes/base16/terebi-sunset.yaml
|
||||
@set -e; \
|
||||
data_dir="$$(XDG_CONFIG_HOME="$(XDG_CONFIG_HOME)" tinty config --data-dir-path)"; \
|
||||
mkdir -p "$$data_dir/custom-schemes/base16"; \
|
||||
cp schemes/base16/terebi-sunset.yaml "$$data_dir/custom-schemes/base16/terebi-sunset.yaml"
|
||||
|
||||
uninstall:
|
||||
@launchctl bootout "gui/$$(id -u)/$(LAUNCH_AGENT_LABEL)" 2>/dev/null || true
|
||||
rm -f "$(BIN_DIR)/tint" "$(LAUNCH_AGENT)" "$(DARK_NOTIFY_LOG)"
|
||||
@if command -v tinty >/dev/null; then \
|
||||
data_dir="$$(XDG_CONFIG_HOME="$(XDG_CONFIG_HOME)" tinty config --data-dir-path)" && \
|
||||
rm -f "$$data_dir/custom-schemes/base16/terebi-sunset.yaml"; \
|
||||
fi
|
||||
@if [ -e "$(STATE_MARKER)" ]; then \
|
||||
rm -f "$(CONFIG_DIR)/state.toml" "$(STATE_MARKER)"; \
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user