aboutsummaryrefslogtreecommitdiff
path: root/key-bindings.c
Commit message (Collapse)AuthorAge
...
* Now that cmdlists are reference counted, there is no need for two-stepnicm2014-05-14
| | | | deletion via the dead_key_bindings tree. From Keith Amling.
* Remove the "info" message mechanism, this was only used for about fivenicm2014-04-17
| | | | | | mostly useless and annoying messages. Change those commands to silence on success like all the others. Still accept the -q command line flag and "quiet" server option for now.
* Add resize-pane -Z to temporary zoom the active pane to occupy the fullNicholas Marriott2013-03-24
| | | | | | | | | | | | | | window or unzoom (restored to the normal layout) if it already zoomed, bound to C-b z by default. The pane is unzoomed on pretty much any excuse whatsoever. We considered making this a new layout but the requirements are quite different from layouts so decided it is better as a special case. Each current layout cell is saved, a temporary one-cell layout generated and all except the active pane set to NULL. Prompted by suggestions and scripts from several. Thanks to Aaron Jensen and Thiago Padilha for testing an earlier version.
* Add a command queue to standardize and simplify commands that call otherNicholas Marriott2013-03-24
| | | | | | | | | | | | | | | | | | | | | | commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested. Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed. When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty. Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
* Need to set clients in context before changing their reference count.Nicholas Marriott2013-03-22
|
* Remove unnecessary initializers of cmd_ctx.Nicholas Marriott2013-03-22
|
* Remove the layout undo/redo code which never really worked.Nicholas Marriott2013-01-17
|
* xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott2012-07-10
|
* Add choose-tree command to show windows and sessions in the sameNicholas Marriott2012-07-08
| | | | | list. Change choose-window and -session to use the same code. From Thomas Adam.
* Add a couple of NULL pointer checks to key binding functions, fromNicholas Marriott2012-06-18
| | | | jspenguin on SF bug 3535531.
* Add a layout history which can be stepped through with select-layout -uNicholas Marriott2012-04-01
| | | | and -U commands (bound to 'u' and 'U' by default).
* Use RB trees not SPLAY.Nicholas Marriott2012-01-21
|
* Include the existing window and session name in the prompt when renamingNicholas Marriott2011-07-03
| | | | and add a new key binding ($) for rename session. From Tiago Cunha.
* Clean up and simplify tmux command argument parsing.Nicholas Marriott2011-01-04
| | | | | | | | | | | | | | | | | | | Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept. This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function). This is overall more simple and consistent. There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
* Track the last session for a client and add a flag to switch-client andNicholas Marriott2010-12-11
| | | | a key binding (L) to move a client back to its last session.
* Add a last-pane command (bound to ; by default). Requested ages ago byNicholas Marriott2010-10-23
| | | | somebody whose name I have forgotten.
* Add -n and -p flags to switch-client to move to the next and previousNicholas Marriott2010-09-08
| | | | | | | session (yes, it doesn't match window/pane, but so what, nor does switch-client). Based on a diff long ago from "edsouza".
* Setting the cmdlist pointer in the bind-key to NULL to prevent it being freedNicholas Marriott2010-06-26
| | | | | | | | | | | after the command is executing is bogus because it may still be needed if the same command is going to be executed again (for example if you "bind-key a bind-key b ..."). Making a copy is hard, so instead add a reference count to the cmd_list. While here, also print bind-key -n and the rest of the flags properly. Fixes problem reported by mcbride@.
* Add a choose-buffer command for easier use of the paste buffer stack.Nicholas Marriott2010-06-21
|
* Identical behaviour to select-prompt can now be obtained withNicholas Marriott2010-05-05
| | | | | command-prompt, so remove select-prompt and change ' to be bound to command-prompt -p index "select-window -t :%%".
* Add a tiled layout, originally from Liam Bedford a while ago, fixed upNicholas Marriott2010-04-25
| | | | by me.
* Merge copy mode and output mode, dropping the latter. Idea and code fromNicholas Marriott2010-04-06
| | | | Micah Cowan.
* Support up, down, left, right movement through panes with -UDLR flags toNicholas Marriott2010-03-22
| | | | | | | select-pane. Also REMOVE the up- and down-pane commands: equivalent behaviour is now available using -t :.+ and -t :.-.
* Support attaching a client read-only with a new -r flag to the attach-sessionNicholas Marriott2010-02-06
| | | | command.
* Add "server options" which are server-wide and not bound to a session orNicholas Marriott2009-12-10
| | | | | | | window. Set and displayed with "set -s" and "show -s". Currently the only option is "quiet" (like command-line -q, allowing it to be set from .tmux.conf), but others will come along.
* Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott2009-12-03
| | | | | time now I've configured emacs to make them displayed in really annoying colours...
* Add a per-client log of status line messages displayed while that clientNicholas Marriott2009-11-18
| | | | | | | | exists. A new message-limit session option sets the maximum number of entries and a command, show-messages, shows the log (bound to ~ by default). This (and prompt history) might be better as a single global log but until there are global options it is easier for them to be per client.
* Zap unused functions, prompted by deraadt.Nicholas Marriott2009-11-13
|
* Remove scroll mode which is now redundant, copy mode should be used instead.Nicholas Marriott2009-10-06
| | | | The = key binding now does nothing.
* Add a new display-panes command, with two options (display-panes-colour andNicholas Marriott2009-08-31
| | | | | display-panes-time), which displays a visual indication of the number of each pane.
* Add a choose-client command and extend choose-{session,window} to accept aNicholas Marriott2009-08-25
| | | | | | | | | | | template. After a choice is made, %% (or %1) in the template is replaced by the name of the session, window or client suitable for -t and the result executed as a command. So, for example, "choose-window "killw -t '%%'"" will kill the selected window. The defaults if no template is given are (as now) select-window for choose-window, switch-client for choose-session, and detach-client for choose-client (now bound to D).
* The cursession member in struct cmd_ctx is always either curclient->session orNicholas Marriott2009-08-23
| | | | NULL when curclient is also NULL, so just eliminate it.
* Permit commands to be bound to key presses without the prefix key first. TheNicholas Marriott2009-07-24
| | | | | new -n flag to bind-key and unbind-key sets or removes these bindings, and list-key shows them in []s.
* Tidy up keys: use an enum for the key codes, and remove the macros which justNicholas Marriott2009-07-21
| | | | wrap flag sets/clears/tests.
* Improved layout code.Nicholas Marriott2009-07-19
| | | | | | | | | | | | | | | | | | | | | | | Each window now has a tree of layout cells associated with it. In this tree, each node is either a horizontal or vertical cell containing a list of other cells running from left-to-right or top-to-bottom, or a leaf cell which is associated with a pane. The major functional changes are: - panes may now be split arbitrarily both horizontally (splitw -h, C-b %) and vertically (splitw -v, C-b "); - panes may be resized both horizontally and vertically (resizep -L/-R/-U/-D, bound to C-b left/right/up/down and C-b M-left/right/up/down); - layouts are now applied and then may be modified by resizing or splitting panes, rather than being fixed and reapplied when the window is resized or panes are added; - manual-vertical layout is no longer necessary, and active-only layout is gone (but may return in future); - the main-pane layouts now reduce the size of the main pane to fit all panes if possible. Thanks to all who tested.
* - New command display-message (alias display) to display a message in theNicholas Marriott2009-07-17
| | | | | | | | | | status line (bound to "i" and displays the current window and time by default). The same substitutions are applied as for status-left/right. - Add support for including the window index (#I), pane index (#P) and window name (#W) in the message, and status-left or status-right. - Bump protocol version. From Tiago Cunha, thanks!
* Remove a duplicate key binding, and turn off autorepeat for up/down as it isNicholas Marriott2009-07-17
| | | | kind of annoying by default.
* Make status_message_set a variadic printf-like function. No functional change -Nicholas Marriott2009-07-15
| | | | helpful for a couple of things coming soon.
* Creating a key binding which replaces itself (such as "bind x bind x lsw")Nicholas Marriott2009-07-12
| | | | | | | | | | frees the command list bound to the key while it is still being executed, leading to a use after free. To prevent this, create a dead keys list and defer freeing replaced or removed key bindings until the main loop when the key binding will have finished executing. Found by Johan Friis when creating a key binding to reload his configuration file.
* Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott2009-06-01
terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti