Skip to content
Closed
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ make install

- `pro [path]` — jump to a project directory under `$PROJECTS_HOME` (`~/Projects` on macOS, `~` on Linux), with tab completion for nested paths
- `dfh [topic]` — dotfiles help; run `dfh` for version info and available topics, `dfh tmux` / `dfh fzf` / `dfh vim` for keybinding references extracted from config files
- `tmux-ssh <host>` — SSH into a machine and attach to (or create) a tmux session named `main`
7 changes: 4 additions & 3 deletions files/help/tmux
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

Within the session list (`prefix + s`): `x` to delete, `t` to tag.

Attach to a remote tmux over SSH:
Attach to (or create) a tmux session on a remote machine:
```sh
ssh darth.local -t "/opt/homebrew/bin/tmux attach"
tmux-ssh kylo
tmux-ssh 192.168.86.201
```

## Windows
Expand All @@ -38,7 +39,7 @@ ssh darth.local -t "/opt/homebrew/bin/tmux attach"
## Panes

| Key | Action |
|--------------------|-----------------------------------------|
|--------------------|------------------------------------------|
| `prefix + \|` | Split horizontally (keeps current path) |
| `prefix + -` | Split vertically (keeps current path) |
| `prefix + h/j/k/l` | Move between panes (vi-style) |
Expand Down
4 changes: 4 additions & 0 deletions files/shell/functions/tmux-ssh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tmux-ssh() {
local host="${1:?Usage: tmux-ssh <host>}"
ssh -t "$host" 'tmux new-session -A -s main'
}
Loading