summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.h
AgeCommit message (Collapse)Author
2009-10-11Add a pipe-pane command to allow a pane to be piped to a shell command, forNicholas Marriott
example: pipe-pane 'cat >~/out' No arguments stops outputing and closes the pipe; the -o flag toggles a pipe and on and off (useful for key bindings). Suggested by espie@.
2009-10-11Collect status from dead jobs and don't invoke the callback until bothNicholas Marriott
all input (the socket is closed) and status is available.
2009-10-11Clean up by introducing a wrapper struct for mouse clicks rather than passingNicholas Marriott
three u_chars around. As a side-effect this fixes incorrectly rejecting high cursor positions (because it was comparing them as signed char), reported by Tom Doherty.
2009-10-10Put all jobs on a global all_jobs list and use that in server.c instead ofNicholas Marriott
running through all the clients.
2009-10-10Split list-panes off from list-windows.Nicholas Marriott
2009-10-10Rather than running status-left, status-right and window title #() with popenNicholas Marriott
immediately every redraw, queue them up and run them in the background, starting each once every status-interval. The actual status line uses the output from the last run. This brings several advantages: - tmux itself may be called from inside #() without causing the server to hang; - likewise, sleep or similar doesn't cause the server to block; - commands aren't run excessively often when redrawing; - commands shared by status-left and status-right, or used multiple times, will only be run once. run-shell and if-shell still use system()/popen() but will be changed over to use this too later.
2009-10-10New option, mouse-select-pane. If on, the mouse may be used to select theNicholas Marriott
current pane. Suggested by sthen@ and also by someone else ages ago who I have forgotten.
2009-10-10Add "grouped sessions" which have independent name, options, current window andNicholas Marriott
so on but where the linked windows are synchronized (ie creating, killing windows and so on are mirrored between the sessions). A grouped session may be created by passing -t to new-session. Had this around for a while, tested by a couple of people.
2009-10-10Support for individual session idle time locking. May be enabled by turning offNicholas Marriott
the lock-server option (it is on by default). When this is off, each session locks when it has been idle for the lock-after-time setting. When on, the entire server locks when ALL sessions have been idle for their individual lock-after-time settings. This replaces one global-only option (lock-after-time) with another (lock-server), but the default behaviour is usually preferable so there don't seem to be many alternatives. Diff/idea largely from Thomas Adam, tweaked by me.
2009-10-09The UTF-8 detection idea doesn't work and I am reasonably happy with theNicholas Marriott
current methods, so remove the (already #ifdef 0'd) code.
2009-10-06Remove scroll mode which is now redundant, copy mode should be used instead.Nicholas Marriott
The = key binding now does nothing.
2009-10-06Make C-Up and C-Down in copy mode scroll the screen up and down one lineNicholas Marriott
without moving the cursor, like Up and Down in scroll mode (which will shortly disappear).
2009-10-05If no target client is specified to commands which accept one, try to guess theNicholas Marriott
current client, in a similar manner to how sessions already work: if the current session can be established and has only one client, use that; otherwise use the most recently created client.
2009-09-24New lock-client and lock-session commands to lock an individual client or allNicholas Marriott
clients attached to a session respectively.
2009-09-23Remove PROMPT_HIDDEN code which is now unused.Nicholas Marriott
2009-09-23Support -c like sh(1) to execute a command, useful when tmux is a loginNicholas Marriott
shell. Suggested by halex@. This includes another protocol version increase (the last for now) so again restart the tmux server before upgrading.
2009-09-23Remove the internal tmux locking and instead detach each client and run theNicholas Marriott
command specified by a new option "lock-command" (by default "lock -np") in each client. This means each terminal has to be unlocked individually but simplifies the code and allows the system password to be used to unlock. Note that the set-password command is gone, so it will need to be removed from configuration files, and the -U command line flag has been removed. This is the third protocol version change so again it is best to stop the tmux server before upgrading.
2009-09-23Trim some code by moving the ioctl(TIOCGWINSZ) after SIGWINCH from the clientNicholas Marriott
into the server. This is another (the second of four) protocol version changes coming this morning, so again the server should be killed before upgrading.
2009-09-23Don't attempt to open() the tty path, rely on the client sending its stdin fdNicholas Marriott
with imsg and fatal if it doesn't, then set the FD_CLOEXEC flag in tty_init instead of tty_open to prevent them leaking into child processes if any are created between the two calls. This bumps the protocol version, so the tmux server should be killed before upgrading.
2009-09-22Permit multiple prefix keys to be defined, separated by commas, for example:Nicholas Marriott
set -g prefix ^a,^b Any key in the list acts as the prefix. The send-prefix command always sends the first key in the list.
2009-09-21Use option print function for info messages as well.Nicholas Marriott
2009-09-21Move common code from show-options and show-window-options into a function.Nicholas Marriott
2009-09-21Drop tiny union from option struct.Nicholas Marriott
2009-09-21Key options were implemented as a number so these struct members are unused.Nicholas Marriott
2009-09-20run-shell command to run a shell command without opening a window, sendingNicholas Marriott
stdout to output mode.
2009-09-20Move some common and untidy code for window link/unlink into generic functionsNicholas Marriott
instead of duplicating it in move/link window..
2009-09-16Rather than constructing an entire termios struct from ttydefaults.h, just letNicholas Marriott
forkpty do it and then alter the bits that should be changed after fork. A little neater and more portable.
2009-09-14Nuke unused server_client_index function, pointed out by martynas@.Nicholas Marriott
2009-09-12Tidy some common code for destroying sessions into a new function.Nicholas Marriott
2009-09-10Permit options such as status-bg to be configured using the entire 256 colourNicholas Marriott
palette by setting "colour0" to "colour255".
2009-09-07Reference count clients and sessions rather than relying on a saved index forNicholas Marriott
cmd-choose-*.
2009-09-07Give each paste buffer a size member instead of requiring them to beNicholas Marriott
zero-terminated.
2009-09-07Permit embedded colour and attributes in status-left and status-right using newNicholas Marriott
#[] special characters, for example #[fg=red,bg=blue,blink].
2009-09-02That was the wrong fix. MSG_ERROR should set the error and the client shouldNicholas Marriott
use the error and exit on MSG_EXIT (it was being handled in the default case). Undo the last change, move the errstr check into the MSG_EXIT case, and add a comment.
2009-09-02Set exittype for error exit as well as the error string.Nicholas Marriott
2009-09-02Accept -l to make it easier for people who use tmux as a login shell to useNicholas Marriott
$SHELL. Originally from martynas@, tweaked by me.
2009-09-02When incorrect passwords are entered, behave similarly to login(1) and backoffNicholas Marriott
for a bit. Based on a diff from martynas@.
2009-09-02Add a transpose-chars command in edit mode (C-t in emacs mode only). From KalleNicholas Marriott
Olavi Niemitalo.
2009-09-01When using tmux as a login shell, there is currently no way to specify a shellNicholas Marriott
to be used as a login shell inside tmux, so add a default-shell session option. This sets the shell invoked as a login shell when the default-command option is empty. The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell or /bin/sh is valid first. Based on a diff from martynas@, changed by me to be a session option rather than a window option.
2009-08-31Add a new display-panes command, with two options (display-panes-colour andNicholas Marriott
display-panes-time), which displays a visual indication of the number of each pane.
2009-08-25Add a choose-client command and extend choose-{session,window} to accept aNicholas Marriott
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).
2009-08-24gcc2 doesn't understand attributes on function pointers.Nicholas Marriott
2009-08-23When using source-file, run the commands in the context of the source-fileNicholas Marriott
command rather than with no context. This makes things like attach work from a file.
2009-08-23The cursession member in struct cmd_ctx is always either curclient->session orNicholas Marriott
NULL when curclient is also NULL, so just eliminate it.
2009-08-19Extend command-prompt with a -p option which is a comma-separated list of oneNicholas Marriott
or more prompts to present in order. The responses to the prompt are replaced in the template string: %% are replaced in order, so the first prompt replaces the first %%, the second replaces the second, and so on. In addition, %1 up to %9 are replaced with the responses to the first the ninth prompts The default template is "%1" so the response to the first prompt is processed as a command. Note that this changes the behaviour for %% so if there is only one prompt, only the first %% will be replaced. Templates such as "neww -n '%%' 'ssh %%'" should be changed to "neww -n '%1' 'ssh %1'". From Tiago Cunha.
2009-08-18Instead of just checking for an empty buffer, which may not be the case ifNicholas Marriott
there is unconsumed data, save the previous size and use it instead. This means that activity monitoring should work in this (unlikely) event. Also remove a debugging statement that no longer seems necessary.
2009-08-18Tag a few missed printf-like functions and fix a missing "%s".Nicholas Marriott
2009-08-18Add a "delete line" key when editing in the status line or the search up/downNicholas Marriott
prompt. C-u with emacs keys, d with vi.
2009-08-18Add (naive) searching and goto line in copy mode. Searching is C-r and C-s withNicholas Marriott
emacs keys, / and ? with vi; n repeats the search again with either key set. All searching wraps the top/bottom. Goto line is g for both emacs and vi. The search prompts don't have full line editing, just simple append and delete characters. Also sort the mode keys list in tmux.1.
2009-08-13vi(1)-style half page scroll in copy and scroll modes. Move the vi full pageNicholas Marriott
scroll key to C-b instead of C-u and use C-u/C-d for half page scrolling with vi keys. In emacs mode, half page scrolling is bound to M-Up and M-Down. Suggested by merdely (about a year ago :-)).