Go to file
Bastien Chanot ea33e231ef docs(memory): add BDR-009 + LRN-008 (dtach menu -> ~/.bashrc, VS Code non-login)
- BDR-009: reverses BDR-007; menu moved to ~/.bashrc because VS Code
  Remote-SSH terminals are non-login; per-tab firing accepted over a
  once-per-connection sentinel.
- LRN-008: VS Code Remote-SSH (Linux) terminals are non-login -> skip
  ~/.profile; hook ~/.bashrc for "run once at session start"; diagnose via
  VSCODE_IPC_HOOK_CLI + no login-bash ancestry + shopt -q login_shell.
- journal: 2026-06-25 session entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CN1KSmsuLG6TxSeN5m8xvM
2026-06-26 00:09:16 +02:00
.claude docs(memory): add BDR-009 + LRN-008 (dtach menu -> ~/.bashrc, VS Code non-login) 2026-06-26 00:09:16 +02:00
bash fix(dtach): wire resume menu into ~/.bashrc for non-login VS Code shells 2026-06-26 00:09:16 +02:00
bin feat(bin): add dt, dtach-router, claude-provider CLI scripts 2026-05-27 18:51:04 +02:00
etc/profile.d feat(install): system-wide low-disk login warning via /etc/profile.d 2026-06-24 18:00:17 +02:00
vim added vim 2025-12-11 16:53:30 +01:00
.gitignore chore(claude): add onboard config — memory, tasks, audit, gitignore 2026-05-27 18:28:18 +02:00
CLAUDE.md feat(install): system-wide low-disk login warning via /etc/profile.d 2026-06-24 18:00:17 +02:00
install.sh fix(dtach): wire resume menu into ~/.bashrc for non-login VS Code shells 2026-06-26 00:09:16 +02:00
LICENSE chore: add GPL-3.0 license 2026-06-25 11:19:21 +02:00
README.md fix(dtach): wire resume menu into ~/.bashrc for non-login VS Code shells 2026-06-26 00:09:16 +02:00
remote-install.sh feat(install): add remote-install.sh curl|bash bootstrap 2026-05-27 18:28:37 +02:00

config

Personal dotfiles — vim + bash configuration and a one-shot installer.

Quick start

Install everything (clone + setup) with one command:

curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/master/remote-install.sh | bash

(Runs a remote script through bash — see the Install section for what it does and the manual alternative.)

What's inside

Path Purpose
install.sh Installs apt packages + Docker + code-server + RDP (gnome-remote-desktop), backs up old config, deploys vim + bashrc (OS-detected), installs CLI scripts, pipx tools, and a low-disk login warning.
vim/vimrc Vim config: pathogen, molokai, syntastic (C with -Wall -Werror -Wextra), NERDTree, 42-style canonical class generators (:ClassH, :ClassC).
vim/autoload/ pathogen.vim plugin loader (committed).
vim/colors/ molokai.vim colorscheme (committed).
bash/bashrc-linux bashrc for desktop Linux (git-aware prompt + command timer).
bash/bashrc-osx bashrc for macOS.
bin/dt dtach session manager for claude-in-dtach sessions.
bin/dtach-router Dashboard to resume dtach sessions, shown at the start of every interactive shell (wired into ~/.bashrc by the installer).
bin/claude-provider Switch Claude Code between Anthropic and OpenRouter.
etc/profile.d/disk-usage-warning.sh Login-time warning (bold red) when / or /home cross 85% usage. Deployed to /etc/profile.d/ on Linux.

Install

One-liner (clone + install)

curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/master/remote-install.sh | bash

remote-install.sh ensures git is present, clones the repo to ~/config (or pulls if already there), then runs install.sh. Override with env vars: REPO_URL=... CLONE_DIR=... BRANCH=... curl ... | bash.

Piping a remote script into bash runs unreviewed code over the network. Read remote-install.sh first, or use the manual clone below.

Manual

git clone https://git.bchanot.fr/bchanot/config.git && cd config
./install.sh

No argument — the OS is auto-detected.

