summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/server.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add "grouped sessions" which have independent name, options, current window andnicm2009-10-101-2/+4
| | | | | | | | 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.
* Support for individual session idle time locking. May be enabled by turning offnicm2009-10-101-14/+54
| | | | | | | | | | | | | 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.
* Instead of passing a struct pollfd ** around through various functions, buildnicm2009-10-101-76/+146
| | | | | | | them into a tree and then convert into a flat poll array before and after poll. This adds a little code but should reduce annoying problems with ordering when adding new things that also need to be polled.
* If no target client is specified to commands which accept one, try to guess thenicm2009-10-051-1/+4
| | | | | | 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.
* Don't allow locked or suspended clients to limit the size of active clients.nicm2009-09-241-2/+4
|
* On SIGTERM, just abandon any suspended/locked clients and leave them to it,nicm2009-09-231-25/+31
| | | | | otherwise the server will hang around (refusing new connections) until they exit properly.
* Remove the internal tmux locking and instead detach each client and run thenicm2009-09-231-83/+2
| | | | | | | | | | | | | | 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.
* Permit multiple prefix keys to be defined, separated by commas, for example:nicm2009-09-221-7/+17
| | | | | | | 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.
* Regularise some fatal messages.nicm2009-09-201-5/+5
|
* New option, set-titles-string, to allow the window title to be specified (asnicm2009-09-181-14/+25
| | | | | for status-left/right) if set-titles is on. Also only update the title when the status line is being redrawn.
* The default terminal size should be 80x24, not 80x25.nicm2009-09-151-2/+2
|
* Nuke unused server_client_index function, pointed out by martynas@.nicm2009-09-141-14/+1
|
* Doh, trim variables unused now.nicm2009-09-121-3/+2
|
* Tidy some common code for destroying sessions into a new function.nicm2009-09-121-15/+5
|
* Permit options such as status-bg to be configured using the entire 256 colournicm2009-09-101-2/+2
| | | | palette by setting "colour0" to "colour255".
* While the display-panes indicator is on screen, make the number keys select thenicm2009-09-071-3/+14
| | | | pane with that index.
* Reference count clients and sessions rather than relying on a saved index fornicm2009-09-071-2/+44
| | | | cmd-choose-*.
* Tiny cleanup.kili2009-09-071-3/+3
| | | | ok nicm@
* Only redraw all clients once when the backoff timer expires rather than everynicm2009-09-051-2/+3
| | | | | | second all the time. Reported by Simon Nicolussi.
* Tell the user when sleeping due to password backoff.nicm2009-09-041-1/+12
|
* When shutting down the server, expect clients to be polite and exit when askednicm2009-09-021-4/+3
| | | | with the right message.
* Add a new display-panes command, with two options (display-panes-colour andnicm2009-08-311-1/+5
| | | | | display-panes-time), which displays a visual indication of the number of each pane.
* Don't call tty_free unless the client is a terminal, otherwise tty_init hasn'tnicm2009-08-311-2/+7
| | | | been called and it may end up doing close(0). From Kalle Olavi Niemitalo.
* When using source-file, run the commands in the context of the source-filenicm2009-08-231-3/+3
| | | | | command rather than with no context. This makes things like attach work from a file.
* Whoops, getting the comparison the right way round is usually recommended.nicm2009-08-181-2/+2
|
* options_get_number() is relatively expensive and a check for dead panes happensnicm2009-08-181-5/+4
| | | | | a lot more often than actually finding one, so instead of getting the option for every check, get it for every dead window found.
* Reset attributes as well as scroll region before poll(2) and add a big commentnicm2009-08-141-2/+12
| | | | explaining why.
* Initialise log_fd to -1, prevents spurious disconnection of the client when itnicm2009-08-111-1/+4
| | | | | | ends up as fd 0 (likely if the server is started with "tmux start"). Also add some extra debugging messages to server.c.
* Drop the no_stop argument to tty_close and tty_free in favour of a flag in thenicm2009-08-111-2/+2
| | | | tty struct.
* Switch tmux to use imsg. This is the last major change to make thenicm2009-08-111-16/+28
| | | | | | | | | | | | | | | | | client-server protocol more resilient and make the protocol versioning work properly. In future, the only things requiring a protocol version bump will be changes in the message structs, and (when both client and server have this change) mixing different versions should nicely report an error message. As a side effect this also makes the code tidier, fixes a problem with the way errors reported during server startup were handled, and supports fd passing (which will be used in future). Looked over by eric@, thanks. Please note that mixing a client with this change with an older server or vice versa may cause tmux to crash or hang - tmux should be completely exited before upgrading.
* Reset the attributes after drawing all or part of the screen, and reset thenicm2009-08-101-1/+2
| | | | | | region before poll(2). This reduces (but does not eliminate) the chance of the attributes not being normal if tmux is disconnected without warning (ssh ~., reboot from inside, etc).
* If there is an error in the configuration file, don't just exit(1) as this cannicm2009-08-071-39/+46
| | | | | | | | | | | cause the client to hang. Instead, send the error message, then mark the client as bad and start a normal shutdown so the server exits once the error is written. This also allows some code duplicating daemon(3) to be trimmed and logging to begin earlier. Prompted by Theo noticing the behaviour on error wasn't documented.
* Next step towards customisable mode keys: build each default table of keys intonicm2009-07-281-1/+3
| | | | | | a named tree on start and use that for lookups. Also add command to string translation tables and modify list-keys to show the the mode key bindings (new -t argument).
* Permit commands to be bound to key presses without the prefix key first. Thenicm2009-07-241-4/+9
| | | | | new -n flag to bind-key and unbind-key sets or removes these bindings, and list-key shows them in []s.
* Make some functions which return unused values void (mostly found by lint) andnicm2009-07-211-9/+9
| | | | tweak a redundant expression in window_pane_set_mode.
* Display the number of failed password attempts (if any) when the server isnicm2009-07-201-1/+13
| | | | locked. From Tom Doherty.
* Improved layout code.nicm2009-07-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Add three new session options: visual-activity, visual-bell, visual-content. Ifnicm2009-07-181-17/+73
| | | | | | | | | these are enabled (and the monitor-activity, bell-actio and monitor-content options are configurated appropriately), when activity, a bell, or content is detected, a message is shown. Also tidy up the bell/activity/content code in server.c slightly and fix a couple of errors.
* Instead of faking up a status line in status_redraw, use the same code tonicm2009-07-141-4/+4
| | | | | | redraw it as to draw the entire screen, just skip all lines but the last. This makes horizontal split redraw properly when the status line is off.
* Creating a key binding which replaces itself (such as "bind x bind x lsw")nicm2009-07-121-1/+4
| | | | | | | | | | 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.
* If it exist, load a system-wide configuration file /etc/tmux.conf before anynicm2009-07-121-1/+12
| | | | user-specified one.
* Rename the global options variables to be shorter and to make session optionsnicm2009-07-071-8/+6
| | | | | clear. No functional change, getting this out of the way to make later options changes easier.
* After logging (if enabled) is switched to file, there is no reason to keepnicm2009-06-261-2/+15
| | | | stdin/stdout/stderr active, so dup them to /dev/null.
* Remove some dead assignments, found by sthen with clang.nicm2009-06-251-2/+2
|
* Change find-window and monitor-content to use fnmatch(3). For convenience andnicm2009-06-241-2/+2
| | | | | | | | | compatibility, *s are implicitly added at the start and end of the pattern. Also display the line number and the entire line in the results, and lose the nasty section_string function and the now empty util.c file. Initially from Tiago Cunha.
* Make remain-on-exit work again when there is only one pane left, which wasnicm2009-06-241-6/+11
| | | | | broken sometime during the pane/layout changes. Reported/tested by Iain Morgan, thanks.
* Import tmux, a terminal multiplexor allowing (among other things) a singlenicm2009-06-011-0/+1105
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