This repository was archived by the owner on Sep 10, 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
·143 lines (116 loc) · 3.9 KB
/
Copy pathsetup
File metadata and controls
executable file
·143 lines (116 loc) · 3.9 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!/bin/bash
DOTFILES_DIR="$HOME/dev/repos/github.com/bde-dev/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"
"$XDG_CONFIG_HOME/qutebrowser"
"$XDG_CONFIG_HOME/waybar"
"$XDG_CONFIG_HOME/hypr"
"$HOME/.ssh"
)
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"
".zprofile:$HOME/.zprofile"
".zshrc:$HOME/.zshrc"
"qutebrowser/config.py:$XDG_CONFIG_HOME/qutebrowser/config.py"
"waybar/config.jsonc:$XDG_CONFIG_HOME/waybar/config.jsonc"
"waybar/style.css:$XDG_CONFIG_HOME/waybar/style.css"
"hypr/hyprland.conf:$XDG_CONFIG_HOME/hypr/hyprland.conf"
"hypr/hypridle.conf:$XDG_CONFIG_HOME/hypr/hypridle.conf"
"hypr/hyprlock.conf:$XDG_CONFIG_HOME/hypr/hyprlock.conf"
"ssh/config:$HOME/.ssh/config"
)
create_directories "${common_directories[@]}"
create_symlinks "${common_items[@]}"
# MacOS specific setup
if [[ "$OSTYPE" == darwin* ]]; then
macos_directories=(
"$HOME/.qutebrowser"
)
macos_items=(
"qutebrowser/config.py:$HOME/.qutebrowser/config.py"
)
create_directories "${macos_directories[@]}"
create_symlinks "${macos_items[@]}"
fi
# Ubuntu specific setup
ln -sf "$PWD/bash/.bash_profile" "$HOME"/.bash_profile
ln -sf "$PWD/bash/.bashrc" "$HOME"/.bashrc
# Zettelkasten
export ZETTELKASTEN=~/dev/Notes-vault
ln -sf "$ZETTELKASTEN" ~/Zettelkasten
# Packages
# 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 packages apt
sudo apt install ripgrep gh fd-find curl build-essential -y
# ubuntu apt neovim setup
sudo apt install gcc g++ unzip -y
# ubuntu terminal and multiplexer setup
sudo apt install alacritty tmux -y
# Download alacritty themes
mkdir -p ~/.config/alacritty/themes
git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/themes
# 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/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install --lts
# install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# ubuntu brew for vim and neovim setup
brew install fzf starship
# ubuntu brew for neovim setup
brew install neovim go lazygit
# 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
# Set gh CLI as credential helper for HTTPS GitHub operations
gh auth setup-git
# Arch Linux
# pacman packages:
# sudo pacman -Syu zsh zsh-completions ttf-ubuntu-mono-nerd fzf npm unzip tmux ripgrep fd
# set up prompt
# mkdir -p "$HOME/.zsh"
# git clone https://github.com/sindresorhus/pure.git "$HOME/.zsh/pure"