{"id":20458026,"url":"https://github.com/zelongguo/.config","last_synced_at":"2026-04-29T14:33:31.111Z","repository":{"id":163486094,"uuid":"638973571","full_name":"ZelongGuo/.config","owner":"ZelongGuo","description":":gear: My Unix configurations.","archived":false,"fork":false,"pushed_at":"2026-03-18T08:19:34.000Z","size":8480,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-18T23:35:42.700Z","etag":null,"topics":["aerospace","iterm2","kitty","lazygit","ranger","tmux","yazi","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZelongGuo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-10T13:45:58.000Z","updated_at":"2026-03-18T08:19:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"6626b0e1-2414-4d1d-8a7e-87fcd392b9e6","html_url":"https://github.com/ZelongGuo/.config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZelongGuo/.config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZelongGuo%2F.config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZelongGuo%2F.config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZelongGuo%2F.config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZelongGuo%2F.config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZelongGuo","download_url":"https://codeload.github.com/ZelongGuo/.config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZelongGuo%2F.config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32429139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aerospace","iterm2","kitty","lazygit","ranger","tmux","yazi","zsh"],"created_at":"2024-11-15T12:10:13.301Z","updated_at":"2026-04-29T14:33:31.104Z","avatar_url":"https://github.com/ZelongGuo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dotfiles\n\n![macOS](https://img.shields.io/badge/macOS-11%2B-999999?logo=apple\u0026logoColor=white)\n![Linux](https://img.shields.io/badge/Linux-Ubuntu%20%7C%20Debian-orange?logo=linux\u0026logoColor=white)\n![Shell](https://img.shields.io/badge/shell-Zsh-2200cc?logo=zsh\u0026logoColor=white)\n![Editor](https://img.shields.io/badge/editor-Neovim-57A143?logo=neovim\u0026logoColor=white)\n\n\u003e Cross-platform configuration files for macOS and Linux, featuring a modular Zsh setup, Neovim Lua config, and terminal workflow optimizations.\n\n---\n\n## Overview\n\nThis repository contains my personal dotfiles, designed for daily development work across macOS and Linux systems. The configuration emphasizes:\n\n- **Modular structure** - Easy to maintain and extend\n- **Cross-platform compatibility** - macOS and Linux support with OS-specific configs\n- **Terminal-centric workflow** - Optimized for Vim/tmux/fzf usage\n- **Smart automation** - Auto-symlinking, proxy detection, and environment setup\n\n---\n\n## Quick Start\n\n### Prerequisites\n\nThe bootstrap script will check for these. If missing, it will show installation instructions:\n\n- **Git** - For cloning and updating\n- **Zsh** - The shell these configs are designed for\n\nIf you want to install manually beforehand:\n\n```bash\n# macOS\nbrew install zsh git\n\n# Ubuntu/Debian\nsudo apt install zsh git\n\n# Arch Linux\nsudo pacman -S zsh git\n```\n\n### Installation\n\n```bash\n# Clone repository\ncd ~\ngit clone https://github.com/ZelongGuo/.config.git .config\n\n# Run bootstrap script (checks prerequisites automatically)\n~/.config/scripts/bootstrap.sh\n\n# Make zsh your default shell (if not already)\nchsh -s $(which zsh)\n# Then log out and log back in\n```\n\nThe bootstrap script will:\n1. Detect your operating system (macOS or Linux)\n2. Create symlinks for OS-specific configurations\n3. Create symlinks for home directory configs (.zshrc, .zimrc, etc.)\n4. Reload zsh configuration\n\n**Symlink behavior:**\n- New symlinks are created automatically\n- Existing incorrect symlinks are replaced\n- Existing regular files/directories are **preserved** (not overwritten)\n- Run `~/.config/scripts/symlink.sh` anytime to refresh symlinks\n\n### Linux Installation (with existing .config)\n\nIf your `~/.config` directory already contains system configurations (e.g., `dconf`, `gtk-3.0`, `ibus`, `nautilus`) that you want to preserve, use the **temporary directory method**:\n\n```bash\n# Clone to a temporary directory inside .config\ngit clone \u003cyour-repo-url\u003e ~/.config/dotfiles-temp\n\n# Run the bootstrap script\n~/.config/dotfiles-temp/scripts/bootstrap.sh\n\n# Make zsh your default shell\nchsh -s $(which zsh)\n\n# Restart your terminal or log out and back in\n```\n\n**Why this method?**\n- The repository uses a restrictive `.gitignore` strategy (ignore all, include only tracked files)\n- Directly cloning to `~/.config` would not pull existing untracked files\n- This approach preserves your existing system configurations while deploying dotfiles\n\n**Updating later:**\n```bash\ncd ~/.config/dotfiles-temp\ngit pull\n~/.config/dotfiles-temp/scripts/bootstrap.sh\n```\n\n**Optional cleanup:**\nAfter deployment, you can delete the temporary directory if you don't plan to update frequently:\n```bash\nrm -rf ~/.config/dotfiles-temp\n```\n\n---\n\n## Features\n\n### Shell (Zsh + Zim)\n\n- **Zim Framework** - Fast Zsh configuration framework with modules\n- **Custom Vim keybindings** - hjkl navigation with `jk` to enter normal mode\n- **Smart cursor** - Beam/bar cursor changes based on Vim mode\n- **FZF integration** - Enhanced fuzzy finding with custom colors and previews\n- **Auto tmux** - Automatically starts tmux session on shell launch\n- **Git proxy auto-config** - Detects Clash/Mihomo Party and configures git proxy\n\n### Editor (Neovim)\n\n- **Lua-based configuration** - Modern, fast, and maintainable\n- **Custom keybindings** - Remapped cursor movement (i/k/j/l for up/down/left/right)\n- **LSP support** - Language Server Protocol for intelligent code completion\n- **VimTeX** - LaTeX editing with compile and preview support\n- **Telescope** - Fuzzy finder for files, buffers, and more\n- **Lazy.nvim** - Modern plugin manager\n\n### Terminal Tools\n\n| Tool | Purpose |\n|------|---------|\n| **tmux** | Terminal multiplexer with powerline status bar |\n| **kitty** | Fast, GPU-accelerated terminal emulator |\n| **fzf** | Command-line fuzzy finder with fd integration |\n| **yazi** | Blazing fast terminal file manager |\n| **lazygit** | Terminal UI for git operations |\n| **ranger** | Console file manager with preview |\n\n---\n\n## Directory Structure\n\n```\n~/.config/\n├── zsh/                      # Zsh configuration\n│   ├── zshrc                # Main entry point\n│   ├── zimrc                # Zim framework modules\n│   ├── env.zsh              # Common environment variables\n│   ├── aliases.zsh          # Common aliases (vim=nvim, ra=yazi, etc.)\n│   ├── vim_keybindings.zsh  # Vim-style keybindings with cursor shapes\n│   ├── fzf_completion.zsh   # FZF fuzzy completion setup\n│   ├── tmux.zsh             # Tmux auto-start and environment sync\n│   ├── zim.zsh              # Zim framework initialization\n│   └── os/\n│       ├── macos.zsh        # macOS: GMT, Conda, Homebrew, proxy\n│       └── linux.zsh        # Linux: placeholder for platform-specific\n│\n├── os/                       # OS-specific configs\n│   ├── macos/               # macOS-only applications\n│   │   ├── aerospace/       # Aerospace window manager config\n│   │   ├── iterm2/          # iTerm2 dynamic profiles\n│   │   └── brew/            # Homebrew Brewfile\n│   └── linux/               # Linux-only applications (reserved)\n│\n├── scripts/                  # Utility scripts\n│   ├── bootstrap.sh         # Auto-install script\n│   └── symlink.sh           # Symlink management\n│\n├── nvim/                     # Neovim Lua configuration\n│   ├── init.lua             # Entry point\n│   ├── lua/                 # Modular Lua configs\n│   ├── ftplugin/            # Filetype-specific settings\n│   └── spell/               # Spell files\n│\n├── tmux/                     # Tmux configuration\n│   ├── .tmux.conf           # Main tmux config\n│   ├── tmux-powerline/      # Status bar themes\n│   └── extrakto/            # Text extraction plugin\n│\n├── kitty/                    # Kitty terminal config\n├── yazi/                     # Yazi file manager config\n│   ├── yazi.toml            # Main config\n│   ├── keymap.toml          # Keybindings\n│   ├── theme.toml           # Theme settings\n│   ├── flavors/             # Color schemes\n│   └── plugins/             # Yazi plugins\n│\n├── lazygit/                  # Lazygit UI config\n├── ranger/                   # Ranger file manager config\n├── surfingkeys/              # Vim-like browser extension\n├── git/                      # Git global config\n├── btop/                     # System monitor theme\n└── opencode/                 # Custom skills/scripts\n```\n\n### Cross-Platform vs OS-Specific\n\n| Type | Location | Examples |\n|------|----------|----------|\n| **Cross-platform** | `~/.config/\u003cname\u003e/` | kitty, nvim, tmux, yazi, lazygit |\n| **macOS-only** | `os/macos/\u003cname\u003e/` → symlinked | aerospace, iterm2, brew |\n| **Linux-only** | `os/linux/\u003cname\u003e/` → symlinked | (add as needed) |\n\n---\n\n## Dependencies\n\n### Essential (for basic functionality)\n\n| Tool | Purpose | Install |\n|------|---------|---------|\n| **zsh** | Shell | `brew install zsh` / `sudo apt install zsh` |\n| **git** | Version control | `brew install git` / `sudo apt install git` |\n| **nvim** | Editor (set as $EDITOR) | `brew install nvim` / `sudo apt install neovim` |\n\n### Recommended (enhanced experience)\n\n| Tool | Purpose | Install |\n|------|---------|---------|\n| **tmux** | Terminal multiplexer | `brew install tmux` / `sudo apt install tmux` |\n| **fzf** | Fuzzy finder | `brew install fzf` / `sudo apt install fzf` |\n| **fd** | Faster find | `brew install fd` / `sudo apt install fd` |\n| **ripgrep** | Faster grep | `brew install rg` / `sudo apt install ripgrep` |\n| **lazygit** | Git UI | `brew install lazygit` |\n| **bat** | Better cat with syntax highlighting | `brew install bat` |\n| **highlight** | Syntax highlighting for previews | `brew install highlight` |\n\n### Optional (personal preference)\n\n| Tool | Purpose | Install |\n|------|---------|---------|\n| **yazi** | Blazing fast file manager | `brew install yazi` |\n| **btop** | Modern system monitor | `brew install btop` |\n| **ranger** | Console file manager | `brew install ranger` |\n\n### macOS Only\n\n| Tool | Purpose | Install |\n|------|---------|---------|\n| **aerospace** | Tiling window manager | `brew install --cask nikitabobko/tap/aerospace` |\n| **kitty** | GPU terminal | `brew install kitty` |\n\n---\n\n## Keyboard Shortcuts\n\n### Aliases\n\n| Alias | Command | Description |\n|-------|---------|-------------|\n| `vim` | `nvim` | Use Neovim |\n| `vi` | `nvim` | Use Neovim |\n| `ra` | `yazi` | Open file manager |\n| `t` | `tmux` | Attach/Create tmux session |\n| `g` | `lazygit` | Open lazygit |\n| `f` | `fzf` | Open fuzzy finder |\n| `tn` | `tmux new -s zelong` | Create named session |\n\n### Tmux Operations\n\nPrefix: `Ctrl-a`\n\n| Keys | Operations |\n|------|------------|\n| **Pane Operations** | |\n| `C-a -` | Split pane horizontally |\n| `C-a \\` | Split pane vertically |\n| `C-a i/j/k/l` | Move cursor up/left/down/right |\n| `C-a f` | Toggle full pane |\n| `C-a \u003e/\u003c` | Swap with prev/next pane |\n| `C-a h/j/k/l` | Resize pane |\n| `C-a q` | Kill pane |\n| **Window Operations** | |\n| `C-a c` | Create new window |\n| `C-a number` | Select window by number |\n| `C-a C-j/C-l` | Select prev/next window |\n| `C-a C-q` | Kill window |\n| **Copy Mode** | |\n| `C-a [` | Enter vim-copy mode |\n| `C-a p` | Paste buffer |\n| `C-a b` | List buffers |\n\n### Vim Keybindings (Shell)\n\n| Keys | Mode | Operations |\n|------|------|------------|\n| `jk` | Insert → Normal | Switch to normal mode |\n| `h/j/k/l` | Normal | Left/down/up/right |\n| `H/L` | Normal | Insert at bol/eol |\n| `i/k` | Normal | Up/down in history |\n| `u` | Normal | Undo |\n\n### Neovim Custom Keybindings\n\n| Keys | Mode | Operations |\n|------|------|------------|\n| **Cursor Movement (Remapped)** | | |\n| `i/k/j/l` | Normal | Up/down/left/right |\n| `I/K/J/L` | Normal | Move 5 lines |\n| `f/F` | Normal | Find backward/forward |\n| **Buffer/Window** | | |\n| `sn/si/sk/sj/sl` | Normal | Split new window |\n| `sml` | Normal | Rotate windows |\n| **Telescope** | | |\n| `\u003cleader\u003eff` | Normal | Find files |\n| `\u003cleader\u003efg` | Normal | Live grep |\n| `\u003cleader\u003efb` | Normal | Find buffers |\n| `\u003cleader\u003efr` | Normal | Recent files |\n\n### Kitty Operations\n\n| Keys | Operations |\n|------|------------|\n| `cmd +` | Increase font size |\n| `cmd -` | Decrease font size |\n| `cmd 0` | Reset font size |\n\n---\n\n## OS-Specific Notes\n\n### macOS\n\nThe following are macOS-only and managed via symlinks:\n\n- **aerospace** - Window manager (requires macOS 14+)\n- **iterm2** - iTerm2 dynamic profiles\n- **brew** - Homebrew package management (Brewfile)\n\n**macOS-specific features:**\n- GMT (Generic Mapping Tools) path configuration\n- Homebrew Tsinghua mirrors for domestic users\n- Git proxy auto-config (detects Clash/Mihomo Party on port 14122)\n\nTo add a new macOS-specific config:\n```bash\nmv ~/.config/new-app ~/.config/os/macos/new-app\n~/.config/scripts/symlink.sh\n```\n\n### Linux (Ubuntu/Debian)\n\nEdit `~/.config/zsh/os/linux.zsh` to add Linux-specific settings such as:\n- Conda path\n- Package manager aliases\n- Proxy settings\n\n---\n\n## Customization\n\n### Adjust Paths\n\nEdit OS-specific files to match your system:\n\n**macOS**: `~/.config/zsh/os/macos.zsh`\n- GMT path: `GMTHOME`\n- Conda path: `conda`\n- Homebrew mirrors (Tsinghua vs official)\n\n**Linux**: `~/.config/zsh/os/linux.zsh`\n- Add your Linux-specific paths and settings\n\n### First-Time Setup\n\n1. **Zim framework**: Auto-installs on first run, restart terminal after\n2. **Conda**: Uncomment and adjust path in OS-specific zsh file\n3. **GMT**: Adjust `GMTHOME` path if different from default\n\n### Modifying Tmux Status Bar\n\nEdit `~/.config/tmux/tmux-powerline/themes/default.sh` to customize the bottom bar appearance.\n\n---\n\n## Verification\n\nAfter installation, verify with:\n\n```bash\n# Environment variables\necho $EDITOR    # should output: nvim\necho $TERM      # should output: xterm-256color\n\n# Aliases\nalias vim       # should output: vim='nvim'\nalias ra        # should output: ra='yazi'\n\n# OS-specific\nwhich brew     # macOS: shows path, Linux: no output\n\n# Symlinks (macOS only)\nls -la ~/.config/aerospace  # -\u003e os/macos/aerospace\nls -la ~/.config/iterm2     # -\u003e os/macos/iterm2\nls -la ~/.config/brew       # -\u003e os/macos/brew\n```\n\n---\n\n## Tips\n\n:star: **Recommendation**: Swap `CapsLock` and `Ctrl` for better Vim/tmux experience. See [this guide](https://www.emacswiki.org/emacs/MovingTheCtrlKey) for Linux systems.\n\n### Useful Commands\n\n```bash\n# Reload zsh configuration\nsource ~/.config/zsh/zshrc\n\n# Recreate all symlinks\n~/.config/scripts/symlink.sh\n\n# Update Homebrew packages and Brewfile\nbrew bundle dump --force --file=~/.config/os/macos/brew/Brewfile.txt\n\n# Clean up unused Homebrew packages\nbrew bundle cleanup --file=~/.config/os/macos/brew/Brewfile.txt\nbrew autoremove \u0026\u0026 brew cleanup\n```\n\n---\n\n## Troubleshooting\n\n**Config not loading?**\n```bash\nsource ~/.config/zsh/zshrc\n```\n\n**Symlinks broken?**\n```bash\n~/.config/scripts/symlink.sh\n```\n\n**`.claude/skills` symlink failed?**\nThis requires Claude Code CLI to be installed. Skip this error if you don't use Claude Code:\n- The symlink attempts to link `opencode/skills` → `~/.claude/skills`\n- If `~/.claude` directory doesn't exist, the symlink will be skipped\n- To install Claude Code: https://claude.com/claude-code\n\n**Zim not working?**\n```bash\nrm -rf ~/.zim\ncurl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh\n```\n\n**Tmux powerline icons not showing?**\n1. Check terminal font - use a Nerd Font or Powerline font\n2. Try `tmux -u` for UTF-8 mode\n3. Check iTerm2 profile settings for UTF-8 encoding\n\n**Git proxy issues?**\n```bash\n# Unset proxy manually\ngit config --global --unset http.proxy\ngit config --global --unset https.proxy\n```\n\n---\n\n## Maintenance\n\n### Updating Homebrew Bundle\n\n```bash\n# After installing new packages, update Brewfile\nbrew bundle dump --force --file=~/.config/os/macos/brew/Brewfile.txt\n```\n\n### Keeping Config in Sync\n\n```bash\ncd ~/.config\ngit add .\ngit commit -m \"Update configs\"\ngit push\n```\n\n---\n\n## License\n\nMIT\n\n---\n\n## Credits\n\nBuilt with:\n- [Zim](https://github.com/zimfw/zimfw) - Zsh configuration framework\n- [Neovim](https://neovim.io/) - Modern Vim-based text editor\n- [Tmux](https://github.com/tmux/tmux) - Terminal multiplexer\n- [FZF](https://github.com/junegunn/fzf) - Command-line fuzzy finder\n- [Kitty](https://sw.kovidgoyal.net/kitty/) - GPU terminal emulator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzelongguo%2F.config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzelongguo%2F.config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzelongguo%2F.config/lists"}