Skip to content

feat: SSH environment parity#3

Open
jhwheeler wants to merge 15 commits intoarch-hyprland-updatefrom
ssh-environment-parity
Open

feat: SSH environment parity#3
jhwheeler wants to merge 15 commits intoarch-hyprland-updatefrom
ssh-environment-parity

Conversation

@jhwheeler
Copy link
Copy Markdown
Owner

Summary

  • Fix SSH-broken aliases: guard pbcopy/pbpaste behind $WAYLAND_DISPLAY and cat=bat behind command -v bat; use command -v nvim for EDITOR instead of checking $SSH_CONNECTION
  • SSH-specific overrides: new shell/common/ssh sourced automatically on SSH — OSC52 clipboard passthrough via kitty, safe fallbacks for missing tools
  • One-command server bootstrap: bin/bootstrap-remote.sh idempotently installs base packages, dotfiles (SSH-safe subset), nvim AppImage + NormalNvim fork, starship, atuin (local-only), and tpm plugins
  • Atuin config: atuin/config.toml with auto_sync=false tracked in repo, linked on both local and remote

New files

File Purpose
shell/common/ssh SSH-specific shell overrides (OSC52 clipboard, safe fallbacks)
install-ssh.conf.yaml Dotbot config: SSH-safe symlink subset (no Wayland-specific tools)
bin/bootstrap-remote.sh Idempotent one-command bootstrap for a fresh server
atuin/config.toml Atuin config with auto_sync=false

Test plan

  • Open a new local shell — verify pbcopy/pbpaste and cat still work (Wayland running, bat installed)
  • ssh rheo and run bash ~/projects/dotfiles/bin/bootstrap-remote.sh
  • On remote: nvim --version → 0.11+, tmux with C-a prefix, starship prompt, fzf/rg/fd available
  • On remote: pbcopy sends OSC52 sequence (clipboard works in kitty)
  • On remote: atuin history list shows local history, no sync attempt
  • ssh-add -l from rheo shows local keys (ForwardAgent)

🤖 Generated with Claude Code

jhwheeler and others added 15 commits February 26, 2026 17:20
Restore sessions list with labels and pipe separator on the left,
custom window styling, and simplified status-right without battery.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Make the local shell environment reproducible on any remote server with a
single bootstrap command, and fix local aliases that broke over SSH.

Changes:
- shell/common/env: use `command -v nvim` for EDITOR (works on remote);
  source ~/.shell/ssh when $SSH_CONNECTION is set
- shell/common/aliases: guard pbcopy/pbpaste behind $WAYLAND_DISPLAY;
  guard cat=bat behind command -v bat; add `kitten ssh` alias (guarded)
- shell/common/ssh (new): OSC52 pbcopy for clipboard-over-SSH, safe
  fallbacks for missing tools, unalias Hyprland-specific aliases
- atuin/config.toml (new): auto_sync=false, enter_accept=true
- install.conf.yaml: add ~/.shell/ssh, ~/.config/atuin symlinks + create dir
- install-ssh.conf.yaml (new): SSH-safe dotbot config (no Wayland-specific
  tools — hypr, waybar, kitty, mako, swaylock, kmonad)
- bin/bootstrap-remote.sh (new): idempotent one-command server bootstrap
  (packages → dotfiles → nvim AppImage → NormalNvim → starship → atuin → tpm)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pairs with resurrect to persist session state (windows, panes, working
dirs) every minute. On tmux server start after a reboot, sessions are
automatically restored.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setup.sh writes a regular ~/.bashrc before dotbot runs, which dotbot's
relink skips silently. force: true replaces the file with a symlink so
the dotfiles bashrc (with aliases, starship, atuin, etc.) actually loads.

Add /usr/local/go/bin to PATH conditionally so the Go toolchain stays
accessible after the dotfiles bashrc supersedes setup.sh's PATH export.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix nvim appimage URL (https, arch-aware download)
- Add lazygit install to bootstrap-remote
- Expand EDITOR assignment for clarity
- Note pbpaste OSC52 limitation
- Bump tmux continuum save interval to 15 min
Use C-a locally (Dracula purple/blue) and C-s over SSH (Catppuccin
Mocha peach/yellow) so nested tmux sessions have distinct prefixes
and visually distinct status bars. Add SSH label to remote status-right,
disable XON/XOFF flow control for C-s, and auto-name SSH sessions
as ssh-<hostname> with stale-client detach on reconnect.
Clone NormalNvim fork into ~/.config/nvim if not already present,
so remote machines get the full nvim setup after running ./install.
Outer tmux intercepts C-h/j/k/l before they reach the inner session.
Over SSH, bind pane navigation to prefix + h/j/k/l instead so
C-s h/j/k/l works in nested tmux.
Set detach-on-destroy on per grouped session and use exec so the
terminal closes cleanly rather than falling through to the base
"default" session.
Replace grouped session approach with simple new-session per terminal.
Each gets an auto-named independent session; prefix+s to switch between.
The run-based bindings with $is_vim failed silently over SSH because
the variable isn't available in the spawned shell, causing tmux to
fall back to the default last-window binding on prefix+l. Prefix-based
bindings don't need vim detection since the prefix already disambiguates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant