-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
48 lines (35 loc) · 1.72 KB
/
Copy pathinstall.sh
File metadata and controls
48 lines (35 loc) · 1.72 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
#!/usr/bin/env bash
DOTFILES_DIR="$(cd "$(dirname "$0")" && pwd)"
# Check for Homebrew and install it
if test ! $(which brew); then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# Install Homebrew packages from Brewfile
brew bundle
# Remove and symlink dotfiles
rm -rf $HOME/.gitconfig && ln -s $DOTFILES_DIR/git/.gitconfig $HOME/.gitconfig
rm -rf $HOME/.psqlrc && ln -s $DOTFILES_DIR/psql/.psqlrc $HOME/.psqlrc
# Add gh alias
gh alias set open 'repo view -w' 2>/dev/null || echo "gh not authenticated, skipping alias"
# Set fish as default shell
if test $(which fish); then
echo $(which fish) | sudo tee -a /etc/shells
chsh -s $(which fish)
fi
# Set up fish configuration
FISH_BIN=$(which fish)
mkdir -p $HOME/.config/fish
$FISH_BIN -c 'curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher'
rm -rf $HOME/.config/fish/fish_plugins && ln -s $DOTFILES_DIR/fish/fish_plugins $HOME/.config/fish/fish_plugins
rm -rf $HOME/.config/fish/config.fish && ln -s $DOTFILES_DIR/fish/config.fish $HOME/.config/fish/config.fish
# Set up Ghostty configuration
mkdir -p $HOME/.config/ghostty
rm -rf $HOME/.config/ghostty/config.ghostty && ln -s $DOTFILES_DIR/ghostty/config.ghostty $HOME/.config/ghostty/config.ghostty
# Set up Zed configuration
mkdir -p $HOME/.config/zed
rm -rf $HOME/.config/zed/settings.json && ln -s $DOTFILES_DIR/zed/settings.json $HOME/.config/zed/settings.json
rm -rf $HOME/.config/zed/keymap.json && ln -s $DOTFILES_DIR/zed/keymap.json $HOME/.config/zed/keymap.json
$FISH_BIN -c 'fisher update'
# Set macOS preferences
source "$DOTFILES_DIR/.macos"