Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b7d3991
Replace Vagrant with OrbStack and Multipass for testing
alanrrb Mar 21, 2026
06f3f27
Replace RVM with mise for Ruby and Node.js version management
alanrrb Mar 21, 2026
0612484
Update Docker installation to use official repository
alanrrb Mar 21, 2026
461670f
Update tmux version from 3.1b to 3.6a
alanrrb Mar 21, 2026
120a845
Improve ubuntu.sh: update Gogh URL, standardize on curl, make Docker …
alanrrb Mar 21, 2026
0df1a79
Update install.sh: remove system ruby, use mise for rake install
alanrrb Mar 21, 2026
3d5881e
Update mac.sh: fix Homebrew installer, replace deprecated packages
alanrrb Mar 21, 2026
13808f6
Switch test_mac.sh from OrbStack to UTM for graphical testing
alanrrb Mar 21, 2026
0fb6767
Expand macOS testing instructions with detailed UTM setup guide
alanrrb Mar 21, 2026
dce2d55
Remove test_mac.sh, UTM setup is manual and documented in README
alanrrb Mar 21, 2026
8479b5b
Rewrite tests/README.md with detailed UTM setup and remove test_mac.s…
alanrrb Mar 21, 2026
600dd1e
Update Vagrantfile to use UTM provider with Ubuntu 24.04
alanrrb Mar 21, 2026
72a1fa6
Fix install.sh for VM testing and update peepcode theme for mise
alanrrb Mar 21, 2026
2716578
Switch to bento/ubuntu-24.04 box and add rsync to install.sh
alanrrb Mar 21, 2026
29559b5
Update aliases: docker compose v2, fix deprecated flags and commands
alanrrb Mar 21, 2026
49258d1
Update zsh config: increase history, fix guards, remove stale complet…
alanrrb Mar 21, 2026
6a811db
Update vim plugins: replace syntastic with ALE, fix repo references
alanrrb Mar 22, 2026
28be237
Update gitconfig: fix deprecated stash save, Gdiff, and push default
alanrrb Mar 22, 2026
61985de
Update pryrc for modern Pry, remove CodeRay color customization
alanrrb Mar 22, 2026
a635659
Remove reattach-to-user-namespace from tmux copy mode on macOS
alanrrb Mar 22, 2026
acacbfc
Rewrite README.md and update CLAUDE.md to reflect all changes
alanrrb Mar 22, 2026
0850b9c
Rewrite Vim.md and Tmux.md with complete key mapping reference
alanrrb Mar 22, 2026
7783115
Add GitHub Actions CI to test installation on Ubuntu and macOS
alanrrb Mar 22, 2026
e58d05d
Increase mise HTTP timeout in CI to 120s
alanrrb Mar 22, 2026
21f4a1e
Install Ruby and Node sequentially to avoid download timeout
alanrrb Mar 22, 2026
337aa3b
Call mac.sh before mise to install Ruby build dependencies
alanrrb Mar 22, 2026
fd9e93f
Load brew shellenv after mac.sh so mise finds Homebrew dependencies
alanrrb Mar 22, 2026
e57779f
Add OrbStack to mac.sh for Docker and Docker Compose on macOS
alanrrb Mar 22, 2026
dc2427b
Update README to mention OrbStack for Docker on macOS
alanrrb Mar 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test Install

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dotfiles
run: CI=true LOCAL_INSTALL=1 MISE_HTTP_TIMEOUT=120 bash install.sh
- name: Verify mise
run: |
eval "$(~/.local/bin/mise activate bash)"
mise current ruby
mise current node
- name: Verify symlinks
run: |
test -L ~/.aliases
test -L ~/.zshrc
test -L ~/.vimrc
test -L ~/.tmux.conf
test -L ~/.gitconfig
- name: Verify vim-plug
run: test -f ~/.vim/autoload/plug.vim

macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install dotfiles
run: CI=true LOCAL_INSTALL=1 MISE_HTTP_TIMEOUT=120 bash install.sh
- name: Verify mise
run: |
eval "$(~/.local/bin/mise activate bash)"
mise current ruby
mise current node
- name: Verify symlinks
run: |
test -L ~/.aliases
test -L ~/.zshrc
test -L ~/.vimrc
test -L ~/.tmux.conf
test -L ~/.gitconfig
- name: Verify vim-plug
run: test -f ~/.vim/autoload/plug.vim
52 changes: 52 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Overview

This is **Campus Code Dotfiles (cc_dotfiles)** — a shared dotfiles distribution for zsh, vim, tmux, and git, targeting macOS and Ubuntu.

## Installation

```bash
# Remote install (clones to ~/.cc_dotfiles, then runs rake install)
bash -c "$(curl -fSs https://raw.githubusercontent.com/campuscode/cc_dotfiles/master/install.sh)"

# Local install (from a cloned repo)
LOCAL_INSTALL=1 bash install.sh
```

