summaryrefslogtreecommitdiffstats
path: root/session.c
AgeCommit message (Collapse)Author
2011-01-01Don't reset the activity timer for unattached sessions every second,Nicholas Marriott
this screws up the choice of most-recently-used. Instead, break the time update into a little function and do it when the session is attached. Pointed out by joshe@.
2010-12-30Change from a per-session stack of buffers to one global stack which isNicholas Marriott
much more convenient and also simplifies lot of code. This renders copy-buffer useless and makes buffer-limit now a server option. By Tiago Cunha.
2010-12-21Store sessions in an RB tree by name rather than a list, this is tidierNicholas Marriott
and allows them to easily be shown sorted in various lists (list-sessions/choose-sessions). Keep a session index which is used in a couple of places internally but make it an ever-increasing number rather than filling in gaps with new sessions.
2010-12-20Fix another stray addition that was too early. Oops.Nicholas Marriott
2010-12-20Undo a change to next/previous session that got mixed in prematurely.Nicholas Marriott
2010-12-20Dead sessions are never on the active sessions list, so the SESSION_DEADNicholas Marriott
flag is effectively unused. Remove it.
2010-12-20Unify the way sessions are used by callbacks - store the address and useNicholas Marriott
the reference count, then check it is still on the global sessions list in the callback.
2010-09-08Add -n and -p flags to switch-client to move to the next and previousNicholas Marriott
session (yes, it doesn't match window/pane, but so what, nor does switch-client). Based on a diff long ago from "edsouza".
2010-06-27Store the current working directory in the session, change the default-pathNicholas Marriott
option to default to empty and make that mean that the stored session CWD is used.
2010-06-21Having a list of winlinks->alerts for each session is stupid, just storeNicholas Marriott
the alert flags directly in the winlink itself.
2010-06-21Rename activity->alert in a couple of functions for consistency.Nicholas Marriott
2009-12-22Fix a couple of problems with grouped sessions reported by danh: redrawNicholas Marriott
properly and choose the correct last window after a window is killed.
2009-12-03Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott
time now I've configured emacs to make them displayed in really annoying colours...
2009-11-26Remove a couple of unused arguments where possible, and add /* ARGSUSED */ toNicholas Marriott
the rest to reduce lint output.
2009-11-13Use winlink_remove() to remove old winlinks when synchronizing grouped sessionsNicholas Marriott
rather than doing it manually and not adjusted the reference count. Fixes crash seen by Dan Harnett.
2009-11-03Change session and client activity and creation time members to have moreNicholas Marriott
meaningful names. Also, remove the code to try and update the session activity time for the command client when a command message is received as is pointless because it des not have a session.
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-09-20Regularise some fatal messages.Nicholas Marriott
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-07Reference count clients and sessions rather than relying on a saved index forNicholas Marriott
cmd-choose-*.
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-13Add a base-index session option to specify the first index checked when lookingNicholas Marriott
for an index for a new window.
2009-08-13When creating a new session from the command-line where there is an externalNicholas Marriott
terminal, copy the termios(4) special characters and use them for new windows created in the new session. Suggested by Theo.
2009-08-08Infrastructure and commands to manage the environment for processes startedNicholas Marriott
within tmux. There is a global environment, copied from the external environment when the server is started and each sesssion has an (initially empty) session environment which overrides it. New commands set-environment and show-environment manipulate or display the environments. A new session option, update-environment, is a space-separated list of variables which are updated from the external environment into the session environment every time a new session is created - the default is DISPLAY.
2009-07-07Rename the global options variables to be shorter and to make session optionsNicholas Marriott
clear. No functional change, getting this out of the way to make later options changes easier.
2009-06-01Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott
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