-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall
executable file
·71 lines (54 loc) · 2.33 KB
/
install
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
#!/bin/bash
set -euo pipefail
DIR=$(cd "$(dirname "$0")"; pwd)
select profile in "home" "bridge" "stripe"; do
case "$REPLY" in
1|2|3) break;;
*) continue;;
esac
done
if [ ! -f "${DIR}/etc/git/profile" ]; then
read -p "Set your git user.email: "
git config --file "${DIR}/etc/git/profile" user.email "${REPLY}"
fi
mkdir -p "${HOME}/.local"
ln -sfh "${DIR}/bin" "${HOME}/.local/bin"
ln -sfh "${DIR}/etc" "${HOME}/.config"
which brew \
|| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew update --verbose
brew bundle install --cleanup --verbose --file="${DIR}/opt/Brewfile.${profile}" --no-lock
brew cleanup --verbose
brew completions link
fish -c "mise use -g go@latest"
fish -c "mise use -g java@latest"
fish -c "mise use -g node@latest"
fish -c "mise use -g ruby@latest"
grep -q /opt/homebrew/bin/fish /etc/shells \
|| sudo bash -c 'echo /opt/homebrew/bin/fish >> /etc/shells'
# https://stackoverflow.com/a/41553295
dscl . -read ~ UserShell | grep -q /opt/homebrew/bin/fish \
|| chsh -s /opt/homebrew/bin/fish
fish -c "git submodule update --init --remote"
fish -c "make --directory ${DIR}/etc/nvim/pack/matthewtodd/start/telescope-fzf-native"
fish -c "nvim --headless -c 'helptags ALL' -c quit"
# https://macos-defaults.com
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true
defaults write com.apple.dock autohide -bool true
defaults write com.apple.dock show-recents -bool false
defaults write com.apple.dock static-only -bool true
defaults write com.apple.dock tilesize -int 56
defaults write com.apple.finder FXPreferredViewStyle -string clmv
killall Dock Finder
# https://github.com/Hammerspoon/hammerspoon/pull/582
defaults write org.hammerspoon.Hammerspoon MJConfigFile ${DIR}/etc/hammerspoon/init.lua
swiftc "${DIR}/src/dynamic_desktop.swift" -o "${DIR}/bin/dynamic_desktop"
swiftc "${DIR}/src/set_desktop_image.swift" -o "${DIR}/bin/set_desktop_image"
swiftc "${DIR}/src/terminal_profiles.swift" -o "${DIR}/bin/terminal_profiles"
"${DIR}/bin/dynamic_desktop" "${profile}" "${HOME}/Pictures/Solarized.heic"
# On macOS 14.0, this seems to always select the light (still) version, rather
# than automatically switching.
# "${DIR}/bin/set_desktop_image" "${HOME}/Pictures/Solarized.heic"
"${DIR}/bin/terminal_profiles"
# Why not? This could be fun.
open raycast://confetti