| dotfiles | ||
| _lib.sh | ||
| .gitignore | ||
| CLAUDE.md | ||
| install_java_dev.sh | ||
| install_neovim.sh | ||
| install_nvchad.sh | ||
| install_postgres.sh | ||
| install_python3.sh | ||
| install_visidata.sh | ||
| README.md | ||
| setup_env.sh | ||
| sync.sh | ||
setup_env
Personal Linux development environment. Clone once, run one script, get a consistent shell and editor across machines.
Fresh machine
git clone git@gitea.hptrow.me:pt/setup_env.git ~/setup_env
cd ~/setup_env && ./setup_env.sh
setup_env.sh handles everything in order:
- Installs base packages (tmux, vim, git, fzf, ripgrep, pspg, bat)
- Downloads and installs latest Neovim to
/opt/ - Clones TPM, Vundle, bash-git-prompt
- Deploys all dotfile symlinks
- Clones and sets up NvChad nvim config from gitea
After install:
- Tmux: press
Ctrl-b + Ito install TPM plugins - Vim: run
:PluginInstallto install Vundle plugins - Edit
dotfiles/.bashrc_localwith your real credentials (auto-created from example) - Edit
dotfiles/.bashrc_pathswith PATH additions for tools on this machine (auto-created from example)
Day-to-day sync
cd ~/setup_env && ./sync.sh
Pulls the latest setup_env and nvim config repos, redeploys all symlinks. Safe to run anytime.
Optional installs
Run manually on machines that need them:
./install_postgres.sh # PostgreSQL from official apt repository
./install_python3.sh # Latest Python 3 from deadsnakes PPA
./install_java_dev.sh # SDKMAN for Java development
./install_visidata.sh # VisiData for terminal data exploration
Dotfile deployment
All config files are symlinked, not copied — editing ~/.<file> edits the repo file directly. git status always shows config drift.
| Source | Deployed to | Notes |
|---|---|---|
dotfiles/.bashrc |
~/.bashrc |
Main shell config |
dotfiles/.bashrc_local |
~/.bashrc_local |
Secrets/credentials — gitignored |
dotfiles/.bashrc_paths |
~/.bashrc_paths |
PATH and tool inits — gitignored |
dotfiles/.vimrc, .gitconfig, .tmux.conf, etc. |
~/<filename> |
Standard dotfiles |
dotfiles/bin/* |
~/.local/bin/<name> |
Executable scripts |
dotfiles/nvim/*.lua |
~/.config/nvim/lua/<name> |
Nvim lua modules |
When a tool appends lines to .bashrc, git status shows the modification — move those lines to .bashrc_paths instead.
Machine-specific config
Two gitignored files sourced by .bashrc, auto-bootstrapped from examples on first run:
.bashrc_local— DB connection strings, passwords, tokens.bashrc_paths— PATH additions (nvim, cargo, nvm, java, etc.)
td — markdown todo time tracking
Track time on markdown todos identified by a block-ref ^tid-*. Data lives in time.csv at the vault root.
Surfaces
| Surface | Location | How to use |
|---|---|---|
| CLI | bin/td → ~/.local/bin/td |
command td <subcommand> |
| Shell wrappers | .bashrc |
tstart, tstop, treport, tweek |
| Nvim | nvim/td.lua + nvim/td_mappings.lua |
<leader>ts/tp/tr/tw or :TdStart/Stop/Report/Week |
Subcommands
| Command | What it does |
|---|---|
td start <tid> [--file PATH] [--desc TEXT] |
Start timer, auto-stops any running entry |
td stop |
Close the open entry |
td report [filter] |
Total time per tid (filter matches tid or file) |
td week [--since DATE] |
Tasks from git log joined with time data |
td current |
Print the currently-running tid |
td tidgen |
Generate a fresh tid |
How td week works
Scans git log -p from cwd, pairs -/+ task-line diffs within each commit by tid:
[x]done —- [ ]→- [x]transition[ ]new — added- [ ]line with a fresh tid[+]done+new — created and completed in the same commit[o]reopen —- [x]→- [ ]transition
Nvim integration
<leader>ts on a - [ ] line auto-generates a ^tid-* block ref if missing, saves the buffer, and starts the timer. <leader>tp stops, <leader>tr shows a report float, <leader>tw shows the week float. Close floats with q or <Esc>.
Gotchas
tdalone is aliased torgfor todo-grepping. Usetweek,treportetc. orcommand tdto reach the CLI directly.- CSV is cwd-scoped. Run subcommands from the vault root. The nvim wrapper walks up to find it; shell wrappers trust your cwd.
- Data-model changes go in
bin/td. Shell and nvim surfaces stay thin wrappers.