refactor: restructure installation to modular architecture
- Remove monolithic bootstrap.sh in favor of modular design - Add install.sh as new main entry point with improved UX - Split functionality into focused modules: - lib/common.sh: shared utilities and environment detection - lib/packages.sh: base system packages - lib/neovim.sh: Neovim and LazyVim setup - lib/arduino.sh: Arduino CLI and board cores - lib/git.sh: Git and Lazygit configuration - lib/shell-config.sh: Zsh and shell environment - lib/starship.sh: Starship prompt setup - lib/zellij.sh: Zellij terminal multiplexer - lib/scaffold.sh: project scaffolding utilities - Update README with new installation instructions and architecture - Improve error handling and user feedback across modules - Maintain compatibility with both Arch Linux and Ubuntu/WSL2 This modular approach enables better maintainability, testing, and allows users to selectively run components as needed.
This commit is contained in:
43
lib/zellij.sh
Normal file
43
lib/zellij.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
# Step 4: Zellij terminal multiplexer
|
||||
|
||||
step "4/9 — Installing Zellij"
|
||||
|
||||
if ! command -v zellij &>/dev/null; then
|
||||
if $IS_ARCH; then
|
||||
$PKG_INSTALL zellij
|
||||
else
|
||||
curl -kL https://github.com/zellij-org/zellij/releases/latest/download/zellij-x86_64-unknown-linux-musl.tar.gz | tar xz -C /tmp
|
||||
sudo mv /tmp/zellij /usr/local/bin/
|
||||
fi
|
||||
fi
|
||||
info "Zellij installed"
|
||||
|
||||
mkdir -p ~/.config/zellij/layouts
|
||||
write_zellij_config ~/.config/zellij/config.kdl
|
||||
|
||||
cat >~/.config/zellij/layouts/arduino.kdl <<'LAYOUT'
|
||||
layout {
|
||||
tab name="code" focus=true {
|
||||
pane split_direction="vertical" {
|
||||
pane size="65%" {
|
||||
command "nvim"
|
||||
args "."
|
||||
}
|
||||
pane split_direction="horizontal" {
|
||||
pane size="60%" name="terminal"
|
||||
pane size="40%" name="serial" {
|
||||
command "bash"
|
||||
args "-c" "echo '⚡ Serial — run: tio /dev/ttyUSB0 -b 115200'"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tab name="git" {
|
||||
pane {
|
||||
command "lazygit"
|
||||
}
|
||||
}
|
||||
}
|
||||
LAYOUT
|
||||
info "Zellij configured with $THEME_DISPLAY_NAME + Arduino layout"
|
||||
Reference in New Issue
Block a user