Commit Graph
192 Commits
Author SHA1 Message Date
nicm ca5c28d224 Do not cancel mark when click on border. 2026-09-21 22:31:26 +00:00
nicm 641e75e6e2 Add T key to change pane title, from Fouad Wahabi in GitHub issue 5461. 2026-08-06 11:41:58 +00:00
nicm 4a9dbac435 Add a refresh-now command and change the r binding back to it in copy mode. 2026-08-05 15:40:04 +00:00
nicm 2a5389416a Add a menu on empty areas to allow a new pane to be created. 2026-07-22 22:06:20 +00:00
nicm cbb97b961c Add a mouse binding for empty areas of the window so C-Drag works on
them as well.
2026-07-15 12:04:24 +00:00
nicm 8fbbde7035 Add keys and menu items for copy mode line numbers, and a menu item for
auto refresh.
2026-07-13 18:59:02 +00:00
nicm 658e087f7a Add new-pane -M to create a new pane from a mouse binding and bind to
C-MouseDrag1Pane, removing the old ctrl-click-to-swap-pane binding.
2026-07-13 17:43:09 +00:00
nicm d29aa12117 Replace the notification system with events. Events can carry a payload of
additional payload (to reduce problems with lifetime of objects) and are
delivered to one or more event sinks. This is more powerful and reduces the
complex dependencies between control mode and hooks. Events are now used for
hooks, control mode notifications and for monitors (set-hook -B).

wait-for can now wait for an event to fire (-E flag, with -F to for filter),
with -v to print the payload, as well as listing (-l) waiting clients on an
event and forcing one to wake (-w).

A few additional hooks are also now available (pane-created, pane-resized, etc)
and some of the existing ones have additional format variables available.
2026-07-10 13:38:45 +00:00
nicm 7b02cb6d03 Fix . and ; bindings, reported by tb. 2026-07-07 12:30:36 +00:00
nicm 76b693aa81 Add C-b g , and C-b g . for move and resize menus, also add to pane menu
(and fix to make them work).
2026-07-07 09:45:09 +00:00
nicm 1ea574e4ca Set initial scrollbar state, from Michael Grant. 2026-07-07 07:47:03 +00:00
nicm af35bcb64f Restore { and } to swap-pane and for floating panes and use a separate
key table accessed by g (short for "gove and/or gesize") for floating
panes. So "C-b g Up" moves the pane to top-centre, "C-b g M-Up" moves
and resizes it. This means we not only do not lose the surprisingly
popular { and } bindings, but we can have more than four keys for moving
and resizing panes.
2026-07-07 07:43:07 +00:00
nicm 4378a17fbe Add floating panes key bindings and menu options, from Dane Jensen. 2026-07-03 18:14:45 +00:00
nicm 575f84ce0f Add switch-mode a fast switcher with fuzzy searching, bound to Tab (for
windows) or BTab (S-Tab, for sessions) by default.
2026-06-26 14:40:30 +00:00
nicm 51d037e881 Major rework of prompts. The basic prompt mechanics (draw, editing, etc)
are now wrapped up in prompt*.c and do not depend on a client. These
functions are used to provide the original client prompt but also to
allow panes to have their own prompts, which works much much better for
floating panes. The mode prompts for both the tree modes and copy mode
are switched over to be per pane.

