This repository was archived by the owner on Nov 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·91 lines (73 loc) · 2.43 KB
/
Copy pathsetup
File metadata and controls
executable file
·91 lines (73 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
DOTFILES_DIR="$HOME/dotfiles"
XDG_CONFIG_HOME="$HOME/.config"
ls $DOTFILES_DIR
create_directories() {
local directories=("$@")
for dir in "${directories[@]}"; do
mkdir -p "$dir"
done
}
create_symlinks() {
local items=("$@")
for item in "${items[@]}"; do
IFS=':' read -r source target <<<"$item"
if [ -L "$target" ]; then
echo "Removing existing symlink $target"
unlink "$target"
elif [ -d "$target" ]; then
echo "Warning: $target is a directory. Skipping..."
continue
elif [ -e "$target" ]; then
echo "Warning: $target already exists. Skipping..."
continue
fi
ln -s "$DOTFILES_DIR/$source" "$target"
echo "Created symlink for $source"
done
}
common_directories=(
"$XDG_CONFIG_HOME/alacritty"
"$XDG_CONFIG_HOME/alacritty/themes"
"$XDG_CONFIG_HOME/k9s"
)
common_items=(
"alacritty.toml:$XDG_CONFIG_HOME/alacritty/alacritty.toml"
"mise.toml:$XDG_CONFIG_HOME/mise.toml"
"k9s/skin.yml:$XDG_CONFIG_HOME/k9s/skin.yml"
".inputrc:$HOME/.inputrc"
".tmux.conf:$HOME/.tmux.conf"
"nvim:$XDG_CONFIG_HOME/nvim"
)
create_directories "${common_directories[@]}"
create_symlinks "${common_items[@]}"
# Ubuntu specific setup
ln -sf "$PWD/bash/.bash_profile" "$HOME"/.bash_profile
ln -sf "$PWD/bash/.bashrc" "$HOME"/.bashrc
# Show dotfiles bashrc and source it into script context
cat ~/.bashrc
source ~/.bashrc
# get the font out of the way first, it's the most annoying
# For ubuntu
mkdir -p $HOME/.local/share/fonts
cp $PWD/fonts/UbuntuMono* $HOME/.local/share/fonts
sudo apt update
# ubuntu PPA repositories
sudo add-apt-repository ppa:aslatter/ppa -y
# ubuntu apt neovim setup
sudo apt install gcc g++ unzip alacritty tmux ripgrep fd-find curl -y
# Download alacritty themes
mkdir -p ~/.config/alacritty/themes
git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/themes
# Brew was installed with devcontainers features - eval for $PATH
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# ubuntu brew for vim and neovim setup
brew install fzf starship lazygit
# Install Node Version Manager and latest Node.js LTS
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install --lts
# create symbolic link to neovim from vim when not using neovim on
# Ubuntu systems, because I use the v alias everywhere.
sudo ln -sf /usr/bin/vim /usr/bin/nvim