-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·115 lines (96 loc) · 2.68 KB
/
install.sh
File metadata and controls
executable file
·115 lines (96 loc) · 2.68 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
#!/usr/bin/env bash
set -euo pipefail
# ----------------------------
# Sudo keep-alive
# ----------------------------
echo "▶ Requesting sudo access"
sudo -v
while true; do
sudo -n true
sleep 60
kill -0 "$$" || exit
done 2>/dev/null &
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "▶ Dotfiles bootstrap starting..."
# ----------------------------
# Detect package manager
# ----------------------------
if command -v zypper >/dev/null 2>&1; then
PM="zypper"
else
echo "✖ Unsupported package manager"
exit 1
fi
echo "▶ Using package manager: $PM"
# ----------------------------
# Install core packages
# ----------------------------
install_packages() {
case "$PM" in
zypper)
sudo wget https://mise.jdx.dev/rpm/mise.repo -O /etc/zypp/repos.d/mise.repo
sudo zypper refresh
sudo zypper install -y \
zsh starship fzf bat eza ripgrep zoxide git-core mise \
nodejs tmux yq
;;
esac
}
install_packages
# ----------------------------
# Create config dirs
# ----------------------------
echo "▶ Creating config directories"
mkdir -p ~/.config/{zsh,nvim,helix,konsole,starship}
# ----------------------------
# Zsh (ZDOTDIR-based layout)
# ----------------------------
bash "$DOTFILES_DIR/shell/install.sh"
# ----------------------------
# Set default shell
# ----------------------------
if [[ "$SHELL" != *zsh ]]; then
echo "▶ Setting zsh as default shell"
chsh -s "$(command -v zsh)"
fi
# ----------------------------
# fzf keybindings (optional but good)
# ----------------------------
if [[ -d /usr/share/fzf ]]; then
echo "▶ Enabling fzf keybindings"
fi
# ----------------------------
# Workspace directory
# ----------------------------
echo "▶ Ensuring workspace directory exists"
mkdir -p "$HOME/workspace"
# ----------------------------
# Fonts
# ----------------------------
echo "▶ Installing Fonts"
bash "$DOTFILES_DIR/fonts/install.sh"
# ----------------------------
# Konsole (KDE Terminal)
# ----------------------------
echo "▶ Installing Konsole Profile"
bash "$DOTFILES_DIR/konsole/install.sh"
# ----------------------------
# Git Config defaults
# ----------------------------
git config --global push.autoSetupRemote true
# ----------------------------
# Neovim (LazyVim)
# ----------------------------
echo "▶ Installing Neovim (LazyVim)"
bash "$DOTFILES_DIR/nvim/install.sh" --backup --native --yes
# ----------------------------
# AI Tooling
# ----------------------------
echo "▶ Installing AI Tooling"
bash "$DOTFILES_DIR/ai/install.sh"
# ----------------------------
# Final message
# ----------------------------
echo
echo "✔ Bootstrap complete"
echo "→ Restart your terminal or log out/in"