Create a session in a chosen folder #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Ctrl+Shift+T, and New Session in the New menu, callnew_session→add_sessionincrates/terminalko/src/window.rs:So a new session joins the folder of whatever is selected, and lands unfiled
when nothing is selected or the selection is unfiled.
The gap
There is no way to say which folder a new session should go in. With a session in
Work selected, a new session cannot be created in Personal without creating it
and then moving it — and moving between folders is itself only possible after
issue #7.
Approach
Two additions, both small once #6's per-section menus exist:
adw::SidebarSection::set_menu_modelallows amenu per section, and because it is built per section the folder id can be
baked into the action target:
win.session-new-in(folder_id). This is thenatural place — right-click Work, New Session Here.
people who reach for the header bar rather than a right-click. The New menu is
already rebuilt from code (
rebuild_new_menu), so adding a submenu of foldersis a few lines.
Keep the existing behaviour for the plain
Ctrl+Shift+T: following the selectionis right when no folder is named.
Acceptance criteria
menu and from the New menu, and it appears in that folder immediately and after
a restart.
Ctrl+Shift+Tstill creates a session beside the selection.opened.
./build-aux/ci.shand./build-aux/smoke.shpass.Notes
mostly a menu entry.
CONTRIBUTING.mdapply.