Commit Graph

112 Commits (fc05bf255af2a39a8168320455f79e7e6d9e915a)

Author SHA1 Message Date
nicm d24c9d7d3e Do not put a space between status-left/status-right and the window list,
instead move the space into the defaults for the options (so status-left
now defaults to "[#S] ". From Balazs Kezes.
2014-11-05 23:15:11 +00:00
nicm 0a1a88d63c Better format for printf format attributes. 2014-10-20 23:57:13 +00:00
nicm a27ba6e380 Add xreallocarray and remove nmemb argument from xrealloc. 2014-10-08 17:35:58 +00:00
nicm d306bbe11e Take account of window-status-separator when checking window position,
based on diff from Balazs Kezes.
2014-10-02 10:39:43 +00:00
nicm bec6c807cd There is no longer a need for a paste_stack struct or for global_buffers
to be global. Move to paste.c.
2014-04-24 09:14:43 +00:00
nicm 992ef70fb6 Remove the monitor-content option and associated bits and bobs. It's
never worked very well. If there is a big demand for it to return, will
consider better ways to do it.
2014-04-17 07:36:45 +00:00
nicm 8880bdb67c Do not replace ## with # in status_replace1 because it'll be done later
by the format code.
2014-04-02 17:08:23 +00:00
nicm dca7d1c0fd Make message-limit a server option. 2014-03-31 21:41:35 +00:00
nicm f835be4bb2 Style nit - no space between function name and bracket. 2014-02-14 13:59:01 +00:00
nicm d0accdba88 Check for NULL session and whatnot in status_replace, from Thomas Adam. 2014-02-14 12:37:54 +00:00
nicm 945339b443 Allow replacing each of the many sets of separate foo-{fg,bg,attr}
options with a single foo-style option. For example:

    set -g status-fg yellow
    set -g status-bg red
    set -g status-attr blink

Becomes:

    set -g status-style fg=yellow,bg=red,blink

The -a flag to set can be used to add to rather than replace a style. So:

    set -g status-bg red

Becomes:

    set -ag status-style bg=red

Currently this is fully backwards compatible (all *-{fg,bg,attr} options
remain) but the plan is to deprecate them over time.

From Tiago Cunha.
2014-01-28 23:07:09 +00:00
Nicholas Marriott 7af5fec038 Whitespace nits, from Ben Boeckel. 2013-07-05 14:44:06 +00:00
Nicholas Marriott c231381aa3 Demote the old single-character replacement variables (#S and friends)
to aliases of formats. From Tiago Cunha.
2013-05-31 19:56:05 +00:00
Nicholas Marriott d28a39d01d Extend jobs to support writing and use that for copy-pipe instead of
popen, from Chris Johnsen.
2013-03-25 11:43:01 +00:00
Nicholas Marriott c519f9a84c evbuffer_readline returns allocated storage, don't leak it. 2013-03-22 15:55:22 +00:00
Nicholas Marriott 8d59b189cc No more lint means no more ARGSUSED. 2013-03-22 10:31:22 +00:00
Nicholas Marriott dd46c95e23 Aargh. Spaces -> tabs. 2013-03-21 16:25:08 +00:00
Nicholas Marriott 93224260ae Add window-status-last-* options, from Boris Faure. 2012-11-27 13:52:23 +00:00
Nicholas Marriott df912e3540 xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
Nicholas Marriott a3391692ad Move a NULL check inside a function, from Tiago Cunha. 2012-07-09 09:55:57 +00:00
Nicholas Marriott e60f48ab09 Use int not u_char for colours from options since they may have bit 8
set to mark them as 256-colour. Reported by Chris Johnson.
2012-04-29 07:33:41 +00:00
Nicholas Marriott e02d1bce98 Add window-status-separator option, from Thomas Adam. 2012-04-23 22:23:14 +00:00
Nicholas Marriott d3c842d367 Check event_initialized before event_del if event may not have been set
up; libevent2 complains about this. Reported by Moriyoshi Koizumi.
2012-03-17 18:24:07 +00:00
Nicholas Marriott 30f4c30ca3 Add A and I keys for vi status line editing. 2012-03-04 07:38:11 +00:00
Nicholas Marriott 4b8bb7770f The wlmouse offset should be part of the client, not the server. From
Ailin Nemui.
2012-03-03 08:55:56 +00:00
Nicholas Marriott 230d0fbc9e Add an option to move the status line to the top of the screen,
requested by many.
2012-01-29 09:37:02 +00:00
Nicholas Marriott a7a44bfcd9 Terminate strftime buffer properly even if a really long format string
is given, from Tiago Cunha.
2012-01-26 09:05:54 +00:00
Nicholas Marriott d2d2df1365 Fix memory leak in error path, from Tiago Cunha. 2012-01-26 09:03:09 +00:00
Nicholas Marriott 8cf19ab770 Add some trivial additional status line attributes from jwcxz at users
dot sourceforge dot net.
2012-01-20 19:51:28 +00:00
Nicholas Marriott e6519d3e27 Add space movement keys for vi mode in the status line from Ben Boeckel. 2012-01-20 19:10:29 +00:00
Nicholas Marriott 2397083f7e Make M-f and M-b work the same at the command prompt as in copy mode,
pointed out by Romain Francoise.
2011-12-01 20:42:31 +00:00
Nicholas Marriott fc5f8804ec Add word movement and editing command for command prompt editing, from
Ben Boeckel.
2011-11-15 23:34:12 +00:00
Nicholas Marriott 57df442916 Make window_pane_index work the same as window_index, from Ben Boeckel. 2011-11-15 23:19:51 +00:00
Nicholas Marriott e5bf63cb59 Option to change status line (message) background when using vi keys and
in command mode. From Ben Boeckel.
2011-11-05 09:06:31 +00:00
Nicholas Marriott 3657aa675e Fix a couple of memory leaks, from marcel partap. 2011-08-20 20:37:30 +00:00
Nicholas Marriott 2de9b1e005 Make confirm-before prompt customizable with -p option like
command-prompt. Also move responsibility for calling status_replace into
status_prompt_{set,update} and add #W and #P to the default kill-window
and kill-pane prompts. By Tiago Cunha.
2011-07-08 06:37:57 +00:00
Nicholas Marriott ad60a2c952 Allow the initial context on prompts to be set with the new -I option to
command-prompt. From Tiago Cunha.
2011-07-02 21:05:44 +00:00
Nicholas Marriott 075816eb72 Only redraw the status line on command update, not the entire client
(big DOH).
2011-04-29 07:07:31 +00:00
Nicholas Marriott eb288aae32 Provide #h for short hostname (no domain) from Michal Mazurek. 2011-04-24 21:32:07 +00:00
Nicholas Marriott 0bb2119781 Add an option (mouse-select-window) which allows the mouse to be used by
clicking on the status line, written by hsim at gmx dot li.
2011-04-18 19:49:05 +00:00
Nicholas Marriott d88c20e718 Change -t on display-message to be target-pane for the #[A-Z]
replacements and add -c as target-client.
2011-03-29 19:30:16 +00:00
Nicholas Marriott db7a89b1ee Simplify the way jobs work and drop the persist type, so all jobs are
fire-and-forget.

Status jobs now managed with two trees of output (new and old), rather
than storing the output in the jobs themselves. When the status line is
processed any jobs which don't appear in the new tree are started and
the output from the old tree displayed. When a job finishes it updates
the new tree with its output and that is used for any subsequent
redraws. When the status interval expires, the new tree is moved to the
old so that all jobs are run again.

This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands
of identical persistent jobs and high memory use (this can still be
achieved by adding "sleep 30" but that is much less likely to happen by
accident).
2011-01-26 01:54:56 +00:00
Nicholas Marriott 5158dd9a8d Handle a # at the end of a replacement string (such as status-left)
correctly. Found by Thomas Adam.
2011-01-03 21:30:49 +00:00
Nicholas Marriott 3e8124009f Move the user-visible parts of all options (names, types, limit, default
values) together into one set of tables in options-table.c. Also clean
up and simplify cmd-set-options.c and move a common print function into
option-table.c.
2011-01-01 16:51:21 +00:00
Nicholas Marriott cc42614fa9 Change from a per-session stack of buffers to one global stack which is
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-30 23:16:18 +00:00
Nicholas Marriott 2231e72968 Add a function to create window flags rather than doing the same thing
in two places. From Thomas Adam.
2010-12-30 21:35:17 +00:00
Nicholas Marriott 9802fea615 Oops, these functions return a const char *, so make the local variable
const as well.
2010-12-11 16:13:15 +00:00
Nicholas Marriott 7ce77ffc9c Make the prompt history global for all clients which is much more useful than per-client history. 2010-12-11 16:05:57 +00:00
Nicholas Marriott e26a351865 Add an option to alert (monitor) for silence (lack of activity) in a
window. From Thomas Adam.
2010-12-06 22:51:02 +00:00
Nicholas Marriott e63f0546a1 Having a list of winlinks->alerts for each session is stupid, just store
the alert flags directly in the winlink itself.
2010-06-21 01:27:46 +00:00