this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 76 lines 2.1 kB view raw
1#!/usr/bin/env bash 2 3set -euo pipefail 4 5DOTFILES_DIR="$HOME/dotfiles" 6 7function link_configs { 8 echo "Linking configuration files..." 9 10 declare -A mappings 11 12 # TODO: Make this linux compatible 13 mappings["ghostty"]="$HOME/Library/Application Support/com.mitchellh.ghostty" 14 mappings["zsh/zshenv"]="$HOME/.zshenv" 15 mappings["zsh/zshrc"]="$HOME/.zshrc" 16 mappings["misc/tmux.conf"]="$HOME/.tmux.conf" 17 mappings["git/gitconfig"]="$HOME/.gitconfig" 18 mappings["git/gitignore"]="$HOME/.gitignore" 19 mappings["misc/vimrc"]="$HOME/.vimrc" 20 mappings["nvim"]="$HOME/.config/nvim" 21 mappings["hammerspoon"]="$HOME/.hammerspoon" 22 mappings["zsh/starship.toml"]="$HOME/.config/starship.toml" 23 mappings["mise"]="$HOME/.config/mise" 24 mappings["worktrunk/config.toml"]="$HOME/.config/worktrunk/config.toml" 25 mappings["agents/AGENTS.global.md"]="$HOME/.claude/CLAUDE.md" 26 27 for key in "${!mappings[@]}"; do 28 source="${key}" 29 destination="${mappings[$key]}" 30 31 if [ -d "$source" ]; then 32 mkdir -p "$(dirname "$destination")" 33 create_symlink "$source" "$destination" 34 elif [ -f "$source" ]; then 35 create_symlink "$source" "$destination" 36 else 37 echo "Warning: Source $source does not exist, skipping." 38 fi 39 done 40} 41 42function create_symlink { 43 local source="$1" 44 local destination="$2" 45 46 echo "$source -> $destination" 47 48 if [ -L "$destination" ]; then 49 if [ "$(readlink "$destination")" = "$DOTFILES_DIR/$source" ]; then 50 echo " Already established" 51 return 52 else 53 echo " Removing existing symlink ($(readlink "$destination"))" 54 rm "$destination" 55 fi 56 fi 57 58 if [ -e "$destination" ]; then 59 echo " Destination exists, backing it up" 60 mv "$destination" "${destination}.bak" 61 fi 62 63 echo " Creating symlink" 64 ln -s "$DOTFILES_DIR/$source" "$destination" 65} 66 67function install_tpm { 68 if [ -d "$HOME/.tmux/plugins/tpm" ]; then 69 echo "TPM is already installed." 70 return 71 fi 72 git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm 73} 74 75link_configs 76install_tpm