-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnewcomputer.bash
More file actions
executable file
·78 lines (67 loc) · 3.44 KB
/
newcomputer.bash
File metadata and controls
executable file
·78 lines (67 loc) · 3.44 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
#!/bin/bash
set -euox pipefail
###
# Install homebrew before running this script
###
# https://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
# Terminal environment
ln -sf $SCRIPTPATH/bashrc.bash ~/.bashrc
ln -sf $SCRIPTPATH/bash_profile.bash ~/.bash_profile
ln -sf $SCRIPTPATH/zshrc.zsh ~/.zshrc
ln -sf $SCRIPTPATH/tmuxconfig.conf ~/.tmux.conf
mkdir -p ~/.tmuxinator
ln -sf $SCRIPTPATH/tmuxinator-multi.yml ~/.tmuxinator/multi.yml
ln -sf $SCRIPTPATH/tmuxinator-personal.yml ~/.tmuxinator/mux-personal.yml
# Note on pure prompt: I had to manually install
# Text editors
mkdir -p ~/Library/Application\ Support/Code/User/
ln -sf $SCRIPTPATH/vscode-settings.json ~/Library/Application\ Support/Code/User/settings.json
mkdir -p ~/.config
ln -sf $SCRIPTPATH/nvim ~/.config/nvim
# Other
ln -sf $SCRIPTPATH/psqlrc ~/.psqlrc
ln -sf $SCRIPTPATH/dotgithelpers.bash ~/.githelpers
# You'll need to copy the git config yourself to edit your email in
# Claude configuration
mkdir -p ~/.claude
mkdir -p ~/.claude/skills
ln -f $SCRIPTPATH/root-claude-md.md ~/.claude/CLAUDE.md
ln -sf $SCRIPTPATH/claude-skills/review-codex ~/.claude/skills/review-codex
ln -sf $SCRIPTPATH/claude-skills/review-claude ~/.claude/skills/review-claude
ln -sf $SCRIPTPATH/claude-skills/review-multi ~/.claude/skills/review-multi
ln -sf $SCRIPTPATH/claude-skills/rpr ~/.claude/skills/rpr
# Codex skills
mkdir -p ~/.codex/skills
ln -sf $SCRIPTPATH/claude-skills/ci ~/.codex/skills/ci
ln -sf $SCRIPTPATH/claude-skills/cpr ~/.codex/skills/cpr
ln -sf $SCRIPTPATH/claude-skills/review-codex ~/.codex/skills/review-codex
ln -sf $SCRIPTPATH/claude-skills/review-claude ~/.codex/skills/review-claude
ln -sf $SCRIPTPATH/claude-skills/review-multi ~/.codex/skills/review-multi
ln -sf $SCRIPTPATH/claude-skills/rpr ~/.codex/skills/rpr
# launchd-invoked scripts can't live inside ~/Documents — macOS's App
# Management sandbox blocks bash from exec'ing files there, and symlinks
# resolve back to Documents and hit the same wall. Hard links work: TCC
# checks the access-time path, and both paths share an inode, so edits via
# in-place writes propagate automatically.
#
# Caveat: editors that save via "write temp + rename" (VSCode default, vim
# with `set backupcopy=no`, Write tool atomic replace) break the link —
# dotfiles gets a new inode and ~/.local/bin/ keeps the old one. Same for
# `git checkout` replacing the file. Re-run this block after such changes.
mkdir -p ~/.local/bin
ln -f $SCRIPTPATH/pull-granola.py ~/.local/bin/pull-granola.py
ln -f $SCRIPTPATH/pull-granola-launchd.sh ~/.local/bin/pull-granola-launchd.sh
# launchd agent. The plist must be a real file (or hard link) in
# ~/Library/LaunchAgents — macOS Background Tasks Management doesn't follow
# symlinks, so a symlinked plist is invisible to BTM, never appears in
# System Settings → Login Items, and gets silently lost on reboot.
mkdir -p ~/Library/LaunchAgents
ln -f $SCRIPTPATH/com.jpaddison.pull-granola.plist ~/Library/LaunchAgents/com.jpaddison.pull-granola.plist
launchctl bootout gui/$(id -u)/com.jpaddison.pull-granola 2>/dev/null || true
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.jpaddison.pull-granola.plist
# Software installation:
# Manual install: pure prompt (brew failed), ohmyzsh, cargo, nvm, yarn
brew install tmux tmuxinator reattach-to-user-namespace neovim
# TODO: Generate ssh keys for github
# TODO: VSCode extensions