What it does:

  1. On Debian/Ubuntu, installs a set of CLI/dev packages via apt-get (see below). Skipped automatically where apt-get is absent (macOS).
  2. Sets up Docker's official apt repo (Ubuntu) and installs the engine + compose plugin — skipped if docker is already present.
  3. Moves any existing ~/.vim, ~/.vimrc, ~/.bashrc, ~/.Sublivim to ~/Oldconfig.
  4. Clones the syntastic and nerdtree vim plugins into ~/.vim/bundle/.
  5. Copies the tracked vim files into ~/.vim and symlinks ~/.vimrc.
  6. Picks the bashrc by OS: macOS → bashrc-osx (falls back to bashrc-linux if missing), everything else → bashrc-linux. Copies it to ~/.bashrc.
  7. Installs Python CLIs via pipx (PyMuPDFpymupdf, Markdownmarkdown_py) — skipped if pipx is absent.
  8. Copies the bin/ scripts (dt, dtach-router, claude-provider) into ~/.local/bin. The dtach session-resume menu ships in the deployed bashrc-linux, so every interactive shell offers it — including VS Code Remote-SSH terminals, which are non-login and never read ~/.profile. The installer also strips any older dtach block left in ~/.profile so a plain SSH login doesn't prompt twice.
  9. On Linux, installs etc/profile.d/disk-usage-warning.sh to /etc/profile.d/ (needs sudo) so each login warns when / or /home cross 85% usage.
  10. On Linux, installs code-server (VS Code in the browser) via its vendor script — skipped if already present — and enables the code-server@$USER systemd service.
  11. On Linux, sets up RDP remote login via gnome-remote-desktop (Wayland-native): installs the daemon + openssl, generates a self-signed TLS cert once, and prompts interactively for shared "gate" credentials (skipped when no terminal is attached, or already set). Disables xrdp if present; opens UFW port 3389 only when UFW is already active.

Packages installed (apt)

  • Build / VCS / C dev: vim git git-lfs git-filter-repo gcc make pkg-config dkms valgrind shellcheck
  • Net / security / transport: curl gnupg ca-certificates apt-transport-https net-tools openssh-server cifs-utils lftp ftp
  • Shell tooling: unzip tree tmux fzf dtach
  • Runtimes: nodejs python3-pip pipx php-cli
  • Media / doc CLI: ffmpeg weasyprint poppler-utils qpdf webp libavif-bin
  • Docker: docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin (via Docker's repo)
  • Remote access: gnome-remote-desktop openssl (apt) + code-server (via its vendor install script, not apt) — RDP remote login + browser VS Code
  • pipx: PyMuPDF (pymupdf), Markdown (markdown_py)

The script is re-runnable: each run re-backs up to ~/Oldconfig (overwriting the previous backup), re-clones plugins, skips Docker if already installed, and re-deploys the bin/ scripts.

Notes: the package list is Debian/Ubuntu-specific, and the Docker repo step assumes Ubuntu. On macOS the whole apt-get block is skipped — install vim/git/toolchain via Homebrew yourself.

CLI scripts (bin/)

Deployed to ~/.local/bin (the deployed bashrc adds this dir to PATH):

  • dt — manage claude-in-dtach sessions (dt ls|at|kill). Needs dtach + fzf.
  • dtach-router — session dashboard shown at shell startup. It ships in the deployed bashrc and is sourced (not executed) in every interactive shell, so it also fires in VS Code Remote-SSH terminals (non-login shells that skip ~/.profile). Silent no-op when no session exists. Create a session with cc [name], re-open the menu anytime with d (both aliases from the bashrc). Needs dt, dtach, fzf.
  • claude-provider — switch Claude Code between Anthropic and OpenRouter. OpenRouter mode reads the key from $OPENROUTER_API_KEY (never hardcoded). Export it from a private, untracked file, e.g. ~/.bashrc.local:
    export OPENROUTER_API_KEY="<your-openrouter-key>"
    

Requirements

  • bash, git
  • Debian/Ubuntu apt-get for the package step (optional elsewhere)
  • A bash login shell (zsh users: switch to bash for these prompts to apply)

License

GPL-3.0-or-later — see LICENSE.

Copyright (C) 2026 Bastien Chanot.