diff --git a/README.md b/README.md index 5651592..7172161 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,14 @@ The Idea was a Development Environment runnable by almost everything. No GUI nee | **Shell** | [Zsh](https://www.zsh.org) + [Oh My Zsh](https://ohmyz.sh) | Autosuggestions, syntax highlighting, smart completions | | **Prompt** | [Starship](https://starship.rs) | Fast, minimal, git-aware prompt | | **Git** | [Lazygit](https://github.com/jesseduffield/lazygit) | Beautiful terminal UI for git | +| **File Manager** | [Yazi](https://yazi-rs.github.io) | Blazing fast terminal file manager with image preview | | **Serial** | [tio](https://github.com/tio/tio) | Simple serial device I/O | +| **Font** | [JetBrainsMono Nerd Font](https://www.nerdfonts.com) | Icons and ligatures for all TUI tools | | **Theme** | 5 colorschemes | Consistent look across every tool (see below) | ### Colorschemes -The installer lets you pick a theme that is applied **consistently** across Neovim, Starship, Zellij, and Lazygit: +The installer lets you pick a theme that is applied **consistently** across Neovim, Starship, Zellij, Lazygit, and Yazi: | # | Theme | Style | |---|---|---| @@ -54,7 +56,7 @@ You can **switch themes at any time** after installation: archduino-theme # or just: theme ``` -This updates Starship, Zellij, Lazygit, and NvChad in one step. +This updates Starship, Zellij, Lazygit, Yazi, and NvChad in one step. ### Supported Boards (out of the box) @@ -84,7 +86,7 @@ The installer will: 2. Let you pick your **colorscheme** (applied to all tools) 3. Let you choose between **progress bar** or **verbose** output 4. Ask for your sudo password **once** (cached for the entire install) -5. Run through all 9 setup steps automatically +5. Run through all 11 setup steps automatically After it finishes, start a new shell or run `source ~/.zshrc`. @@ -105,10 +107,12 @@ ArduinoArch/ │ ├── nord.sh # Nord configs │ └── dracula.sh # Dracula configs ├── packages.sh # Base packages (build tools, ripgrep, fd, bat, etc.) + ├── fonts.sh # JetBrainsMono Nerd Font installation ├── zsh.sh # Oh My Zsh + plugins ├── starship.sh # Starship prompt config ├── zellij.sh # Zellij + config + Arduino workspace layout ├── neovim.sh # Neovim + NvChad + plugin configs (Arduino, LSP) + ├── yazi.sh # Yazi file manager + themed config ├── arduino.sh # Arduino CLI + AVR/ESP32/ESP8266 cores + common libraries ├── git.sh # Lazygit config ├── scaffold.sh # `arduino-new` scaffolding tool + board templates @@ -191,6 +195,7 @@ All keybindings are under `a`: | `acb` | `arduino-cli board list` | | `lg` | `lazygit` | | `v` | `nvim` | +| `y` | `yazi` (file manager) | | `theme` | `archduino-theme` (switch colorscheme) | --- diff --git a/install.sh b/install.sh index dd52f2d..e09d129 100644 --- a/install.sh +++ b/install.sh @@ -75,10 +75,12 @@ fi # ── Run install steps ─────────────────────────────────────────── source "$SCRIPT_DIR/lib/packages.sh" +source "$SCRIPT_DIR/lib/fonts.sh" source "$SCRIPT_DIR/lib/zsh.sh" source "$SCRIPT_DIR/lib/starship.sh" source "$SCRIPT_DIR/lib/zellij.sh" source "$SCRIPT_DIR/lib/neovim.sh" +source "$SCRIPT_DIR/lib/yazi.sh" source "$SCRIPT_DIR/lib/arduino.sh" source "$SCRIPT_DIR/lib/git.sh" source "$SCRIPT_DIR/lib/scaffold.sh" diff --git a/lib/arduino.sh b/lib/arduino.sh index 3e5a72f..4efe8b4 100644 --- a/lib/arduino.sh +++ b/lib/arduino.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 7: Arduino CLI + board cores -step "7/9 — Installing Arduino CLI + board cores" +step "9/11 — Installing Arduino CLI + board cores" if $IS_ARCH; then $PKG_INSTALL arduino-cli diff --git a/lib/common.sh b/lib/common.sh index 22730a0..ad00ba6 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -13,7 +13,7 @@ NC='\033[0m' VERBOSE=true LOG_FILE="/tmp/archduino-install.log" CURRENT_STEP=0 -TOTAL_STEPS=10 +TOTAL_STEPS=12 info() { echo -e "${GREEN}[✓]${NC} $1"; } warn() { echo -e "${YELLOW}[!]${NC} $1"; } @@ -39,7 +39,7 @@ draw_progress() { } begin_quiet_mode() { - $IS_WSL && TOTAL_STEPS=11 + $IS_WSL && TOTAL_STEPS=13 : >"$LOG_FILE" # Save real terminal to fd 3/4, redirect everything else to log diff --git a/lib/fonts.sh b/lib/fonts.sh new file mode 100644 index 0000000..ffbda87 --- /dev/null +++ b/lib/fonts.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Step 2: Nerd Font installation + +step "2/11 — Installing Nerd Font" + +FONT_DIR="$HOME/.local/share/fonts/NerdFonts" +FONT_NAME="JetBrainsMono" + +if fc-list 2>/dev/null | grep -qi "JetBrainsMono Nerd"; then + info "JetBrainsMono Nerd Font already installed" +else + mkdir -p "$FONT_DIR" + curl -ksSLo /tmp/JetBrainsMono.tar.xz \ + "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz" + tar xf /tmp/JetBrainsMono.tar.xz -C "$FONT_DIR" + rm -f /tmp/JetBrainsMono.tar.xz + fc-cache -f 2>/dev/null || true + info "JetBrainsMono Nerd Font installed to $FONT_DIR" +fi + +if $IS_WSL; then + warn "WSL detected: You must also install a Nerd Font on the Windows side." + warn "Download from: https://www.nerdfonts.com/font-downloads" + warn "Then set 'JetBrainsMono Nerd Font' in your terminal settings (Windows Terminal, etc.)." +fi diff --git a/lib/git.sh b/lib/git.sh index cc9229b..e726210 100644 --- a/lib/git.sh +++ b/lib/git.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 8: Git + Lazygit -step "8/9 — Setting up Git + Lazygit" +step "10/11 — Setting up Git + Lazygit" if $IS_ARCH; then $PKG_INSTALL lazygit diff --git a/lib/neovim.sh b/lib/neovim.sh index 5e190b4..2acecdf 100644 --- a/lib/neovim.sh +++ b/lib/neovim.sh @@ -1,7 +1,7 @@ #!/bin/bash # Steps 5+6: Neovim + NvChad -step "5/9 — Installing Neovim (latest)" +step "6/11 — Installing Neovim (latest)" NVIM_NEEDED=true if command -v nvim &>/dev/null; then @@ -21,7 +21,7 @@ if $NVIM_NEEDED; then info "Neovim installed: $(nvim --version | head -1)" fi -step "6/9 — Setting up NvChad" +step "7/11 — Setting up NvChad" NVIM_CFG="$HOME/.config/nvim" NVCHAD_FRESH=false diff --git a/lib/packages.sh b/lib/packages.sh index b9ffcf3..486a42b 100644 --- a/lib/packages.sh +++ b/lib/packages.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 1: Base packages -step "1/9 — Installing base packages" +step "1/11 — Installing base packages" if $IS_ARCH; then sudo pacman -Syu --noconfirm diff --git a/lib/scaffold.sh b/lib/scaffold.sh index f233ba1..0bb53d1 100644 --- a/lib/scaffold.sh +++ b/lib/scaffold.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 9: Project scaffolding tool + templates -step "9/9 — Creating project scaffolding tool" +step "11/11 — Creating project scaffolding tool" mkdir -p ~/.local/bin ~/.config/archduino/templates @@ -215,6 +215,11 @@ info "Zellij updated" write_lazygit_config ~/.config/lazygit/config.yml info "Lazygit updated" +# Yazi +mkdir -p ~/.config/yazi +write_yazi_config ~/.config/yazi/theme.toml +info "Yazi updated" + # NvChad NVIM_CFG="$HOME/.config/nvim" if [[ -f "$NVIM_CFG/lua/chadrc.lua" ]]; then diff --git a/lib/shell-config.sh b/lib/shell-config.sh index 9b4971e..b21be2a 100644 --- a/lib/shell-config.sh +++ b/lib/shell-config.sh @@ -26,6 +26,7 @@ alias acm="arduino-cli monitor" alias acb="arduino-cli board list" alias lg="lazygit" alias v="nvim" +alias y="yazi" alias theme="archduino-theme" # ── END ARCHDUINO ───────────────────────────────────────────────' diff --git a/lib/starship.sh b/lib/starship.sh index 9d4a988..e8b265c 100644 --- a/lib/starship.sh +++ b/lib/starship.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 3: Starship prompt -step "3/9 — Installing Starship" +step "4/11 — Installing Starship" if $IS_ARCH; then $PKG_INSTALL starship diff --git a/lib/themes/catppuccin.sh b/lib/themes/catppuccin.sh index 60eb9ad..ac5f141 100644 --- a/lib/themes/catppuccin.sh +++ b/lib/themes/catppuccin.sh @@ -90,3 +90,38 @@ gui: - "#cdd6f4" YAML } + +write_yazi_config() { + cat >"$1" <<'TOML' +[manager] +cwd = { fg = "#f9e2af" } +tab_active = { fg = "#1e1e2e", bg = "#f9e2af" } +tab_inactive = { fg = "#bac2de", bg = "#313244" } +border_symbol = "│" +border_style = { fg = "#585b70" } +count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" } +count_cut = { fg = "#1e1e2e", bg = "#f38ba8" } +count_selected = { fg = "#1e1e2e", bg = "#f9e2af" } + +[status] +separator_open = "" +separator_close = "" +mode_normal = { fg = "#1e1e2e", bg = "#a6e3a1", bold = true } +mode_select = { fg = "#1e1e2e", bg = "#f9e2af", bold = true } +mode_unset = { fg = "#1e1e2e", bg = "#f38ba8", bold = true } +progress_label = { fg = "#cdd6f4", bold = true } +progress_normal = { fg = "#89b4fa", bg = "#313244" } +progress_error = { fg = "#f38ba8", bg = "#313244" } + +[input] +border = { fg = "#f9e2af" } +title = {} +value = {} +selected = { reversed = true } + +[select] +border = { fg = "#f9e2af" } +active = { fg = "#a6e3a1", bold = true } +inactive = {} +TOML +} diff --git a/lib/themes/dracula.sh b/lib/themes/dracula.sh index 7fc6284..b760f13 100644 --- a/lib/themes/dracula.sh +++ b/lib/themes/dracula.sh @@ -90,3 +90,38 @@ gui: - "#f8f8f2" YAML } + +write_yazi_config() { + cat >"$1" <<'TOML' +[manager] +cwd = { fg = "#f1fa8c" } +tab_active = { fg = "#282a36", bg = "#f1fa8c" } +tab_inactive = { fg = "#bfbfbf", bg = "#44475a" } +border_symbol = "│" +border_style = { fg = "#6272a4" } +count_copied = { fg = "#282a36", bg = "#50fa7b" } +count_cut = { fg = "#282a36", bg = "#ff5555" } +count_selected = { fg = "#282a36", bg = "#f1fa8c" } + +[status] +separator_open = "" +separator_close = "" +mode_normal = { fg = "#282a36", bg = "#50fa7b", bold = true } +mode_select = { fg = "#282a36", bg = "#f1fa8c", bold = true } +mode_unset = { fg = "#282a36", bg = "#ff5555", bold = true } +progress_label = { fg = "#f8f8f2", bold = true } +progress_normal = { fg = "#bd93f9", bg = "#44475a" } +progress_error = { fg = "#ff5555", bg = "#44475a" } + +[input] +border = { fg = "#f1fa8c" } +title = {} +value = {} +selected = { reversed = true } + +[select] +border = { fg = "#f1fa8c" } +active = { fg = "#50fa7b", bold = true } +inactive = {} +TOML +} diff --git a/lib/themes/gruvbox.sh b/lib/themes/gruvbox.sh index f33101d..7cb1ce5 100644 --- a/lib/themes/gruvbox.sh +++ b/lib/themes/gruvbox.sh @@ -90,3 +90,38 @@ gui: - "#ebdbb2" YAML } + +write_yazi_config() { + cat >"$1" <<'TOML' +[manager] +cwd = { fg = "#fabd2f" } +tab_active = { fg = "#282828", bg = "#fabd2f" } +tab_inactive = { fg = "#a89984", bg = "#3c3836" } +border_symbol = "│" +border_style = { fg = "#665c54" } +count_copied = { fg = "#282828", bg = "#b8bb26" } +count_cut = { fg = "#282828", bg = "#fb4934" } +count_selected = { fg = "#282828", bg = "#fabd2f" } + +[status] +separator_open = "" +separator_close = "" +mode_normal = { fg = "#282828", bg = "#b8bb26", bold = true } +mode_select = { fg = "#282828", bg = "#fabd2f", bold = true } +mode_unset = { fg = "#282828", bg = "#fb4934", bold = true } +progress_label = { fg = "#ebdbb2", bold = true } +progress_normal = { fg = "#458588", bg = "#3c3836" } +progress_error = { fg = "#fb4934", bg = "#3c3836" } + +[input] +border = { fg = "#fabd2f" } +title = {} +value = {} +selected = { reversed = true } + +[select] +border = { fg = "#fabd2f" } +active = { fg = "#b8bb26", bold = true } +inactive = {} +TOML +} diff --git a/lib/themes/nord.sh b/lib/themes/nord.sh index 5761c41..6d393ed 100644 --- a/lib/themes/nord.sh +++ b/lib/themes/nord.sh @@ -90,3 +90,38 @@ gui: - "#d8dee9" YAML } + +write_yazi_config() { + cat >"$1" <<'TOML' +[manager] +cwd = { fg = "#ebcb8b" } +tab_active = { fg = "#2e3440", bg = "#ebcb8b" } +tab_inactive = { fg = "#e5e9f0", bg = "#3b4252" } +border_symbol = "│" +border_style = { fg = "#4c566a" } +count_copied = { fg = "#2e3440", bg = "#a3be8c" } +count_cut = { fg = "#2e3440", bg = "#bf616a" } +count_selected = { fg = "#2e3440", bg = "#ebcb8b" } + +[status] +separator_open = "" +separator_close = "" +mode_normal = { fg = "#2e3440", bg = "#a3be8c", bold = true } +mode_select = { fg = "#2e3440", bg = "#ebcb8b", bold = true } +mode_unset = { fg = "#2e3440", bg = "#bf616a", bold = true } +progress_label = { fg = "#d8dee9", bold = true } +progress_normal = { fg = "#81a1c1", bg = "#3b4252" } +progress_error = { fg = "#bf616a", bg = "#3b4252" } + +[input] +border = { fg = "#ebcb8b" } +title = {} +value = {} +selected = { reversed = true } + +[select] +border = { fg = "#ebcb8b" } +active = { fg = "#a3be8c", bold = true } +inactive = {} +TOML +} diff --git a/lib/themes/tokyonight.sh b/lib/themes/tokyonight.sh index 78f5143..067808b 100644 --- a/lib/themes/tokyonight.sh +++ b/lib/themes/tokyonight.sh @@ -90,3 +90,38 @@ gui: - "#c0caf5" YAML } + +write_yazi_config() { + cat >"$1" <<'TOML' +[manager] +cwd = { fg = "#e0af68" } +tab_active = { fg = "#1a1b26", bg = "#e0af68" } +tab_inactive = { fg = "#a9b1d6", bg = "#283457" } +border_symbol = "│" +border_style = { fg = "#3b4261" } +count_copied = { fg = "#1a1b26", bg = "#9ece6a" } +count_cut = { fg = "#1a1b26", bg = "#f7768e" } +count_selected = { fg = "#1a1b26", bg = "#e0af68" } + +[status] +separator_open = "" +separator_close = "" +mode_normal = { fg = "#1a1b26", bg = "#9ece6a", bold = true } +mode_select = { fg = "#1a1b26", bg = "#e0af68", bold = true } +mode_unset = { fg = "#1a1b26", bg = "#f7768e", bold = true } +progress_label = { fg = "#c0caf5", bold = true } +progress_normal = { fg = "#7aa2f7", bg = "#283457" } +progress_error = { fg = "#f7768e", bg = "#283457" } + +[input] +border = { fg = "#e0af68" } +title = {} +value = {} +selected = { reversed = true } + +[select] +border = { fg = "#e0af68" } +active = { fg = "#9ece6a", bold = true } +inactive = {} +TOML +} diff --git a/lib/yazi.sh b/lib/yazi.sh new file mode 100644 index 0000000..3158f5e --- /dev/null +++ b/lib/yazi.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Step 8: Yazi file manager + +step "8/11 — Installing Yazi" + +if $IS_ARCH; then + $PKG_INSTALL yazi ffmpegthumbnailer p7zip poppler +else + YAZI_VERSION=$(curl -ks "https://api.github.com/repos/sxyazi/yazi/releases/latest" | jq -r '.tag_name') + curl -ksSLo /tmp/yazi.zip "https://github.com/sxyazi/yazi/releases/download/${YAZI_VERSION}/yazi-x86_64-unknown-linux-musl.zip" + unzip -qo /tmp/yazi.zip -d /tmp/yazi-extract + sudo install -m 755 /tmp/yazi-extract/yazi-x86_64-unknown-linux-musl/yazi /usr/local/bin/yazi + rm -rf /tmp/yazi.zip /tmp/yazi-extract + # Optional thumbnailer/preview deps + sudo apt install -y ffmpegthumbnailer p7zip-full poppler-utils 2>/dev/null || true +fi +info "Yazi installed/updated" + +mkdir -p ~/.config/yazi +backup_config ~/.config/yazi/theme.toml +write_yazi_config ~/.config/yazi/theme.toml +info "Yazi configured with $THEME_DISPLAY_NAME" diff --git a/lib/zellij.sh b/lib/zellij.sh index dd08fbe..93afc02 100644 --- a/lib/zellij.sh +++ b/lib/zellij.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 4: Zellij terminal multiplexer -step "4/9 — Installing Zellij" +step "5/11 — Installing Zellij" if $IS_ARCH; then $PKG_INSTALL zellij diff --git a/lib/zsh.sh b/lib/zsh.sh index 48bb2b7..4582d27 100644 --- a/lib/zsh.sh +++ b/lib/zsh.sh @@ -1,7 +1,7 @@ #!/bin/bash # Step 2: Zsh + Oh My Zsh + plugins -step "2/9 — Setting up Zsh" +step "3/11 — Setting up Zsh" if [[ ! -d "$HOME/.oh-my-zsh" ]]; then RUNZSH=no KEEP_ZSHRC=yes CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended ||