env scripts and ghostty properly divided between mac and linux
This commit is contained in:
Executable
+70
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
|
||||
CONFIG_DIR=~/personal/dotfiles/.config
|
||||
LOCAL_DIR=~/personal/dotfiles/.local/bin
|
||||
DEST_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
|
||||
for dir in "$CONFIG_DIR"/*/; do
|
||||
[ -d "$dir" ] || continue
|
||||
|
||||
name=$(basename "$dir")
|
||||
target="$DEST_DIR/$name"
|
||||
|
||||
rm -rf "$target"
|
||||
echo "Removing: $target"
|
||||
done
|
||||
|
||||
echo
|
||||
|
||||
for dir in "$CONFIG_DIR"/*/; do
|
||||
[ -d "$dir" ] || continue
|
||||
|
||||
name=$(basename "$dir")
|
||||
target="$DEST_DIR/$name"
|
||||
|
||||
cp -r "$dir" "$target"
|
||||
echo "Copying: $dir → $target"
|
||||
done
|
||||
|
||||
echo
|
||||
echo "Copying executables from $LOCAL_DIR to ~/.local/bin"
|
||||
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
for file in "$LOCAL_DIR"/*; do
|
||||
[ -f "$file" ] || continue
|
||||
|
||||
name=$(basename "$file")
|
||||
target="$HOME/.local/bin/$name"
|
||||
|
||||
rm -f "$target"
|
||||
cp "$file" "$target"
|
||||
chmod +x "$target"
|
||||
echo "Copied: $file → $target"
|
||||
done
|
||||
|
||||
echo
|
||||
echo "Copying .zshrc to $HOME"
|
||||
|
||||
target="$HOME/.zshrc"
|
||||
rm -f "$target"
|
||||
cp "$HOME/personal/env/.zshrc" "$target"
|
||||
echo "Copied: .zshrc → $target"
|
||||
|
||||
echo
|
||||
echo "Copying tmux config"
|
||||
|
||||
target="$HOME/.config/tmux/tmux.conf"
|
||||
mkdir -p "$(dirname "$target")"
|
||||
rm -f "$target"
|
||||
cp "$HOME/personal/env/.config/tmux/tmux.conf" "$target"
|
||||
echo "Copied: tmux.conf → $target"
|
||||
|
||||
echo
|
||||
|
||||
echo "Copying starship config"
|
||||
target="$HOME/.config/starship.toml"
|
||||
mkdir -p "$(dirname "$target")"
|
||||
rm -f "$target"
|
||||
cp "$HOME/personal/env/.config/starship.toml" "$target"
|
||||
echo "Copied: starship.toml → $target"
|
||||
rm -rf ~/.config/ghostty/linux
|
||||
Reference in New Issue
Block a user