feat: install script for tmux

This commit is contained in:
Fernando Araoz 2025-01-15 06:24:31 -05:00
parent f1f5b03ddf
commit 754b07df67
2 changed files with 24 additions and 1 deletions

View File

@ -1,10 +1,11 @@
#!/bin/sh
# ~/dotfiles/install.sh
set -e
# Create config directories
mkdir -p "$HOME/.config"
# Handle .config directory symlinks first
cd "$HOME/dotfiles/config" || exit 1
for dir in *; do
[ -d "$dir" ] || continue
@ -21,3 +22,21 @@ for dir in *; do
ln -sf "$PWD/$dir" "$target"
echo "Linked $dir"
done
# Handle root directory dotfiles
cd "$HOME/dotfiles/root" || exit 1
for file in *; do
[ -f "$file" ] || continue
target="$HOME/.$file"
if [ -L "$target" ]; then
echo "Skipping .$file (symlink already exists)"
continue
elif [ -e "$target" ]; then
echo "Skipping .$file (target exists and is not a symlink)"
continue
fi
ln -sf "$PWD/$file" "$target"
echo "Linked .$file"
done

View File

@ -1,4 +1,5 @@
# Use C-a as prefix because reaching for C-b is inefficient
set-option -g default-shell "/usr/bin/fish"
set -g prefix C-a
unbind C-b
@ -42,3 +43,6 @@ set-option -g history-limit 50000
# Status bar that doesn't look like it's from 1970
set -g status-style 'bg=#333333 fg=#5eacd3'
# the fish shell
set-option -g default-shell "/usr/bin/fish"