summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/session.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Instead of forbidding invalid session names, sanitize them like windownicm2020-05-161-6/+15
| | | | names.
* Add a number of new formats to inspect what sessions and clients anicm2019-12-261-2/+15
| | | | window is present or active in. From Tyler Culp in GitHub issue 2034.
* Merge hooks into options and make each one an array option. This allowsnicm2019-04-261-4/+1
| | | | | | | multiple commands to be easily bound to one hook. set-hook and show-hooks remain but they are now variants of set-option and show-options. show-options now has a -H flag to show hooks (by default they are not shown).
* Break new window and pane creation common code from various commands andnicm2019-04-171-62/+8
| | | | window.c into a separate file spawn.c.
* Tidy and rename some bits of status line code.nicm2019-03-161-2/+2
|
* Support for windows larger than visible on the attached client. This hasnicm2018-10-181-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | been a limitation for a long time. There are two new options, window-size and default-size, and a new command, resize-window. The force-width and force-height options and the session_width and session_height formats have been removed. The new window-size option tells tmux how to work out the size of windows: largest means it picks the size of the largest session, smallest the smallest session (similar to the old behaviour) and manual means that it does not automatically resize windows. The default is currently largest but this may change. aggressive-resize modifies the choice of session for largest and smallest as it did before. If a window is in a session attached to a client that is too small, only part of the window is shown. tmux attempts to keep the cursor visible, so the part of the window displayed is changed as the cursor moves (with a small delay, to try and avoid excess redrawing when applications redraw status lines or similar that are not currently visible). The offset of the visible portion of the window is shown in status-right. Drawing windows which are larger than the client is not as efficient as those which fit, particularly when the cursor moves, so it is recommended to avoid using this on slow machines or networks (set window-size to smallest or manual). The resize-window command can be used to resize a window manually. If it is used, the window-size option is automatically set to manual for the window (undo this with "setw -u window-size"). resize-window works in a similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and -A flags. -a sets the window to the size of the smallest client (what it would be if window-size was smallest) and -A the largest. For the same behaviour as force-width or force-height, use resize-window -x or -y, and "setw -u window-size" to revert to automatic sizing.. If the global window-size option is set to manual, the default-size option is used for new windows. If -x or -y is used with new-session, that sets the default-size option for the new session. The maximum size of a window is 10000x10000. But expect applications to complain and much higher memory use if making a window excessively big. The minimum size is the size required for the current layout including borders. The refresh-client command can be used to pan around a window, -U -D -L -R moves up, down, left or right and -c returns to automatic cursor tracking. The position is reset when the current window is changed.
* SESSION_UNATTACHED flag is no longer necessary now we have an attachednicm2018-08-181-3/+3
| | | | count instead.
* session_groups can be static also.nicm2018-08-021-7/+5
|
* Improve logging of sessions.nicm2018-05-041-4/+5
|
* Only show the first member of session groups in tree mode (-G flagnicm2017-11-021-6/+2
| | | | disables).
* Some extra logging to show why tmux might exit.nicm2017-07-091-5/+5
|
* Some new notifications, mainly for active pane and current window andnicm2017-05-041-1/+2
| | | | | | | | | | | session: pane-mode-changed window-pane-changed client-session-changed session-window-changed From Joshua Brot.
* Log what is happening with window and session reference counts much morenicm2017-04-281-5/+13
| | | | obviously.
* Do not update TERM into config file parsing has finished.nicm2017-04-251-2/+2
|
* Move server_fill_environ into environ.c and move some other common codenicm2017-03-091-7/+3
| | | | into it.
* Instead of numbering session groups, give them a name which may be givennicm2017-02-091-41/+54
| | | | | to -t instead of a target session. Also allow them to contain only one session.
* Cache status line position to reduce option lookups during output.nicm2017-02-031-1/+3
|
* Alerts are too slow, so rather than walking all sessions and windows,nicm2016-10-191-3/+7
| | | | | | add a link of winlinks to each window and a pointer to the session to each winlink. Also rewrite the alerts processing to return to the old behaviour (alert in any window sets the flag on any winlink).
* Move session-create hook out of session_create so it works with grouped sessions.nicm2016-10-191-2/+1
|
* Use the notify name string instead of going via an enum and changenicm2016-10-161-9/+9
| | | | existing hooks to use notifys instead.
* Give window_create and window_create1 better names.nicm2016-10-151-2/+2
|
* Rename a function for consistency and some spacing nits.nicm2016-10-151-2/+6
|
* Remove the set-remain-on-exit option, it was always a hack and can nownicm2016-10-131-4/+1
| | | | be done with hooks instead.
* Add static in window-*.c and move some internal functions out of tmux.h.nicm2016-10-111-4/+8
|
* Loads more static, except for cmd-*.c and window-*.c.nicm2016-10-101-12/+12
|
* I no longer use my SourceForge address so replace it.nicm2016-01-191-2/+2
|
* Add hooks infrastructure, basic commands (set-hook, show-hooks) and anicm2015-12-081-1/+5
| | | | | | couple of not very useful client hooks. This will eventually let commands be run at various points and on notifications. Joint work with Thomas Adam.
* Use __unused rather than rolling our own.nicm2015-11-181-3/+3
|
* Don't update activity time twice for new sessions, and add some logging.nicm2015-11-181-5/+7
|
* Because pledge(2) does not allow us to pass directory file descriptorsnicm2015-10-311-6/+6
| | | | | | | | | around, we can't use file descriptors for the working directory because we will be unable to pass it to a privileged process to tell it where to read or write files or spawn children. So move tmux back to using strings for the current working directory. We try to check it exists with access() when it is set but ultimately fall back to ~ if it fails at time of use (or / if that fails too).
* Like options, move the environ struct into environ.c.nicm2015-10-281-12/+12
|
* Move struct options into options.c.nicm2015-10-271-10/+11
|
* Fix a spelling error, sesson -> session.nicm2015-09-011-2/+2
|
* Move alerts onto events rather than checking every loop.nicm2015-08-291-1/+2
|
* Don't leak name when freeing session, from Kuang-che Wu.nicm2015-08-281-2/+4
|
* Per-session timers for locking, and remove the global one-second timer.nicm2015-08-281-2/+40
|
* Make session_update_activity more useful and use it in more places.nicm2015-08-281-9/+14
|
* Similarly, for sessions use a callback to free rather than checkingnicm2015-06-051-5/+28
| | | | every loop.
* Add a format window_linked which is 1 if a window has been linkednicm2015-05-061-1/+15
| | | | | | | multiple times, also remove the default space in window_flags and use a conditional to add it in window-status-format (this means additional flags can be added in the option without extra spaces). From Thomas Adam with tweaks by me.
* Move the functions to convert ids from strings into session.c and window.c.nicm2015-04-251-1/+17
|
* Make session_has return a flag, returning the first winlink found is anicm2015-04-221-4/+4
| | | | recipe for errors.
* Fix some spacing nits.nicm2014-10-221-2/+2
|
* Merge unlink-window into kill-window.nicm2014-10-221-3/+17
|
* If multiple arguments are given to new-session, new-window,nicm2014-05-131-9/+11
| | | | | | split-window, respawn-window or respawn-pane, pass them directly to execvp() to help avoid quoting problems. One argument still goes to "sh -c" like before. Requested by many over the years. Patch from J Raynor.
* Set PATH explicitly, either from client or sessionnicm2014-04-171-8/+9
| | | | | environment. Previously it came from the session environment. From J Raynor.
* Do not permit periods in session names (colons are already banned). Fromnicm2014-01-221-3/+3
| | | | J Raynor.
* Alter how tmux handles the working directory to internally use filenicm2013-10-101-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | descriptors rather than strings. - Each session still has a current working directory. - New sessions still get their working directory from the client that created them or its attached session if any. - New windows are created by default in the session working directory. - The -c flag to new, neww, splitw allows the working directory to be overridden. - The -c flag to attach let's the session working directory be changed. - The default-path option has been removed. To get the equivalent to default-path '.', do: bind c neww -c $PWD To get the equivalent of default-path '~', do: bind c neww -c ~ This also changes the client identify protocol to be a set of messages rather than one as well as some other changes that should make it easier to make backwards-compatible protocol changes in future.
* Renumber windows: Lookup lastw via window not indexnicm2013-10-101-2/+2
| | | | | | | | | | | When calling 'movew -r' on a session to reorder the winlinks, ensure when adding back in the information for the lastw stack that we look up the winlink based on the window and not its index. Using the index doesn't make sense here because when comparing it to the old set, it will never match since the winlink has been renumbered. Bug reported by Ben Boeckel. Patch by Thomas Adam.
* Grouped sessions were being leaked on destroy, correctly free them.nicm2013-10-101-1/+2
|
* Rename session idx to session id throughout and add $ prefix to targetsnicm2013-03-251-8/+8
| | | | to use it, extended from a diff from George Nachman.