aboutsummaryrefslogtreecommitdiff
path: root/format.c
Commit message (Collapse)AuthorAge
* Instead of numbering session groups, give them a name which may be givennicm2017-02-09
| | | | | to -t instead of a target session. Also allow them to contain only one session.
* Remove a debugging leftover.nicm2017-02-07
|
* Add a window or pane id "tag" to each format tree and use it to separatenicm2017-02-03
| | | | | | jobs, this means that if the same job is used for different windows or panes (for example in pane-border-format), it will be run separately for each pane.
* Implement "all event" (1003) mouse mode but in a way that works. Thenicm2017-02-01
| | | | | | | | | | | main issue is that if we have two panes, A with 1002 and B with 1003, we need to set 1003 outside tmux in order to get all the mouse events, but then we need to suppress the ones that pane A doesn't want. This is easy in SGR mouse mode, because buttons == 3 is only used for movement events (for other events the trailing m/M marks a release instead), but in normal mouse mode we can't tell so easily. So for that, look at the previous event instead - if it is drag+release as well, then the current event is a movement event.
* When a flag option is used in a format, it should use the number formnicm2017-01-30
| | | | not string.
* getopt() has a struct option so just return to using options_entry.nicm2017-01-16
|
* Major tidy up and rework of options tree and set-option/show-optionsnicm2017-01-15
| | | | | | | | commands this pushes more of the code into options.c and ties it more closely to the options table rather than having an unnecessary split. Also add support for array options (will be used later). Only (intentional) user visible change is that show-options output is now passed through vis(3) with VIS_DQ so quotes are escaped.
* Add a format for terminal type.nicm2017-01-11
|
* Add simple comparisons in formats: #{==:a,b} and #{!=:a,b} ("a" and "b"nicm2017-01-09
| | | | | | | are expanded so can compare formats). And expand the condition to #{?a,b,c} (the "a" part) if it doesn't work as a simple lookup. Also add FORMAT_NOJOBS flag to disable jobs in a format.
* Key running commands for #() by the unexpanded command, and run themnicm2016-11-17
| | | | | again if the expanded form changes (otherwise at most once per second as usual). Fixes issues reported by Gregory Pakosz.
* Provide a way for hooks to tag formats onto the commands they fire sonicm2016-10-16
| | | | | that the user can get at additional information - now used for the "hook" format, more to come.
* Mass rename struct cmd_q to struct cmdq_item and related.nicm2016-10-16
|
* Rewrite command queue handling. Each client still has a command queue,nicm2016-10-16
| | | | | | | | | | | | | | | but there is also now a global command queue. Instead of command queues being dispatched on demand from wherever the command happens to be added, they are now all dispatched from the top level server loop. Command queues may now also include callbacks as well as commands, and items may be inserted after the current command as well as at the end. This all makes command queues significantly more predictable and easier to use, and avoids the complex multiple nested command queues used by source-file, if-shell and friends. A mass rename of struct cmdq to a better name (cmdq_item probably) is coming.
* Some other stuff that can be local to one file.nicm2016-10-11
|
* Loads more static, except for cmd-*.c and window-*.c.nicm2016-10-10
|
* Use a fixed buffer for strftime() because there is no portable way tonicm2016-05-23
| | | | | tell if the buffer is too small, and an expanding buffer is overkill anyway.
* Final parts of command hooks, add before- and after- hooks to each command.nicm2016-04-29
|
* Support negative trim values (#{=-10:pane_title}) to trim from the end,nicm2016-01-31
| | | | suggested by Kevin Brubeck Unhammer.
* I no longer use my SourceForge address so replace it.nicm2016-01-19
|
* Add key-table option to set the default key table for a session, allowsnicm2015-12-12
| | | | different key bindings for different sessions and a few other things.
* Add cmdq as an argument to format_create and add a format for thenicm2015-12-11
| | | | command name (will also be used for more later).
* Remove format_create_flags and just pass flags to format_create.nicm2015-12-08
|
* Remove the -I part of show-messages which isn't really that useful; thenicm2015-11-24
| | | | | server start time can now be accessed with a new start_time format (use: tmux display -p '#{t:start_time}')
* Use __unused rather than rolling our own.nicm2015-11-18
|
* Add s/foo/bar/: prefix for formats to substitute bar for foo.nicm2015-11-18
|
* Two spacing and spelling nits.nicm2015-11-13
|
* Add window_visible_layout which ignores zoomed panes and use it fornicm2015-11-13
| | | | control mode (which needs to know all panes), from George Nachman.
* Long overdue change to the way we store cells in the grid: now, insteadnicm2015-11-13
| | | | | | | | | | | | | | | of storing a full grid_cell with UTF-8 data and everything, store a new type grid_cell_entry. This can either be the cell itself (for ASCII cells), or an offset into an extended array (per line) for UTF-8 data. This avoid a large (8 byte) overhead on non-UTF-8 cells (by far the majority for most users) without the complexity of the shadow array we had before. Grid memory without any UTF-8 is about half. The disadvantage that cells can no longer be modified in place and need to be copied out of the grid and back but it turned out to be lot less complicated than I expected.
* Nuke the utf8 and status-utf8 options and make tmux only a UTF-8nicm2015-11-12
| | | | | terminal. We still support non-UTF-8 terminals outside tmux, but inside it is always UTF-8 (as when the utf8 and status-utf8 options were on).
* Remove the mouse_utf8_flag format as well.nicm2015-11-12
|
* Because pledge(2) does not allow us to pass directory file descriptorsnicm2015-10-31
| | | | | | | | | 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-28
|
* Move struct options into options.c.nicm2015-10-27
|
* Count brackets in #{?...} so that nested conditional formats work, fromnicm2015-10-27
| | | | Daniel De Graaf.
* The format callback may not always succeed, so we need to check fornicm2015-10-27
| | | | NULL. From Patrick Palka.
* Extend the modifiers allowed before formats: as well as the existingnicm2015-10-25
| | | | | | | #{=10:...} length limit, add #{t:...} to convert a time_t format to a string, #{b:...} for basename and #{d:...} for dirname. Remove all the foo_string time formats as they can now be replaced by "t:", for example #{window_activity_string} becomes #{t:window_activity}.
* Pass output from jobs through format_expand() so they are expanded againnicm2015-10-25
| | | | (this was the previous behaviour).
* Format for scroll position, from Jorge Morante.nicm2015-10-23
|
* Make refresh-client force update of jobs, from Sina Siadat.nicm2015-09-14
|
* Add session_last_attached time and format, from Sina Siadat.nicm2015-09-10
|
* A couple of style nits.nicm2015-09-03
|
* Move struct paste_buffer out of tmux.h.nicm2015-08-29
|
* Make a few more expensive (ish) formats functions instead of inline.nicm2015-08-28
|
* Allow formats to be specified as functions (in the code) so they arenicm2015-08-28
| | | | | only evaluated on demand rather than each time a format tree is constructed. Use this for expensive formats like pane_current_command.
* Run status update on a per-client timer at status-interval.nicm2015-08-28
|
* Move format job cleanup onto its own timer.nicm2015-08-28
|
* Allow environment variables in #{}.nicm2015-08-28
|
* Add a format to show if client is a control client. From Bruno Sutic.nicm2015-07-13
|
* Use xsnprintf.nicm2015-06-18
|
* Add window_activity format, from Thomas Adam based on a diff originallynicm2015-06-15
| | | | from propos6 at gmail dot com.