There are some visible changes (some of these may be changed if they
don't seem to be working well):

- Prompts in modes now appear in the bottom line, covering whatever
  content was there.

- command-prompt has a -P flag to open a pane prompt.

- Because they cover the content, the default style for prompts in modes
  now does not fill the entire line; the main command prompt stays the
  same.

- The old completion menu has gone, and completions are now shown after
  the text. Builtin aliases are no longer completed.

- Clicking the mouse on the prompt now moves the cursor or selects a
  completion.
2026-06-25 11:39:11 +00:00
nicm 624db256c6 Add a loop_index variable and use it to show last used 5 sessions on the
session menu instead of next/previous.
2026-06-19 16:25:43 +00:00
nicm b29f5688bd Make default M-C-Up/Down bound to prompt movement commands in copy mode. 2026-06-19 15:28:26 +00:00
nicm d4defd943a Add -M to move-pane and default bindings for M-drag. From Michael Grant. 2026-06-17 07:52:21 +00:00
nicm ab92b27226 Make the resize keys always change right and bottom borders for floating
panes which is more intuitive.
2026-06-13 19:57:44 +00:00
nicm 56779f9542 Add Z index positions to move-pane -P. 2026-06-13 17:43:20 +00:00
nicm 19393e13db Add -P to move-pane to move a floating pane to a specific place
(top-left, bottom-right). Get rid of the not-so-useful default { and }
swap-pane bindings and use the keys instead for moving to top-left,
top-right and add M-{ and M-} for bottom-left, bottom-right.
2026-06-13 17:12:02 +00:00
nicm de60750506 Hide Swap Marked also since floating panes cannot be swapped yet. 2026-06-11 07:52:17 +00:00
nicm 8cb4aabb8b Replace refresh-from-pane in copy mode with a way to automatically
update as pane content changes. This is toggled by pressing r. GitHub
issue 5165 from Barrett Ruth.
2026-06-10 14:29:08 +00:00
nicm c9e22ab67b Enable floating panes. These are panes which sit above the layout
("tiled panes") like popups but unlike popups are not modal and behave
like panes (so the same escape sequence support). Floating panes are
created with the "new-pane" command, bound to * by default.

Currently floating panes can only be moved and resized using the mouse.
The default second status line (if "status-format" is set to 2) has
changed to show a list of panes.

This is the first step and many obvious features are not yet complete
(notably the ability to swap floating panes, resize them using
resize-pane, change them between floating and tiles, and restore custom
layouts with floating panes).

Mostly written by Michael Grant with help from Dane Jensen.
2026-06-07 08:25:59 +00:00
nicm 7769097915 Hide menu options that do not work for floating panes. 2026-05-28 10:34:38 +00:00
nicm f5a086ac98 Some more easy floating panes bits. 2026-05-19 12:16:25 +00:00
nicm 962e565591 Add Emacs-style recentre-top-bottom, GitHub issue 5053 from sinyax75 at
gmail dot com.
2026-05-07 09:15:44 +00:00
nicm 4a926e489b Make C-[ have the same bindings as Escape for terminals with extended
keys where they are different, GitHub issue 5035 from Eric NICOLAS.
2026-04-28 10:01:07 +00:00
nicm d36f6783c7 Add a couple of controls (kill, zoom) to default pane-status-format.
Will be more to come with floating panes. From Dane Jensen in GitHub
issue 4981.
2026-04-22 07:13:26 +00:00
nicm 86d4d5689c Add detach to default session menu, suggested by Przemyslaw Sztoch. 2026-04-14 07:35:17 +00:00
nicm 663e82bc19 Fix key binding conflict in session menu, from Dane Jensen. 2026-04-14 07:28:57 +00:00
nicm 49bb43047d Allow copy mode to work for readonly clients, except for copy commands,
from Dane Jensen.
2026-03-03 12:26:14 +00:00
nicm 09bd686327 Add sorting (-O flag) and a custom format (-F) to list-keys, from Dane
Jensen in GitHub issue 4845.
2026-02-24 08:20:52 +00:00
nicm 19b9a34c48 Only loop over clients if table actually found, from Conor Taylor in
GitHub issue 4848.
2026-02-10 08:28:53 +00:00
nicm 426467856d Add paste to the default pane menu, GitHub issue 4763. 2026-01-11 11:48:46 +00:00
nicm 188f963fe0 Add {current}/{active} for -t for current window or active pane, from
Manuel Einfalt in GitHub issue 4766.
2025-12-22 08:35:04 +00:00
nicm 672e89a640 Add a scroll-to-mouse command for copy mode to scroll to the mouse
position and bind to the scrollbar, brings the scrollbar keys into line
with the other mouse keys. From Michael Grant, GitHub issue 4731.
2025-12-10 21:24:43 +00:00
nicm 987e05ff31 Allow drag in alternate screen again, GitHub issue 4743 reported by Brad
King.
2025-12-04 22:50:34 +00:00
nicm 1a419609e3 Don't enter copy mode on mouse wheel in alternate screen, GitHub issue 3705. 2025-10-29 09:33:20 +00:00
nicm 0c5abfefd3 Add commands to centre the cursor in copy mode, from m-einfalt at gmx
dot de in GitHub issue 4662.
2025-10-28 16:36:52 +00:00
nicm 1370791734 Add a nicer default second and third status line, from Michael Grant in
GitHub 4490.
2025-08-14 07:15:40 +00:00
nicm 5db914b745 Add notes to menu keys, from someone in GitHub issue 4478. 2025-04-22 12:34:56 +00:00
nicm 713cacab1e Mouse support on the scrollbars, from Michael Grant. 2024-11-12 09:32:56 +00:00
nicm 9f2a853d87 Rework of copy mode commands ("send-keys -X") to parse the arguments so
that flags may be detected propertly rather than just looking for
strings ("-O" and so on). Also add -C and -P flags to the copy commands:
-C prevents the commands from sending the text to the clipboard and -P
prevents them from adding the text as a paste buffer.

Note some of the default key bindings change to add "--" and any similar
custom key bindings using "send-keys -X" may need a similar change.

GitHub issue 4153.
2024-10-04 07:03:08 +00:00
nicm 06292baadc Add mirrored versions of the main-horizontal and main-vertical layouts where
the main pane is bottom or right instead of top or left, from Sherwyn Sen.
2024-08-21 05:03:13 +00:00
nicm d9942c769e Add meta bindings for status line menus as well as the existing pane one
for terminals which steal the mouse menu button.
2023-08-15 09:51:48 +00:00
nicm 993e7a937f Tweak note for D key binding, from Clark Wang. 2023-02-02 09:06:44 +00:00
nicm 416c27c995 Add scroll-middle copy mode command to make cursor line in the middle,
from Varun Kumar E in GitHub issue 3307.
2022-08-23 08:14:19 +00:00
nicm 497021d0db Add some const, from Markus F X J Oberhumer. 2022-08-15 08:41:13 +00:00
nicm e139f977b1 vi(1) Home/End bindings, from Markus F X J Oberhumer. 2022-08-11 09:11:26 +00:00