-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
87 lines (64 loc) · 2.68 KB
/
Makefile
File metadata and controls
87 lines (64 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Take from Thorsten Ball's dotfiles: https://github.com/mrnugget/dotfiles
DOTFILE_PATH := $(shell pwd)
$(HOME)/.%: %
ln -sf $(DOTFILE_PATH)/$^ $@
git: $(HOME)/.gitconfig $(HOME)/.githelpers $(HOME)/.gitignore $(HOME)/.gitconfig-enterprise
$(HOME)/.git-completion.bash: git-completion/git-completion.bash
ln -sf $(DOTFILE_PATH)/$^ $@
$(HOME)/.zsh/_git: git-completion/git-completion.zsh
mkdir -p $(HOME)/.zsh
ln -sf $(DOTFILE_PATH)/$^ $@
git-completion: $(HOME)/.git-completion.bash $(HOME)/.zsh/_git
zsh: $(HOME)/.zshrc
# Symlink all scripts
$(HOME)/scripts: scripts/
ln -snf $(DOTFILE_PATH)/$^ $@
@echo "Making all scripts executable..."
chmod +x $(DOTFILE_PATH)/scripts/*
scripts-folder: $(HOME)/scripts
# tmux config and cheat sheet config files
tmux: $(HOME)/.tmux.conf $(HOME)/.tmux-cht-languages $(HOME)/.tmux-cht-commands
# Ghostty mkdir and alias
$(HOME)/.config/ghostty/config:
mkdir -p $(HOME)/.config/ghostty
ln -sf $(DOTFILE_PATH)/ghostty_config $(HOME)/.config/ghostty/config
ghostty: $(HOME)/.config/ghostty/config
# Obsidian Vim.rc file
# Conditionally link to /notes or ~/obsidian/bauen
obsidian:
@if [ -d "$(HOME)/notes" ]; then \
mkdir -p "$(HOME)/notes"; \
ln -sf "$(DOTFILE_PATH)/obsidian.vimrc" "$(HOME)/notes/.obsidian.vimrc"; \
echo "Linked Obsidian vimrc to $(HOME)/notes/.obsidian.vimrc"; \
else \
mkdir -p "$(HOME)/obsidian/bauen"; \
ln -sf "$(DOTFILE_PATH)/obsidian.vimrc" "$(HOME)/obsidian/bauen/.obsidian.vimrc"; \
echo "Linked Obsidian vimrc to $(HOME)/obsidian/bauen/.obsidian.vimrc"; \
fi
# Zed settings files
$(HOME)/.config/zed/settings.json: zed_settings.json
mkdir -p $(HOME)/.config/zed
ln -sf $(DOTFILE_PATH)/$^ $@
$(HOME)/.config/zed/keymap.json: zed_keymap.json
mkdir -p $(HOME)/.config/zed
ln -sf $(DOTFILE_PATH)/$^ $@
zed: $(HOME)/.config/zed/settings.json $(HOME)/.config/zed/keymap.json
# Zen userChrome.css file
# Find path to default profile folder
ZEN_PROFILE_DIR := $(shell find /home/isaac/.zen -type d -name "chrome" -o -type d -name "*default*" | head -n 1)
$(ZEN_PROFILE_DIR)/chrome/userChrome.css: zenUserChrome
mkdir -p $(dir $@)
ln -sf $(DOTFILE_PATH)/$^ $@
zen: $(ZEN_PROFILE_DIR)/chrome/userChrome.css
# Lazygit config symlinks
# Linux: ~/.config/lazygit/config.yml
# macOS: ~/Library/Application\ Support/lazygit/config.yml
$(HOME)/.config/lazygit/config.yml: lazygit.yml
mkdir -p "$(dir $@)"
ln -sf "$(DOTFILE_PATH)/$^" "$@"
$(HOME)/Library/Application\ Support/lazygit/config.yml: lazygit.yml
mkdir -p "$(dir $@)"
ln -sf "$(DOTFILE_PATH)/$^" "$@"
lazygit-linux: $(HOME)/.config/lazygit/config.yml
lazygit-mac: $(HOME)/Library/Application\ Support/lazygit/config.yml
all: git zsh scripts-folder tmux ghostty zed lazygit-mac