The `install.sh` installs system dependencies, sets up mise (Ruby/Node.js), then copies the repo to `~/.cc_dotfiles` and runs `rake install`. The Rake task symlinks config files into `~/` (prefixed with `.`), installs fonts, vim-plug plugins, zsh-syntax-highlighting, tmux-battery plugin, and changes the default shell to zsh.

## Testing

Tests run in isolated VMs to avoid affecting the host machine:
- **macOS**: Vagrant + UTM plugin with Ubuntu 24.04 Desktop (`vagrant up --provider=utm`)
- **Linux**: Multipass with Ubuntu 24.04 (`./tests/test_linux.sh`)

See [tests/README.md](tests/README.md) for detailed setup instructions.

## Architecture

**install.sh** is the entry point — installs system packages, mise, Ruby, and Node.js, then copies the repo and runs `rake install`.

**Rakefile** is the installer — symlinks files, runs `mac.sh` or `ubuntu.sh` for platform-specific prerequisites, and sets up plugins.

**mac.sh / ubuntu.sh** install platform-specific dependencies (Homebrew packages on macOS, Docker/tmux/Gogh on Ubuntu).

**Customization layer**: Every config file sources a `.local` counterpart if present. Users put personal overrides in `.local` files rather than modifying the repo.

**Key conventions**:
- Vim leader key is `<Space>`
- Tmux prefix is `C-a` (not the default `C-b`)
- Zsh uses vi mode with `jj` bound to escape
- Default colorscheme is gruvbox (dark background)
- Vim plugin manager is [vim-plug](https://github.com/junegunn/vim-plug) (`~/.vim/plugins.vim`)
- Vim settings are auto-loaded from `vim/settings/*.vim`
- Zsh functions are auto-loaded from `zsh/functions/*`
- Zsh theme is `peepcode` (`zsh/themes/peepcode.theme`)
- Ruby and Node.js managed by [mise](https://mise.jdx.dev)

**Shell aliases** (`aliases`): git shortcuts (`gs`=status, `gco`=checkout, `gp`=push, `gpsh`=push current branch), docker compose aliases (`dc`, `dcr`, `dcup`), and Rails/Ruby aliases (`rc`, `rs`, `rdm`).

**Git config** (`git/gitconfig`): patience diff algorithm, vimdiff as merge tool, rerere enabled, push default is `simple`. Local overrides via `~/.gitconfig.local`.
84 changes: 49 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,72 @@
CAMPUS CODE Dotfiles
====================
# Campus Code Dotfiles

![](https://i.imgur.com/XogkB7V.png)

## Source of inspiration
A shared dotfiles distribution for **zsh**, **vim**, **tmux**, and **git**, targeting macOS and Ubuntu.

Our dotfiles are based on following amazing dotfiles:
Inspired by [Skwp Dotfiles](https://github.com/skwp/dotfiles) and [ThoughtBot Dotfiles](https://github.com/thoughtbot/dotfiles).

[Skwp Dotfiles](http://github.com/skwp/dotfiles)
## What's included

[ThoughtBot Dotfiles](http://github.com/thoughtbot/dotfiles)
- **Zsh** with vi mode, custom theme (peepcode), syntax highlighting, and extensive aliases
- **Vim** with vim-plug, gruvbox colorscheme, ALE linting, NERDTree, CtrlP, and tmux integration
- **Tmux** with `C-a` prefix, vim-aware pane navigation, battery status, and vi copy mode
- **Git** with aliases, patience diff, vimdiff merge tool, and rerere enabled
- **mise** for Ruby and Node.js version management
- **Docker** and Docker Compose via [OrbStack](https://orbstack.dev) (macOS) or Docker CE (Linux, optional)

## Requirements

* Zsh
* [Ag](https://github.com/ggreer/the_silver_searcher)
* [ITerm 2 (Mac)](https://www.iterm2.com/index.html)
* MVim (Mac) or GVim (Linux)
* [Gruvbox](https://github.com/morhetz/gruvbox)
* Tmux

## Pre-Requirements
## Pre-requisites

- curl

Ubuntu
On Ubuntu, if not already installed:

- `sudo apt-get install -y curl`
```bash
sudo apt-get install -y curl
```

## Install

Run follow command:

```bash
bash -c "$(curl -fSs https://raw.githubusercontent.com/campuscode/cc_dotfiles/master/install.sh)"
```
sh -c "`curl -fSs https://raw.githubusercontent.com/campuscode/cc_dotfiles/master/install.sh`"

You will be prompted for your password to change the default shell to zsh.

For local development installs (from a cloned repo):

```bash
LOCAL_INSTALL=1 bash install.sh
```

Type your password to change your default shell to `zsh`
## Customization

## Docs
Every config file sources a `.local` counterpart if present. Place your personal overrides in these files rather than modifying the repo directly:

| File | Purpose |
|---|---|
| `~/.aliases.local` | Custom shell aliases |
| `~/.zshrc.local` | Zsh configuration overrides |
| `~/.zshenv.local` | Environment variables |
| `~/.vimrc.local` | Vim settings and colorscheme |
| `~/.plugins.vim.local` | Additional vim plugins |
| `~/.tmux.conf.local` | Tmux configuration overrides |
| `~/.gitconfig.local` | Git user name, email, and overrides |
| `~/.secrets` | API keys and tokens (not tracked by git) |

[Vim Key Mapping](Vim.md)
## Key conventions

[Tmux Key Mapping](Tmux.md)
- **Vim leader**: `<Space>`
- **Tmux prefix**: `C-a`
- **Zsh vi mode**: `jj` to escape
- **Colorscheme**: gruvbox (dark)

## Docs

#### It's easy to make your customization
- [Vim Key Mapping](Vim.md)
- [Tmux Key Mapping](Tmux.md)
- [Testing](tests/README.md)

Place your customization in the following files:
## Options

* .aliases.local
* .secrets
* .zshrc.local
* .vimrc.local
* .zshenv.local
* .plugin.vim.local
* .tmux.conf.local
* .gitconfig.local
- `SKIP_DOCKER=1` — skip Docker installation on Linux
6 changes: 2 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def install_vim_plugins
end

def change_shell
return if ENV['CI']
puts "You will change your default shell to zsh"
run_command %{ chsh -s $(which zsh) }
end
Expand Down Expand Up @@ -109,9 +110,6 @@ end
def linux_message
puts ''
puts "- Change your terminal window to Run command as login shell and RESTART"
puts ''
puts "- You can find more information about this on \r
https://github.com/rvm/ubuntu_rvm"
end

def installation_message
Expand All @@ -121,7 +119,7 @@ def installation_message
puts 'Thank you!'
puts ''
puts ''
linux_message if linux?
puts "- Run 'mise install ruby node' to install latest versions" if linux?
puts '======================================================================='
end

Expand Down
81 changes: 68 additions & 13 deletions Tmux.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,76 @@
## Tmux
# Tmux Key Mappings

### Prefix
Prefix key is `C-a` (Ctrl+a).

- Ctrl-a
## Sessions

### Navigation
| Key | Action |
|---|---|
| `C-a d` | Detach from current session |
| `C-a C-a` | Switch to last active window |

- Vim navigation style with Ctrl-h j k l
## Windows

### Splits
| Key | Action |
|---|---|
| `C-a c` | Create new window (in current directory) |
| `C-a r` | Reload tmux configuration |

- Ctrl-a v opens a vertical split
- Ctrl-a s opens a horizontal split
- Ctrl-z toggles zoom out/in on the current split
## Panes

## Global
### Creating panes

- Ctrl-d detaches current split
- Ctrl-e synchronizes all splits
- Ctrl-E turn off splits synchronization
| Key | Action |
|---|---|
| `C-a v` | Vertical split (side by side) |
| `C-a s` | Horizontal split (top and bottom) |

### Navigating panes

Pane navigation is shared with vim — works seamlessly across vim splits and tmux panes.

| Key | Action |
|---|---|
| `C-h` | Move to left pane |
| `C-j` | Move to pane below |
| `C-k` | Move to pane above |
| `C-l` | Move to right pane |

### Resizing panes

| Key | Action |
|---|---|
| `Shift-Left/Right` | Resize horizontally (small step) |
| `Shift-Up/Down` | Resize vertically (small step) |
| `C-Left/Right` | Resize horizontally (large step) |
| `C-Up/Down` | Resize vertically (large step) |
| `C-z` | Toggle zoom on current pane |

## Synchronization

Send the same input to all panes in a window — useful for running the same command on multiple servers.

| Key | Action |
|---|---|
| `C-a e` | Enable pane synchronization |
| `C-a E` | Disable pane synchronization |

## Copy Mode

Enter copy mode with `C-a C-[`. Uses vi keybindings.

| Key | Action |
|---|---|
| `v` | Begin selection |
| `C-v` | Toggle rectangle selection |
| `y` | Copy selection to clipboard |
| `Enter` | Copy selection to clipboard |

## Status Bar

The status bar shows:
- Current session name and user (left)
- Window list (center)
- Battery status, hostname, and date/time (right)

Windows are automatically renamed to the current directory.
17 changes: 12 additions & 5 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/focal64"
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-24.04"

config.vm.synced_folder ".", "/vagrant", id: "vagrant-root"
config.vm.synced_folder "~/workspace", "/workspace", id: "vagrant-repos"
config.vm.provider :utm do |utm|
utm.name = "cc-dotfiles"
utm.memory = 4096
utm.cpus = 2
utm.directory_share_mode = "virtFS"
utm.notes = "Campus Code Dotfiles testing VM"
end

config.vm.network :private_network, ip: "192.168.10.10"
config.vm.synced_folder ".", "/vagrant"

config.vm.provision "shell", inline: "apt-get update && apt-get install -y curl"
end
Loading
Loading