2024-06-13 23:03:12 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Backup any existing dotfiles
|
2025-05-15 21:01:53 -07:00
|
|
|
[ -f ~/.bashrc ] && [ ! -L ~/.bashrc ] && mv ~/.bashrc ~/.bashrc.bak
|
|
|
|
[ -f ~/.nanorc ] && [ ! -L ~/.nanorc ] && mv ~/.nanorc ~/.nanorc.bak
|
|
|
|
[ -f ~/.tmux.conf ] && [ ! -L ~/.tmux.conf ] && mv ~/.tmux.conf ~/.tmux.conf.bak
|
|
|
|
[ -f ~/.dircolors ] && [ ! -L ~/.dircolors ] && mv ~/.dircolors ~/.dircolors.bak
|
|
|
|
[ -d ~/.tmux ] && [ ! -L ~/.tmux ] && mv ~/.tmux ~/.tmux.bak
|
|
|
|
[ -f ~/.config/k9s/config.yml ] && [ ! -L ~/.config/k9s/config.yml ] && mv ~/.config/k9s/config.yml ~/.config/k9s/config.bak
|
2024-06-13 23:03:12 -07:00
|
|
|
# Link dotfiles
|
2025-05-15 21:01:53 -07:00
|
|
|
[ -d ~/.config/alacritty ] || mkdir ~/.config/alacritty
|
|
|
|
[ -e ~/.config/alacritty/config.toml ] || ln -s ~/.dotfiles/alacritty.toml ~/.config/alacritty/config.toml
|
2024-06-13 23:03:12 -07:00
|
|
|
[ -e ~/.tmux.conf ] || ln -s ~/.dotfiles/.tmux.conf ~/.tmux.conf
|
|
|
|
[ -e ~/.bashrc ] || ln -s ~/.dotfiles/.bashrc ~/.bashrc
|
|
|
|
[ -e ~/.nanorc ] || ln -s ~/.dotfiles/.nanorc ~/.nanorc
|
|
|
|
[ -e ~/.tmux ] || ln -s ~/.dotfiles/.tmux ~/.tmux
|
2024-06-19 19:09:29 -07:00
|
|
|
[ -e ~/.dircolors ] || ln -s ~/.dotfiles/.dircolors ~/.dircolors
|
2025-03-06 20:06:41 -08:00
|
|
|
|
2025-05-15 21:01:53 -07:00
|
|
|
# Copy fonts if needed
|
|
|
|
[ -d ~/.local/share/fonts ] || cp -r ~/.dotfiles/fonts ~/.local/share
|
|
|
|
|
|
|
|
# neoVim configuration
|
|
|
|
[ -d ~/.config/nvim ] && [ ! -L ~/.config/nvim ] && mv ~/.config/nvim ~/.config/nvim.old
|
|
|
|
[ -e ~/.config/nvim ] || ln -s ~/.dotfiles/nvim ~/.config/nvim
|
|
|
|
|
2025-05-19 20:48:56 -07:00
|
|
|
# Alacritty only if directory exists
|
|
|
|
[ -d ~/.config/alacritty ] && [ ! -L ~/.config/alacritty ] && mv ~/.config/alacritty ~/.config/alacritty.old
|
|
|
|
[ -e ~/.config/alacritty ] || ln -s ~/.dotfiles/alacritty ~/.config/alacritty
|
|
|
|
|
2025-03-06 20:06:41 -08:00
|
|
|
# k9s only if directory exists
|
|
|
|
if [ -d ~/.config/k9s ]; then
|
|
|
|
[ -e ~/.config/k9s/config.yml ] || ln -s ~/.dotfiles/k9s_config.yml ~/.config/k9s/config.yml
|
|
|
|
fi
|
2025-05-15 19:44:35 -07:00
|
|
|
|