This commit is contained in:
Bryan Ramos 2026-03-09 17:57:22 -04:00
commit 0380d16266
6 changed files with 165 additions and 0 deletions

9
.gitmodules vendored Normal file
View file

@ -0,0 +1,9 @@
[submodule "nvim"]
path = nvim
url = https://github.com/itme-brain/nvim.git
[submodule "vim"]
path = vim
url = https://github.com/itme-brain/vim.git
[submodule "git"]
path = git
url = https://github.com/itme-brain/git.git

41
README.md Normal file
View file

@ -0,0 +1,41 @@
# My Dotfiles
My portable configs — clone everything or just what you need.
## Quick Install
```bash
bash <(curl -s https://raw.githubusercontent.com/itme-brain/dotfiles/main/install.sh)
```
Interactive menu lets you pick which configs to install. Each one is cloned as its own repo — no dependency on this dotfiles repo.
## Configs
| Config | Repo | Location | What it is |
|--------|------|----------|------------|
| **git** | [itme-brain/git](https://github.com/itme-brain/git) | `~/.config/git` | My global git config and ignores |
| **vim** | [itme-brain/vim](https://github.com/itme-brain/vim) | `~/.vim` | Lightweight vim for servers and quick edits. Plugins auto-install on first run |
| **nvim** | [itme-brain/nvim](https://github.com/itme-brain/nvim) | `~/.config/nvim` | Full IDE setup with LSP, treesitter, telescope |
## Install one at a time
```bash
git clone git@github.com:itme-brain/git.git ~/.config/git
git clone git@github.com:itme-brain/vim.git ~/.vim
git clone git@github.com:itme-brain/nvim.git ~/.config/nvim
```
## Updating
Each config is its own repo. Just pull:
```bash
cd ~/.vim && git pull
cd ~/.config/nvim && git pull
cd ~/.config/git && git pull
```
## Requirements
`git` and `curl`

1
git Submodule

@ -0,0 +1 @@
Subproject commit b20a21f87988793b2601ec9053871fcd47bdbb99

112
install.sh Executable file
View file

@ -0,0 +1,112 @@
#!/usr/bin/env bash
set -e
REPO_BASE="git@github.com:itme-brain"
names=("git" "vim" "nvim")
repos=("$REPO_BASE/git.git" "$REPO_BASE/vim.git" "$REPO_BASE/nvim.git")
targets=("$HOME/.config/git" "$HOME/.vim" "$HOME/.config/nvim")
selected=()
for i in "${!names[@]}"; do
selected+=("false")
done
install_config() {
local repo="$1"
local dest="$2"
if [ -e "$dest" ]; then
echo " Backing up existing: $dest -> ${dest}.bak"
mv "$dest" "${dest}.bak"
fi
mkdir -p "$(dirname "$dest")"
if ! git clone -q "$repo" "$dest" 2>&1; then
echo " Failed to clone $repo"
return 1
fi
}
draw_menu() {
local cursor="$1"
if [ "$2" = "redraw" ]; then
for _ in "${names[@]}"; do
printf "\033[A"
done
printf "\033[A"
fi
echo " (↑/↓ navigate, space toggle, enter confirm)"
for i in "${!names[@]}"; do
local marker=" "
if [ "${selected[$i]}" = "true" ]; then
marker="x"
fi
if [ "$i" -eq "$cursor" ]; then
printf " \033[1m> [%s] %s\033[0m -> %s\n" "$marker" "${names[$i]}" "${targets[$i]}"
else
printf " [%s] %s -> %s\n" "$marker" "${names[$i]}" "${targets[$i]}"
fi
done
}
echo "Select configs to install:"
cursor=0
draw_menu $cursor "first"
while true; do
IFS= read -rsn1 key
if [ "$key" = $'\x1b' ]; then
read -rsn2 rest
key="${key}${rest}"
fi
case "$key" in
$'\x1b[A' | k)
if [ $cursor -gt 0 ]; then
cursor=$((cursor - 1))
fi
;;
$'\x1b[B' | j)
if [ $cursor -lt $((${#names[@]} - 1)) ]; then
cursor=$((cursor + 1))
fi
;;
" ")
if [ "${selected[$cursor]}" = "true" ]; then
selected[$cursor]="false"
else
selected[$cursor]="true"
fi
;;
"")
break
;;
esac
draw_menu $cursor "redraw"
done
echo ""
any_selected=false
for i in "${!names[@]}"; do
if [ "${selected[$i]}" = "true" ]; then
any_selected=true
echo "Installing ${names[$i]}..."
install_config "${repos[$i]}" "${targets[$i]}"
echo ""
fi
done
if [ "$any_selected" = "false" ]; then
echo "Nothing selected."
fi
echo "Done."

1
nvim Submodule

@ -0,0 +1 @@
Subproject commit 5c224976d84f72ef3468a6685590a3e50671de05

1
vim Submodule

@ -0,0 +1 @@
Subproject commit 64b4c545481b593d2859bfb3e1c10cd91742213f