panesync start + panesync end = panesync toggle
This commit is contained in:
@@ -170,10 +170,9 @@ next_tab = "ALT+SHIFT+L"
|
|||||||
open_font_selector = "ALT+T"
|
open_font_selector = "ALT+T"
|
||||||
open_scrollback = "ALT+S"
|
open_scrollback = "ALT+S"
|
||||||
create_worktree = "ALT+W"
|
create_worktree = "ALT+W"
|
||||||
pane_sync_start = "ALT+Y"
|
pane_sync_toggle = "ALT+Y"
|
||||||
pane_sync_select = "SPACE"
|
pane_sync_select = "SPACE"
|
||||||
pane_sync_commit = "ALT+SHIFT+Y"
|
pane_sync_commit = "ALT+SHIFT+Y"
|
||||||
pane_sync_end = "ALT+U"
|
|
||||||
paste = "CTRL+SHIFT+V"
|
paste = "CTRL+SHIFT+V"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -192,11 +191,10 @@ paste = "CTRL+SHIFT+V"
|
|||||||
- `Alt+s`: open the active pane scrollback in `$EDITOR`
|
- `Alt+s`: open the active pane scrollback in `$EDITOR`
|
||||||
- `Alt+w`: edit a worktree name, then run `git worktree add <relative_worktree_path>/<name>`
|
- `Alt+w`: edit a worktree name, then run `git worktree add <relative_worktree_path>/<name>`
|
||||||
from the previously focused pane's working directory
|
from the previously focused pane's working directory
|
||||||
- `Alt+y`: enter pane-sync selection mode
|
- `Alt+y`: enter pane-sync selection mode, cancel selection mode, or stop an active pane sync
|
||||||
- `Space`: toggle the focused pane in the sync set while pane-sync selection mode is active
|
- `Space`: toggle the focused pane in the sync set while pane-sync selection mode is active
|
||||||
- `Alt+Shift+y`: commit the current pane-sync selection; input typed or pasted into any synced
|
- `Alt+Shift+y`: commit the current pane-sync selection; input typed or pasted into any synced
|
||||||
pane is mirrored to the other synced panes
|
pane is mirrored to the other synced panes
|
||||||
- `Alt+u`: end pane sync
|
|
||||||
- `Ctrl+Shift+v`: paste
|
- `Ctrl+Shift+v`: paste
|
||||||
- Font default: `JetBrainsMono Nerd Font`
|
- Font default: `JetBrainsMono Nerd Font`
|
||||||
- Kitty graphics protocol parsing is enabled by default
|
- Kitty graphics protocol parsing is enabled by default
|
||||||
|
|||||||
@@ -41,8 +41,7 @@ next_tab = "ALT+SHIFT+L"
|
|||||||
open_font_selector = "ALT+T"
|
open_font_selector = "ALT+T"
|
||||||
open_scrollback = "ALT+S"
|
open_scrollback = "ALT+S"
|
||||||
create_worktree = "ALT+W"
|
create_worktree = "ALT+W"
|
||||||
pane_sync_start = "ALT+Y"
|
pane_sync_toggle = "ALT+Y"
|
||||||
pane_sync_select = "SPACE"
|
pane_sync_select = "SPACE"
|
||||||
pane_sync_commit = "ALT+SHIFT+Y"
|
pane_sync_commit = "ALT+SHIFT+Y"
|
||||||
pane_sync_end = "ALT+U"
|
|
||||||
paste = "CTRL+SHIFT+V"
|
paste = "CTRL+SHIFT+V"
|
||||||
|
|||||||
@@ -50,10 +50,9 @@ public record AppConfig(
|
|||||||
"open_font_selector",
|
"open_font_selector",
|
||||||
"open_scrollback",
|
"open_scrollback",
|
||||||
"create_worktree",
|
"create_worktree",
|
||||||
"pane_sync_start",
|
"pane_sync_toggle",
|
||||||
"pane_sync_select",
|
"pane_sync_select",
|
||||||
"pane_sync_commit",
|
"pane_sync_commit",
|
||||||
"pane_sync_end",
|
|
||||||
"paste"
|
"paste"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -120,10 +119,9 @@ public record AppConfig(
|
|||||||
Map.entry("open_font_selector", KeyBinding.parse("ALT+T")),
|
Map.entry("open_font_selector", KeyBinding.parse("ALT+T")),
|
||||||
Map.entry("open_scrollback", KeyBinding.parse("ALT+S")),
|
Map.entry("open_scrollback", KeyBinding.parse("ALT+S")),
|
||||||
Map.entry("create_worktree", KeyBinding.parse("ALT+W")),
|
Map.entry("create_worktree", KeyBinding.parse("ALT+W")),
|
||||||
Map.entry("pane_sync_start", KeyBinding.parse("ALT+Y")),
|
Map.entry("pane_sync_toggle", KeyBinding.parse("ALT+Y")),
|
||||||
Map.entry("pane_sync_select", KeyBinding.parse("SPACE")),
|
Map.entry("pane_sync_select", KeyBinding.parse("SPACE")),
|
||||||
Map.entry("pane_sync_commit", KeyBinding.parse("ALT+SHIFT+Y")),
|
Map.entry("pane_sync_commit", KeyBinding.parse("ALT+SHIFT+Y")),
|
||||||
Map.entry("pane_sync_end", KeyBinding.parse("ALT+U")),
|
|
||||||
Map.entry("paste", KeyBinding.parse("CTRL+SHIFT+V"))
|
Map.entry("paste", KeyBinding.parse("CTRL+SHIFT+V"))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -144,8 +144,15 @@ public final class Compositor {
|
|||||||
return paneSyncSelectMode;
|
return paneSyncSelectMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startPaneSyncSelection() {
|
public void togglePaneSync() {
|
||||||
if (activePane() == null || paneSyncSelectMode) {
|
if (paneSyncSelectMode || !paneSyncPanes.isEmpty()) {
|
||||||
|
paneSyncSelectMode = false;
|
||||||
|
paneSyncSelection.clear();
|
||||||
|
paneSyncPanes.clear();
|
||||||
|
layoutVersion++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (activePane() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
paneSyncSelectMode = true;
|
paneSyncSelectMode = true;
|
||||||
@@ -176,16 +183,6 @@ public final class Compositor {
|
|||||||
layoutVersion++;
|
layoutVersion++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void endPaneSync() {
|
|
||||||
if (!paneSyncSelectMode && paneSyncSelection.isEmpty() && paneSyncPanes.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
paneSyncSelectMode = false;
|
|
||||||
paneSyncSelection.clear();
|
|
||||||
paneSyncPanes.clear();
|
|
||||||
layoutVersion++;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<TerminalPane> paneSyncPeers(TerminalPane source) {
|
public List<TerminalPane> paneSyncPeers(TerminalPane source) {
|
||||||
prunePaneSyncState();
|
prunePaneSyncState();
|
||||||
if (source == null || !paneSyncPanes.contains(source)) {
|
if (source == null || !paneSyncPanes.contains(source)) {
|
||||||
|
|||||||
@@ -72,10 +72,9 @@ final class TerminalWindow {
|
|||||||
keyActions.put("open_font_selector", this::openFontSelector);
|
keyActions.put("open_font_selector", this::openFontSelector);
|
||||||
keyActions.put("open_scrollback", this::openScrollbackInEditor);
|
keyActions.put("open_scrollback", this::openScrollbackInEditor);
|
||||||
keyActions.put("create_worktree", this::createWorktreeInEditor);
|
keyActions.put("create_worktree", this::createWorktreeInEditor);
|
||||||
keyActions.put("pane_sync_start", compositor::startPaneSyncSelection);
|
keyActions.put("pane_sync_toggle", compositor::togglePaneSync);
|
||||||
keyActions.put("pane_sync_select", compositor::togglePaneSyncSelection);
|
keyActions.put("pane_sync_select", compositor::togglePaneSyncSelection);
|
||||||
keyActions.put("pane_sync_commit", compositor::commitPaneSyncSelection);
|
keyActions.put("pane_sync_commit", compositor::commitPaneSyncSelection);
|
||||||
keyActions.put("pane_sync_end", compositor::endPaneSync);
|
|
||||||
keyActions.put("paste", this::pasteFromClipboard);
|
keyActions.put("paste", this::pasteFromClipboard);
|
||||||
|
|
||||||
StackPane root = new StackPane(compositor.canvas(), compositor.imageOverlay());
|
StackPane root = new StackPane(compositor.canvas(), compositor.imageOverlay());
|
||||||
@@ -169,9 +168,9 @@ final class TerminalWindow {
|
|||||||
"next_floating",
|
"next_floating",
|
||||||
"previous_tab",
|
"previous_tab",
|
||||||
"next_tab",
|
"next_tab",
|
||||||
|
"pane_sync_toggle",
|
||||||
"pane_sync_select",
|
"pane_sync_select",
|
||||||
"pane_sync_commit",
|
"pane_sync_commit" -> true;
|
||||||
"pane_sync_end" -> true;
|
|
||||||
default -> false;
|
default -> false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user