From 754b07df678bae69a143d044f51047145bbeef26 Mon Sep 17 00:00:00 2001 From: Fernando Araoz Date: Wed, 15 Jan 2025 06:24:31 -0500 Subject: [PATCH] feat: install script for tmux --- install.sh | 21 ++++++++++++++++++++- root/tmux.conf | 4 ++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8a4c1fb..7d35aa0 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/root/tmux.conf b/root/tmux.conf index 889ee55..edaca9a 100644 --- a/root/tmux.conf +++ b/root/tmux.conf @@ -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"