Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: lint

on:
push:
pull_request:

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run shellcheck
uses: ludeeus/action-shellcheck@master
with:
scandir: ./scripts
198 changes: 5 additions & 193 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,198 +1,10 @@
### DotfilesSh ###
# Dotfiles patch artifacts
local-patch
patched-src

### Go ###
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py
# macOS
**/.DS_Store

# Environments
# Local/secret overrides
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml

# ruff
.ruff_cache/

# LSP config files
pyrightconfig.json
**/.DS_Store
*.local
3 changes: 0 additions & 3 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ brew 'fzf'
brew 'git'
brew 'git-extras'
brew 'gnu-sed'
brew 'hub'
brew 'neofetch'
brew 'shellcheck'
brew 'zsh'
Expand All @@ -21,7 +20,6 @@ brew 'ripgrep'
brew 'asdf'
brew 'gpg2'
brew 'skopeo'
brew 'git'
brew 'stow'
brew 'tree'
brew 'python'
Expand All @@ -32,7 +30,6 @@ brew 'zsh-completion'
brew 'tmux'
brew 'pandoc'
brew 'openssl'
brew 'neofetch'
brew 'brightness'
brew 'awscli'
brew 'jq'
Expand Down
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ help:
@echo "Usage:\n"
@sed -n 's/^##//p' $(MAKEFILE_LIST) | column -t -s ':' | sed -e 's/^/ /'

.PHONY: all
## all: symlink every config
all: alacritty tmux nvim zsh git wakatime claude

.PHONY: alacritty
## alacritty: terminal emulator written in rust
alacritty:
Expand All @@ -18,9 +22,13 @@ tmux:
@ln -fs "$(CURDIR)/config/tmux/.tmux.conf.local" $(HOME)/.tmux.conf.local;

.PHONY: nvim
## nvim: neovim
## nvim: neovim (run nvim afterwards to finish plugin install)
nvim:
@git clone https://github.com/NvChad/starter ~/.config/nvim && nvim;
@if [ ! -d "$(CONFIG_PATH)/nvim" ]; then \
git clone https://github.com/NvChad/starter $(CONFIG_PATH)/nvim; \
else \
echo "nvim config already present at $(CONFIG_PATH)/nvim"; \
fi

.PHONY: nvim-update
## nvim-update: update neovim config
Expand Down Expand Up @@ -62,3 +70,8 @@ wakatime:
claude:
@mkdir -p $(HOME)/.claude;
@ln -fs "$(CURDIR)/prompts/CLAUDE.md" $(HOME)/.claude/CLAUDE.md;

.PHONY: lint
## lint: run shellcheck on shell scripts
lint:
@shellcheck scripts/*
47 changes: 42 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Welcome to ~/.*

These are my personal configuration dotfiles for pretty much everything I use across all systems.

![image](https://github.com/user-attachments/assets/680386ff-b822-4115-8a92-db4fee73e3c8)
# Welcome to ~/.*

These are my personal configuration dotfiles for pretty much everything I use across all systems.

![image](https://github.com/user-attachments/assets/680386ff-b822-4115-8a92-db4fee73e3c8)

## What's inside

| Path | Description |
| --- | --- |
| `Brewfile` | Homebrew formulae, casks, and fonts |
| `config/alacritty/` | Alacritty terminal config |
| `config/tmux/` | tmux overrides (`.tmux.conf.local`, on top of [gpakosz/.tmux](https://github.com/gpakosz/.tmux)) |
| `config/zsh/` | `.zshrc`, Powerlevel10k theme, and shell aliases |
| `config/git/` | global `.gitconfig` |
| `config/wakatime/` | WakaTime config (API key prompted on install) |
| `prompts/` | AI prompts, symlinked to `~/.claude/CLAUDE.md` |
| `scripts/` | bootstrap and GCP helper scripts |

## Install

Clone anywhere and run the bootstrap script — it installs Homebrew, Oh My Zsh,
tmux, the Brewfile, and symlinks every config. It's safe to re-run.

```sh
git clone https://github.com/<you>/dotfiles.git ~/dotfiles
cd ~/dotfiles
./scripts/setup_dotfiles
```

Open `nvim` once afterwards to finish the NvChad plugin install.

## Makefile targets

Symlink individual configs without the full bootstrap:

```sh
make help # list all targets
make all # symlink every config
make zsh # just the zsh config, etc.
make lint # run shellcheck over scripts/
```
38 changes: 14 additions & 24 deletions config/zsh/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@ grep_copy_pod(){
}

kexec(){
# after > $4 is present use it as arguments
# kexec <pod-pattern> [-c <container>] [cmd...]
local pod
pod=$(kpod "$1")
if [[ "$2" == "-c" ]]; then
if [[ "$4" == "" ]]; then
echo "kubectl exec -it $(kpod "$1") -c "$3" -- /bin/bash"
kubectl exec -it $(kpod "$1") -c "$3" -- /bin/bash
return
fi
echo "kubectl exec -it $(kpod "$1") -c "$3" -- $4 $5 $6 $7 $8 $9"
kubectl exec -it $(kpod "$1") -c "$3" -- $4 $5 $6 $7 $8 $9
local container="$3"
if [[ -z "$4" ]]; then
kubectl exec -it "$pod" -c "$container" -- /bin/bash
else
kubectl exec -it "$pod" -c "$container" -- "${@:4}"
fi
return
fi
kubectl exec -it $(kpod "$1") -- /bin/bash
kubectl exec -it "$pod" -- /bin/bash
}

# Python and Jupyter
Expand Down Expand Up @@ -58,8 +59,8 @@ alias gp="git push"
alias gf="git fetch"
alias gbr='git checkout $(git branch | fzf --layout=reverse) 2> /dev/null'

# fuzzy search command history
alias hgrep='cat ~/.zsh_history | fzf'
# fuzzy search command history (strip the ": <timestamp>:<elapsed>;" prefix, newest first)
alias hgrep='sed "s/^: [0-9]*:[0-9]*;//" ~/.zsh_history | fzf --tac'

# copy command output via pipe
alias -g P='| pbcopy'
Expand Down Expand Up @@ -91,19 +92,8 @@ alias hr="cd ~/dev/hr"
alias gl="cd ~/dev/gl"
alias personal="cd ~/dev/personal"

if [ -x "$(command -v colorls)" ]; then
# sudo gem install colorls
alias ls="colorls"
alias la="colorls -al"
fi

if [ -x "$(command -v exa)" ]; then
# brew install exa
alias ls="exa"
alias la="exa --long --all --group"
fi

if [ -x "$(command -v eza)" ]; then
# brew install eza
alias ls="eza --icons"
alias la="eza --long --icons --all --group"
fi
Expand All @@ -126,7 +116,7 @@ print_submodules_in_dir () {
done
}

alias ghtoken="cat ~/.ghtoken | pbcopy"
alias ghtoken="gh auth token | pbcopy"
alias dive="docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_API_VERSION=1.37 wagoodman/dive:latest"

# Function to manage AI prompts
Expand Down
Loading
Loading