summaryrefslogtreecommitdiffstats
path: root/status.c
AgeCommit message (Collapse)Author
2009-11-04Use timeout events for the identify and message timers.Nicholas Marriott
2009-11-04Switch jobs over to use a bufferevent.Nicholas Marriott
2009-11-04Unused (but assigned to) variable, found by lint.Nicholas Marriott
2009-11-01Add a flag for jobs that shouldn't be freed after they've died and use it forNicholas Marriott
status jobs, then only kill those jobs when status-left, status-right or set-titles-string is changed. Fixes problems with changing options from inside #().
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-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-09-23Remove PROMPT_HIDDEN code which is now unused.Nicholas Marriott
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-20Regularise some fatal messages.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-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-02Add a transpose-chars command in edit mode (C-t in emacs mode only). From KalleNicholas Marriott
Olavi Niemitalo.
2009-09-01Use "Password:" with no space for password prompts and don't display a *s forNicholas Marriott
the password, like pretty much everything else. From martynas@ with minor tweaks by me.
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-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-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-13Switch the prompt code to return an empty string when the user enters noNicholas Marriott
response and reserve NULL for an explicit cancel. Change all callbacks to treat them the same so no functional change. Also add cancel key bindings to emacs mode which were missing.
2009-08-08Options to set the colours and attributes for status-left/-right. From ThomasNicholas Marriott
Adam, thanks.
2009-08-05If colours are not supported by the terminal, try to emulate a colouredNicholas Marriott
background by setting or clearing the reverse attribute. This makes a few applications which don't use the reverse attribute themselves a little happier, and allows the status, message and mode options to have default attributes and fg/bg options that work as expected when set as reverse.
2009-07-30Plug some memory leaks.Nicholas Marriott
2009-07-28Next step towards customisable mode keys: build each default table of keys intoNicholas Marriott
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).
2009-07-27Change mode key bindings from big switches into a set of tables. Rather thanNicholas Marriott
lumping them all together, split editing keys from those used in choice/more mode and those for copy/scroll mode. Tidier and clearer, and the first step towards customisable mode keys.
2009-07-27Get rid of empty mode_key_free function.Nicholas Marriott
2009-07-27Add a key to delete to end of line at the prompt (^K in emacs mode, C/D in vi).Nicholas Marriott
From Kalle Olavi Niemitalo.
2009-07-26Calculate the space available for the prompt buffer and the cursor positionNicholas Marriott
correctly, and make it work when the screen is not wide enough. Noticed by Kalle Olavi Niemitalo.
2009-07-21Remove a couple of unused functions and fix a type ("FALLTHOUGH"), found byNicholas Marriott
lint.
2009-07-20Add a status-justify option to allow the window list in the status line to beNicholas Marriott
positioned at the left, centre, or right.
2009-07-20New options, window-status-current-{fg,bg,attr}, to set the fg, bg andNicholas Marriott
attributes with which the current window is shown in the status line. From Johan Friis, thanks.
2009-07-17- New command display-message (alias display) to display a message in theNicholas Marriott
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!
2009-07-17Memory could be leaked if a second prompt or message appeared while another wasNicholas Marriott
still present, so add a separate prompt free callback and make the _clear function responsible for calling it if necessary (rather than the individual prompt callbacks). Also make both messages and prompts clear any existing when a new is set. In addition, the screen could be modified while the prompt is there, restore the redraw-entire-screen behaviour on prompt clear; add a comment as a reminder.
2009-07-16Remove some duplicate code that was causing the status line to be redrawn evenNicholas Marriott
when it hadn't changed.
2009-07-15Make status_message_set a variadic printf-like function. No functional change -Nicholas Marriott
helpful for a couple of things coming soon.
2009-07-15Having to update NSETOPTION/NSETWINDOWOPTION when adding new options is a bitNicholas Marriott
annoying and it is only use for iterating, so use a sentinel to mark the end of each array instead. Different fix for a problem pointed out by Kalle Olavi Niemitalo.
2009-07-14For some reason when clearing status/message it was redrawing the entire clientNicholas Marriott
not just the status line. Changing this also revealed the check for the status line was incorrect when drawing the pane.
2009-07-14Instead of faking up a status line in status_redraw, use the same code toNicholas Marriott
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.
2009-07-12Add a "back to indentation" key in copy mode to move the cursor to the firstNicholas Marriott
non-whitespace character. ^ with vi and M-m with emacs key bindings. Another from Kalle Olavi Niemitalo, thanks.
2009-06-26Status line fixes: don't truncate status-right now the length calculation isNicholas Marriott
done for UTF-8, limit to the maximum length correctly when printing, and always print a space even if the left string is longer than the width available.
2009-06-04If the prompt is hidden or a password is sent with -U, zero it before freeingNicholas Marriott
it.
2009-06-03New session option, status-utf8, to control the interpretation of top-bit-setNicholas Marriott
characters in status-left and status-right (if on, they are treated as UTF-8; otherwise passed through).
2009-06-03Add a UTF-8 aware string length function and make UTF-8 inNicholas Marriott
status-left/status-right work properly. At the moment any top-bit-set characters are assumed to be UTF-8: a status-utf8 option to configure this will come shortly.
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