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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tmux-deck"
version = "0.2.0"
version = "0.2.2"
edition = "2024"
authors = ["tkcd <goriponikeike55@gmail.com>"]
repository = "https://github.com/takeshid/tmux-deck"
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ The status bar always reflects your configured bindings.
| `Ctrl+n` | New session | `Ctrl+r` | Rename session |
| `Ctrl+x` | Kill session | `q` / `Esc` | Quit |
| `d` | Toggle agent view | `r` | Refresh |
| `Ctrl+d` / `Ctrl+u` | Scroll preview half-page down/up | `Ctrl+j` / `Ctrl+k` | Scroll preview one line down/up |

Preview scrolling applies to TreeView. Moving to another pane returns its
preview to the live tail; all four bindings can be changed in the configuration.

## Configuration

Expand Down Expand Up @@ -109,6 +113,10 @@ exit_on_switch = true
[keybindings]
quit = ["q", "Esc"]
new_session = "C-n"
preview_half_page_down = "C-d"
preview_half_page_up = "C-u"
preview_line_down = "C-j"
preview_line_up = "C-k"
```

See the fully commented [configuration reference](docs/config.example.toml)
Expand Down
8 changes: 6 additions & 2 deletions docs/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ preset = "default"
# Backspace Delete
# Examples: "q", "C-n", "S-Tab", "Space".
#
# Note: navigation (j/k/h/l, arrows, Tab) and the `za` fold / double-Space
# chords are fixed and not (yet) remappable.
# Note: tree navigation (j/k/h/l, arrows, Tab) and the `za` fold /
# double-Space chords are fixed and not (yet) remappable.
quit = ["q", "Esc"]
refresh = "r"
sort = "s" # TreeView + Sessions focus only
Expand All @@ -73,6 +73,10 @@ new_session = "C-n"
rename_session = "C-r"
kill_session = "C-x"
dashboard = "d" # toggle the Claude fleet dashboard
preview_half_page_down = "C-d" # TreeView preview: half a page toward the bottom
preview_half_page_up = "C-u" # TreeView preview: half a page toward the top
preview_line_down = "C-j" # TreeView preview: one line toward the bottom
preview_line_up = "C-k" # TreeView preview: one line toward the top

# -----------------------------------------------------------------------------
# Markers shown for hook-driven agent states. Each marker has a `glyph` and a
Expand Down
27 changes: 25 additions & 2 deletions src/actor/ui_actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,18 @@ impl UIActor {
self.state.open_kill_session_popup();
self.refresh_control.pause();
}
Action::PreviewHalfPageDown if self.state.view_mode == ViewMode::TreeView => {
self.state.tree_preview_scroll_down_half_page();
}
Action::PreviewHalfPageUp if self.state.view_mode == ViewMode::TreeView => {
self.state.tree_preview_scroll_up_half_page();
}
Action::PreviewLineDown if self.state.view_mode == ViewMode::TreeView => {
self.state.tree_preview_scroll_down_line();
}
Action::PreviewLineUp if self.state.view_mode == ViewMode::TreeView => {
self.state.tree_preview_scroll_up_line();
}
Action::Enter if self.state.view_mode == ViewMode::Dashboard => {
// Attach to the selected background session. The UI loop
// consumes `pending_attach` to run `claude attach <id>`.
Expand All @@ -461,6 +473,17 @@ impl UIActor {
}
}
Action::Dashboard => self.state.toggle_dashboard(),
Action::PreviewHalfPageDown
| Action::PreviewHalfPageUp
| Action::PreviewLineDown
| Action::PreviewLineUp => {
// A preview binding remapped to a plain navigation key
// remains usable in views where preview scrolling is not
// available.
if !is_ctrl {
self.handle_navigation_key(key.code);
}
}
// Context-gated actions whose gate is not satisfied fall through
// to navigation so the key is not swallowed.
Action::Sort | Action::Group => {
Expand Down Expand Up @@ -646,8 +669,8 @@ impl UIActor {
TmuxResponse::SessionsRefreshed { sessions } => {
self.state.update_sessions(sessions);
}
TmuxResponse::PaneCaptured { target: _, content } => {
self.state.update_pane_content(content);
TmuxResponse::PaneCaptured { target, content } => {
self.state.update_tree_preview_content(&target, content);
}
TmuxResponse::SessionCreated {
name,
Expand Down
Loading
Loading