summaryrefslogtreecommitdiffstats
path: root/cmd-set-option.c
AgeCommit message (Collapse)Author
2019-06-20Add a per-pane option set. Pane options inherit from window options (sonicm
there should be no change to existing behaviour) and are set and shown with set-option -p and show-options -p. Change remain-on-exit and window-style/window-active-style to be pane options (some others will be changed later). This makes select-pane -P and -g unnecessary so no longer document them (they still work) and no longer document set-window-option and show-window-options in favour of set-option -w and show-options -w.
2019-06-20Add a helper function to work out option table from name.nicm
2019-04-26Merge hooks into options and make each one an array option. This allowsnicm
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).
2019-04-23Indicate an array option with a flag rather than a special type so thatnicm
in future will not have to be strings.
2019-03-18The individual -fg, -bg and -attr options have been deprecated (innicm
favour of -style), undocumented and hidden from show-options since 2014. Remove them, except for status-fg and status-bg.
2019-03-18Make array options a sparse tree instead of an array of char * andnicm
remove the size limit.
2019-03-16Tidy and rename some bits of status line code.nicm
2018-10-18Support for windows larger than visible on the attached client. This hasnicm
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.
2017-12-22Do not try to set default value on user options (they don't have one),nicm
from Charles Howard in GitHub issue 1161.
2017-09-07Do not fail if unset an option that is already unset, reported by Thomasnicm
Sattler.
2017-06-23Add user-keys option to allow user-defined keys to be set, from Dannicm
Aloni.
2017-05-31Style and spacing nits.nicm
2017-05-10Expand formats in option names and add -F flag to do so in option values as ↵nicm
well.
2017-04-22Get rid of the extra layer of flags and cmd_prepare() and just store thenicm
CMD_FIND_* flags in the cmd_entry and call it for the command. Commands with special requirements call it themselves and update the target for hooks to use.
2017-04-22Memory leaks, from David CARLIER.nicm
2017-02-16Style nits.nicm
2017-02-03Cache status line position to reduce option lookups during output.nicm
2017-01-25Clear option before adding to array if no -a, reported by Michaelnicm
Nickerson.
2017-01-24Fix set -u on array options.nicm
2017-01-24If given an array option without an index either show or set all items,nicm
and support -a for array options. Allow the separator for set to be specified in the options table (will be used for backwards compatibility later).
2017-01-16getopt() has a struct option so just return to using options_entry.nicm
2017-01-15-q flag now needs to be checked in a couple more places.nicm
2017-01-15Major tidy up and rework of options tree and set-option/show-optionsnicm
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.
2017-01-12Simplify appending to string options.nicm
2017-01-11Some tidying and tweaks to options code.nicm
2016-11-04Do not try to set the CHANGED flag on windows with no active pane, fixesnicm
problem reported by Nelo-T Wallus.
2016-10-16Mass rename struct cmd_q to struct cmdq_item and related.nicm
2016-10-14Add CMD_AFTERHOOK flag to the easy commands that don't need any special ↵nicm
handling.
2016-10-10Add static in cmd-* and fix a few other nits.nicm
2016-10-09Handle NULL window or session for user options.nicm
2016-09-26Support set -a (append) with user options, suggested by Xandor Schiefer.nicm
2016-05-30Cache the window styles and do not look up the window-style optionsnicm
unless they have changed.
2016-04-29Add option to include status text in the pane borders. Ifnicm
pane-border-status is set to "top" or "bottom" (rather than "off"), every pane has a permanent top or bottom border containing the text from pane-border-format. Based on a diff sent long ago by Jonathan Slenders, mostly rewritten and simplified by me.
2016-03-03show-* and set-* need to handle a missing target.nicm
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-14Instead of combined flags for -c, -s, -t, split into different setsnicm
using an enum and simplify the parsing code.
2015-12-13Use member names in cmd_entry definitions so I stop getting confusednicm
about the order.
2015-12-13Instead of every command resolving the target (-t or -s) itself, preparenicm
the state (client, session, winlink, pane) for it it before entering the command. Each command provides some flags that tell the prepare step what it is expecting. This is a requirement for having hooks on commands (for example, if you hook "select-window -t1:2", the hook command should to operate on window 1:2 not whatever it thinks is the current window), and should allow some other target improvements. The old cmd_find_* functions remain for the moment but that layer will be dropped later. Joint work with Thomas Adam.
2015-12-12Add key-table option to set the default key table for a session, allowsnicm
different key bindings for different sessions and a few other things.
2015-12-12Allow prefix and prefix2 to be set to None to disable (useful if younicm
would rather bind the prefix in the root table).
2015-11-20Instead of separate tables for different types of options, give eachnicm
option a scope type (server, session, window) in one table.
2015-11-18Use __unused rather than rolling our own.nicm
2015-11-12Support UTF-8 key bindings by expanding the key type from int tonicm
uint64_t and converting UTF-8 to Unicode on input and the reverse on output. (This allows key bindings, there are still omissions - the largest being that the various prompts do not accept UTF-8.)
2015-10-27Move struct options into options.c.nicm
2015-09-14Remove some extra blank lines.nicm
2015-08-29Move alerts onto events rather than checking every loop.nicm
2015-08-29Better take on reducing the name timer. Again check for name changes innicm
the main loop after events that may have changed the pane, but do so at most once every 500 millis. If the pane changed too soon, use a timer to ensure that a check happens later.
2015-08-28Revert previous; we do need a timer, until I have a better idea. Wenicm
can't do the name check every loop, because that is too expensive, and we can't make sure it only happens infrequently because we have no idea when the next change will happen.
2015-08-28We now only checking for name changes when the active pane has changed,nicm
but that can only happen when we have already been woken up by a read event, so there is no need for a timer, we can just check the changed flag on the end of that read event (we already loop over the windows to check for bells etc anyway).
2015-08-28Per-session timers for locking, and remove the global one-second timer.nicm