summaryrefslogtreecommitdiffstats
path: root/cfg.c
AgeCommit message (Collapse)Author
2018-01-17Merge branch 'obsd-master'Thomas Adam
2018-01-15Some unused code, GitHub issue 1219.nicm
2017-10-06Merge branch 'obsd-master'Thomas Adam
2017-10-06Support %else in config files to match %if, from Brad Town in GitHubnicm
issue 1071.
2017-05-31Differences to OpenBSD.Nicholas Marriott
2017-05-31Merge branch 'obsd-master'Thomas Adam
Conflicts: Makefile.am cfg.c server-client.c
2017-05-30Rewrite of choose mode, both to simplify and tidy the code and to addnicm
some modern features. Now the common code is in mode-tree.c, which provides an API used by the three modes now separated into window-{buffer,client,tree}.c. Buffer mode shows buffers, client mode clients and tree mode a tree of sessions, windows and panes. Each mode has a common set of key bindings plus a few that are specific to the mode. Other changes are: - each mode has a preview pane: for buffers this is the buffer content (very useful), for others it is a preview of the pane; - items may be sorted in different ways ('O' key); - multiple items may be tagged and an operation applied to all of them (for example, to delete multiple buffers at once); - in tree mode a command may be run on the selected item (session, window, pane) or on tagged items (key ':'); - displayed items may be filtered in tree mode by using a format (this is used to implement find-window) (key 'f'); - the custom format (-F) for the display is no longer available; - shortcut keys change from 0-9, a-z, A-Z which was always a bit weird with keys used for other uses to 0-9, M-a to M-z. Now that the code is simpler, other improvements will come later. Primary key bindings for each mode are documented under the commands in the man page (choose-buffer, choose-client, choose-tree). Parts written by Thomas Adam.
2017-05-01Merge branch 'obsd-master'Thomas Adam
2017-05-01In order that people can use formats like #D in #() in the status linenicm
and not have to wait for an update when they change pane, we allow commands to run more than once a second if the expanded form changes. Unfortunately this can mean them being run far too often (pretty much continually) when multiple clients exist, because some formats (including #D) will always differ between clients. To avoid this, give each client its own tree of jobs which means that the same command will be different instances for each client - similar to how we have the tag to separate commands for different panes. GitHub issue 889; test case reported by Paul Johnson.
2017-04-25Merge branch 'obsd-master'Thomas Adam
2017-04-25Block the initial client if there is one until the configuration filenicm
has finished loading.
2017-04-21Merge branch 'obsd-master'Thomas Adam
2017-04-21History needs to be loaded after config parsing is done - now thatnicm
commands are queued, that's in cfg_done not after start_cfg finishes.
2017-04-21Do not run the config file in the context of the first client, insteadnicm
use no client like we did before. This means commands like new-session won't try to attach if they are in the config file.
2017-04-06Merge branch 'obsd-master'Thomas Adam
Conflicts: server-client.c tmux.1
2017-04-05cfg_file can be static.nicm
2017-02-03Merge branch 'obsd-master'Thomas Adam
2017-02-03Add a window or pane id "tag" to each format tree and use it to separatenicm
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.
2017-01-16Merge branch 'obsd-master'Thomas Adam
2017-01-15It is silly for cmd_list_parse to return an integer error when it couldnicm
just return NULL.
2017-01-09Merge branch 'obsd-master'Thomas Adam
2017-01-09Add %if/%endif for conditionals when parsing configuration files, thenicm
argument is a format (the new == and != are useful).
2017-01-09Merge branch 'obsd-master'Thomas Adam
2017-01-09Run the source-file pattern through glob(3).nicm
2016-10-16Merge branch 'obsd-master'Thomas Adam
2016-10-16Mass rename struct cmd_q to struct cmdq_item and related.nicm
2016-10-16Merge branch 'obsd-master'Thomas Adam
2016-10-16Rewrite command queue handling. Each client still has a command queue,nicm
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.
2016-10-14Merge branch 'obsd-master'Thomas Adam
2016-10-14source-file and some other commands can recurse back into cmdq_continue,nicm
which could potentially free the currently running command, so we need to take a reference to it in cmdq_continue_one. Fixes problem reported by Theo Buehler.
2016-10-12Merge branch 'obsd-master'Thomas Adam
Conflicts: format.c osdep-openbsd.c
2016-10-11Some other stuff that can be local to one file.nicm
2016-10-10Loads more static, except for cmd-*.c and window-*.c.nicm
2016-05-12Merge branch 'obsd-master'Thomas Adam
2016-05-12- Rework load_cfg() error handling a little.tim
- Add -q to source-file to suppress errors about nonexistent files. Input and OK nicm@
2016-01-19Merge branch 'obsd-master'Thomas Adam
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-11-18Merge branch 'obsd-master'Thomas Adam
2015-11-18Use __unused rather than rolling our own.nicm
2015-09-09Merge branch 'obsd-master'Thomas Adam
2015-09-09No need to keep global options around for client which doesn't use them.nicm
2015-09-06Fix includesThomas Adam
Let compat/ work out the includes; otherwise works on OpenBSD.
2015-09-01Work out config file when needed not at startup.nicm
2015-09-01Move initial conf load into cfg.c.nicm
2015-06-05Change deref to the more sensible unref, and add a couple I missed before.nicm
2015-05-07Style spacing nits.nicm
2015-04-27Reset cfg_ncauses to 0 as well or we could allocate the wrong size ifnicm
called again.
2015-04-25Fix some char* -> char *.nicm
2015-04-25Use a char **,u_int pair for cfg_causes.nicm
2015-04-19Rewrite of tmux mouse support which was a mess. Instead of havingnicm
options for "mouse-this" and "mouse-that", mouse events may be bound as keys and there is one option "mouse" that turns on mouse support entirely (set -g mouse on). See the new MOUSE SUPPORT section of the man page for description of the key names and new flags (-t= to specify the pane or window under mouse as a target, and send-keys -M to pass through a mouse event). The default builtin bindings for the mouse are: bind -n MouseDown1Pane select-pane -t=; send-keys -M bind -n MouseDown1Status select-window -t= bind -n MouseDrag1Pane copy-mode -M bind -n MouseDrag1Border resize-pane -M To get the effect of turning mode-mouse off, do: unbind -n MouseDrag1Pane unbind -temacs-copy MouseDrag1Pane The old mouse options are now gone, set-option -q may be used to suppress warnings if mixing configuration files.