Skip to content
leo-lucasPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

my-term - Terminal Configuration

Test Installation Scripts License

Complete terminal configuration for tmux, zsh, Neovim, and OpenCode


🚀 Quick Start

# Full installation
./install.sh

# Install software only (no configs)
./install.sh --no-config

# Install configs only (software already installed)
./install.sh --config-only

📋 Table of Contents

Installation

Automatic Installation

Run the installation script to set up everything:

./install.sh

This will install:

  • ✅ tmux with Dracula theme
  • ✅ zsh with Zinit and Spaceship theme
  • ✅ Oh My Zsh
  • ✅ NVM (Node Version Manager)
  • ✅ Neovim with custom config
  • ✅ OpenCode with custom config

Remote Installation

Install without cloning the repository:

curl -fsSL https://raw.githubusercontent.com/leo-lucas/my-term/main/install-from-github.sh | bash

Manual Setup

If you prefer to install components manually:

1. Install tmux

Linux (Debian/Ubuntu):

sudo apt update && sudo apt install tmux

macOS:

brew install tmux

Windows (WSL):

sudo apt update && sudo apt install tmux

2. Copy tmux configuration

cp ./.tmux.conf ~/.tmux.conf

3. Reload tmux

tmux source-file ~/.tmux.conf

4. Install Neovim

./install-nvim.sh

5. Install OpenCode

./install-opencode.sh

6. Setup zsh (optional)

./scripts/setup-zsh.sh
./scripts/setup-oh-my-zsh.sh
./scripts/setup-zshrc.sh
./scripts/setup-spaceship.sh
./scripts/setup-nvm.sh

Components

tmux

  • Prefix: C-x (changed from default C-b)
  • Theme: Dracula
  • Plugins: TPM, GPU, CPU, Memory, Time
  • Session management: Automatic session creation

zsh

  • Plugin Manager: Zinit
  • Theme: Spaceship
  • Plugins:
    • zsh-autosuggestions
    • zsh-completions
    • fast-syntax-highlighting
    • fzf-tab
  • Features:
    • NVM auto-activation via .nvmrc
    • History: 50,000 commands
    • Autocorrect and history reduction

Neovim

  • Config: From leo-lucas/my-nvim
  • Auto-installs: Plugins via PlugInstall

OpenCode

  • Config: From leo-lucas/my-opencode
  • Install: Via npm package opencode-ai

Configuration

tmux Configuration

File: ~/.tmux.conf

# Key bindings
bind -r C-x send-prefix
set -g prefix C-x
unbind C-b

# Themes
source $HOME/.tmux/plugins/tpm/plugins/dracula/dracula-tmux.conf

zsh Configuration

File: ~/.zshrc

# Zinit
source $HOME/.zinit/bin/zinit.zsh
zinit light spaceship-prompt/spaceship-prompt

# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

# load-nvmrc hook
autoload -U add-zsh-hook
load-nvmrc() {
  if [[ -f .nvmrc ]]; then
    nvm install
    nvm use
  fi
}
add-zsh-hook chpwd load-nvmrc

Testing

Run All Tests

# Using make
make test

# Or directly
bash scripts/tests/run-all-tests.sh

# Or specific test
bash scripts/tests/test.sh all

Test Coverage

All scripts are validated against:

  • ✅ Syntax validation (bash -n)
  • ✅ Shebang correctness (#!/usr/bin/env bash)
  • ✅ pipefail enabled (set -euo pipefail)
  • ✅ Argument support (--no-config, --config-only)
  • ✅ Dependency checks (zsh, curl, tmux, etc.)

Total Tests: 35/35 passed

GitHub Actions

Tests run automatically on:

  • Push to main/master
  • Pull Request creation

Check status at: Actions

Troubleshooting

tmux Configuration Not Loading

# Verify file exists
ls -la ~/.tmux.conf

# Reload configuration
tmux source-file ~/.tmux.conf

# Check for errors
tmux source-file ~/.tmux.conf 2>&1

zsh Issues

# Verify zsh is installed
which zsh

# Check .zshrc exists
ls -la ~/.zshrc

# Source manually
source ~/.zshrc

NVM Not Working

# Verify NVM is installed
ls -la ~/.nvm/nvm.sh

# Source NVM manually
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

# Install specific Node version
nvm install --lts

Common Issues

Issue Solution
tmux prefix not working Restart tmux: tmux source-file ~/.tmux.conf
zsh theme not loading Check ZSH_THEME="spaceship" in .zshrc
NVM not activating Ensure .nvmrc file exists in project
Plugin not loading Run tmux source-file ~/.tmux.conf and restart

Scripts Reference

Script Purpose
install.sh Master installer with all options
install-nvim.sh Neovim installation
install-opencode.sh OpenCode installation
scripts/setup-zsh.sh Install zsh
scripts/setup-oh-my-zsh.sh Install Oh My Zsh
scripts/setup-zshrc.sh Configure zshrc with Zinit
scripts/setup-spaceship.sh Install Spaceship theme
scripts/setup-nvm.sh Install NVM
scripts/setup-tmux.sh Install tmux

Testing

Unit Tests

# Run all tests
make test

# Validate syntax only
make test-syntax

# Run specific test
bash scripts/tests/test.sh all

GitHub Actions

Automated testing on PR:

  • ✅ Test installation scripts
  • ✅ Validate script syntax
  • ✅ Check shebang and pipefail
  • ✅ Verify install.sh references

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please read our Contributing Guide before submitting PRs.

Support


Made with ❤️ by leo-lucas

GitHub stars GitHub forks

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages