-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
107 lines (100 loc) · 3.38 KB
/
Makefile
File metadata and controls
107 lines (100 loc) · 3.38 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
brews = \
cocoapods \
colima \
docker \
docker-compose \
fd \
fzf \
gh \
git \
lua-language-server \
neovim \
node \
pnpm \
ripgrep \
tree \
tree-sitter \
tree-sitter-cli
casks = gpg-suite
dots = gitconfig gitconfig.local vimrc zshrc
lsps = \
@tailwindcss/language-server@latest \
@vtsls/language-server@latest \
bash-language-server@latest \
graphql-language-service-cli@latest \
vscode-langservers-extracted@latest \
yaml-language-server@latest
# --------------------------------------
#/ help Print this message (default)
help:
@printf "%sUsage: make TARGET\n"
@cat ./Makefile | grep '^#\/' | sed "s/#\// /g"
@printf "%s\nGlobal packages:\n"
@printf "%sbrew: $(brews)\n"
@printf "%scask: $(casks)\n"
@printf "%slsp: $(lsps)\n"
#/ install Installs homebrews, casks, dotfiles and LSP servers
install:
sudo -v
/opt/homebrew/bin/brew install $(brews)
/opt/homebrew/bin/brew install --cask $(casks)
@for file in $(dots); do ln -sfv `pwd`/$$file $$HOME/.$$file; done
@mkdir -p $$HOME/.config
@if [[ -d $$HOME/.config/nvim ]]; then rm -rf $$HOME/.config/nvim; fi
@ln -sfv `pwd`/nvim $$HOME/.config/nvim
@if [[ -d $$HOME/.config/ghostty ]]; then rm -rf $$HOME/.config/ghostty; fi
@ln -sfv `pwd`/ghostty $$HOME/.config/ghostty
@if [[ -L $$HOME/.claude ]]; then rm $$HOME/.claude; fi
@ln -sfv `pwd`/claude $$HOME/.claude
zsh -c '. $$HOME/.zshrc && pnpm install -g $(lsps)'
@printf "%s\nSetup macOS defaults: make macos\n"
#/ uninstall Removes homebrews, casks, dotfiles and LSP servers
uninstall:
sudo -v
brew uninstall $(brews)
brew uninstall --cask $(casks)
pnpm uninstall -g $(lsps)
@rm -rfv $$HOME/.config/ghostty
@rm -rfv $$HOME/.config/nvim
@rm -rfv $$HOME/.claude
@for file in $(dots); do rm -v $$HOME/.$$file; done
#/ update Updates homebrews, casks and LSP servers
update:
brew update
@printf "%s----\n"
brew outdated
@printf "%s----\n"
brew upgrade
@printf "%s----\n"
brew cleanup
@printf "%s----\n"
brew doctor
@printf "%s----\n"
pnpm install -g $(lsps)
@printf "%s----\n"
@printf "%sUpdate nvim plugins: :lua vim.pack.update()\n"
#/ macos Setup macOS defaults: https://mths.be/macos
macos:
sudo -v
@# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
@# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
@# Set a blazingly fast keyboard repeat rate -- REQUIRES LOGOUT!
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 15
@# Save screenshots to Downloads
defaults write com.apple.screencapture location -string "${HOME}/Downloads"
@# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"
@# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true
@# Finder: allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
@# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
@# Show the ~/Library folder
chflags nohidden ~/Library
@# Make Dock icons of hidden applications translucent
defaults write com.apple.dock showhidden -bool true
.PHONY: help install macos uninstall update