1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
|
18 January 2009
* suspend-client command to suspend a client. Don't try to background it
though...
* Mark attached sessions in sessions lists. Suggested by Simon Kuhnle.
17 January 2009
* tmux 0.6 released.
15 January 2009
* Support #H for hostname and #S for session name in status-left/right.
* Two new commands, choose-window and choose-session which work only when bound
to a key and allow the window or session to be selected from a list. These
are now bound to "w" and "s" instead of the list commands.
14 January 2009
* Rework the prefix-time stuff. The option is now called repeat-time and
defaults to 500 ms. It only applies to a small subset of commands, currently:
up-pane, down-pane, next-window, previous-window, resize-pane-up,
resize-pane-down. These are the commands for which it is obviously useful,
having it for everything else was just bloody annoying.
* The alt-up and alt-down keys now resize a pane by five lines at a time.
* switch-pane is now select-pane and requires -p to select a pane. The
"o" key binding is changed to down-pane.
* up-pane and down-pane commands, bound to arrow up and down by default.
* Multiple vertical window splitting. Minimum pane size is four lines, an
(unhelpful) error will be shown if attempting to split a window with less
that eight lines. If the window is resized, as many panes are shown as can
fit without reducing them below four lines. There is (currently!) not a way
to show a hidden pane without making the window larger.
Note the -p and -l options to split-window are now gone, these may reappear
once I think them through again.
* Server locking on inactivity (lock-after-time) is now disabled by default.
13 January 2009
* kill-pane command.
12 January 2009
* command-prompt now accepts a single argument, a template string. Any
occurrences of %% in this string are replaced by whatever is entered at the
prompt and the result is executed as a command. This allows things like (now
bound by default):
bind , command-prompt "rename-window %%"
Or my favourite:
bind x command-prompt "split-window 'man %%'"
* Option to set prefix time, allowing multiple commands to be entered without
pressing the prefix key again, so long as they each typed within this time of
each other.
* Yet more hacks for key handling. Think it is just about working now.
* Two commands, resize-pane-up and resize-pane-down to resize a pane.
* Make the window pane code handle panes of different sizes, and add a -l
and -p arguments to split-window to specify the new window size in lines
or as a percentage.
11 January 2009
* Vertical window splitting. Currently can only split a window into two panes.
New split-window command splits (bound to ") and switch-pane command (bound to
o) switches between panes.
close-pane, swap-pane commands are to follow. Also to come are pane resizing,
>2 panes, the ability to break a pane out to a full window and vice versa and
possibly horizontal splitting.
Panes are subelements of windows rather than being windows in their own
right. I tried to make them windows (so the splitting was at the session or
client level) but this rapidly became very complex and invasive. So in the
interests of having something working, I just made it so each window can have
two child processes instead of one (and it still took me 12 hours straight
coding). Now the concept is proven and much of the support code is there,
this may change in future if more flexibility is needed.
* save-buffer command, from Tiago Cunha.
10 January 2009
* New option, lock-after-time. If there is no activity in the period specified
by this option (in seconds), tmux will lock the server. Default is 1800 (30
minutes), set to 0 to disable.
* Server locking. Two new commands: set-password to set a password (a
preencrypted password may be specified with -c); and lock-server to lock the
server until the password is entered. Also an additional command line flag,
-U, to unlock from the shell. The default password is blank (any password
accepted). If specifying an encrypted password from encrypt(1) in .tmux.conf
with -c, don't forget to enclose it in single-quotes (') to prevent shell
variable expansion.
* If a window is created from the command line, tmux will now use the same
current working directory for the new process. A new default-path option to
sets the working directory for processes created from keys or interactively
from the prompt.
* New mode to display a large clock. Entered with clock-mode command (bound to
C-b t by default); two window options: clock-mode-colour and clock-mode-style
(12 or 24). This will probably be used as the basis for window locking.
* New command, server-info, to show some server information and terminal
details.
09 January 2009
* Stop using ncurses variables and instead build a table of the codes we want
into an array for each terminal type. This makes the code a little more
untidy in places but gets rid of the awful global variables and calling
setterm all the time, and shoves all the ncurses-dependent mess into a single
file, tty-term.c. It also allows overriding single terminal codes, this is
used to fix rxvt on some platforms (where it is missing dch) and in future
may allow user customisation a la vim.
* Update key handling code. Simplify, support ctrl properly and add a new
window option (xterm-keys) to output xterm key codes including ctrl and,
if available, alt and shift.
08 January 2009
* If built without DEBUG (the release versions), don't cause a fatal error if
the grid functions notice an input error, just log and ignore the
request. This might mean me getting shouted at less often when bugs kill
long-running sessions, at least in release versions.
* Hopefully fix cursor out-of-bounds checking when writing to grid. When I
wrote the code I must have forgotten that the cursor can be one cell off the
right of the screen (yes, I know), so there were number of out-of-bounds/
overflow problems.
07 January 2009
* New flag to set and setw, -u, to unset an option (allowing it to inherit from)
the global options again.
* Added more info messages for options changes.
* A bit of tidying and reorganisation of options code.
06 January 2009
* Don't crash when backspacing if cursor is off the right of the screen,
reported by David Chisnall.
* Complete words at any point inside command in prompt, also use option name
as well as command names.
* Per-client prompt history of up to 100 items.
* Use a splay tree for key bindings instead of an array. As a side-effect this
sorts them when listed.
22 December 2008
* Use the right keys for home and end.
20 December 2008
* Add vim mode for tmux configuration file to examples/, from Tiago Cunha.
15 December 2008
* New command, source-file (alias source), to load a configuration
file. Written by Tiago Cunha, many thanks.
13 December 2008
* Work around lack of dch. On Linux, the rxvt termcap doesn't have it (it is
lying, but we can't really start disbelieving termcaps...). This is a bit
horrible - I can see no way to do it without pretty much redrawing the whole
line, but it works...
10 December 2008
* glibc's getopt(3) is useless: it is not POSIX compliant without jumping
through non-portable hoops, and the method of resetting it is unclear (the
man page on my system says set optind to 1, but other sources say 0). So,
import OpenBSD's getopt_long.c into compat/ for use on Linux and use the
clearly documented optreset = optind = 1 method. This fixes some strange
issues with command parsing (getting the syntax wrong would prevent any
further commands being parsed).
06 December 2008
* Bring set/setw/show/showw into line with other commands. This means that by
default they now affect the current window (if any); the new -g flag must be
passed to set the global options. This changes the behaviour of set/show and
WILL BREAK CURRENT CONFIGURATIONS.
In summary, whether in the configuration file, the command prompt, or a key
binding, use -g to set a global option, use -t to specify a particular window
or session, or omit both to try and use the current window or session.
This makes set/show a bit of a pain but is the correct behaviour for
setw/showw and is the same as every other command, so we can put up with a
bit of pain for consistency.
* Redo window options. They now work in the same way to session options with a
global options set. showw/setw commands now have similar syntax to show/set
(including the ability to use abbreviations).
PLEASE NOTE this includes the following configuration-breaking changes:
- remain-by-default is now GONE, use "setw -g remain-on-exit" to apply the
global window option instead;
- mode-keys is now a window option rather than session - use "setw [-g]
mode-keys" instead of set.
There are also some additions:
- message-fg and message-bg session options to control status line message
colours;
- mode-fg and mode-bg window options to set colours in window modes such as
copy mode.
The options code still a mess and now there is twice as much of it :-(.
02 December 2008
* Add support for including the window title in status-left or status-right
strings by including the character pair "#T". This may be prefixed with
a number to specify a maximum length, for example "#24T" to use at most
24 characters of the title.
* Introduce two new options, status-left-length and status-right-length,
control the maximum length of left and right components of the status bar.
* elinks (and possibly others) bypass the terminal and talk directly to X to
restore the window title when exiting. tmux can't know about this particular
bit of stupidity so the title ends up strange - the prefix isn't terribly
important and elinks is quite useful so just get rid of it.
27 November 2008
* Tweaks to support Dragonfly.
17 November 2008
* tmux 0.5 released.
16 November 2008
* New window option: "utf8"; this must be on (it is off by default) for UTF-8
to be parsed. The global/session option "utf8-default" controls the setting
for new windows.
This means that by default tmux does not handle UTF-8. To use UTF-8 by
default it is necessary to a) "set utf8-default on" in .tmux.conf b) start
tmux with -u on any terminal which support UTF-8.
It seems a bit unnecessary for this to be a per-window option but that is
the easiest way to do it, and it can't do any harm...
* Enable default colours if op contains \033[39;49m, based on a report from
fulvio ciriaco.
12 November 2008
* Keep stack of last windows rather than just most recent; based on a diff from
joshe.
04 November 2008
* Don't try to redraw status line when showing a prompt or message; if it does,
the status timer is never reset so it redraws on every loop. Spotted by
joshe.
09 October 2008
* Translate 256 colours into 16 if 256 is not available, same as screen does.
* Better support for OSC command (only to set window title now), and also
support using APC for the same purpose (some Linux default shell profiles do
this).
25 September 2008
* Large internal rewrite to better support 256 colours and UTF-8. Screen data
is now stored as single two-way array of structures rather than as multiple
separate arrays. Also simplified a lot of code.
Only external changes are three new flags, -2, -d and -u, which force tmux to
assume the terminal supports 256 colours, default colours (useful for
xterm-256color which lacks the AX flag), or UTF-8 respectively.
10 September 2008
* Split off colour conversion code from screen code.
09 September 2008
* Initial UTF-8 support. A bit ugly and with a limit of 4096 UTF-8
characters per window.
08 September 2008
* 256 colour support. tmux attempts to autodetect the terminal by looking
both at what ncurses reports (usually wrong for xterm) and checking if
the TERM contains "256col". For xterm TERM=xterm-256color is needed (as
well as a build that support 256 colours); this seems to work for rxvt
as well. On non-256 colour terminals, high colours are translated to white
foreground and black background.
28 August 2008
* Support OS X/Darwin thanks to bsd-poll.c from OpenSSH. Also convert
from clock_gettime(2) to gettimeofday(2) as OS X doesn't support the
former; microsecond accuracy will have to be sufficient ;-).
07 August 2008
* Lose some unused/useless wrapper functions.
25 July 2008
* Shell variables may now be defined and used in configuration file. Define
variables with:
VAR=1
And use with:
renamew ${VAR}
renamew "x${VAR}x"
Also some other fixes to make, for example, "abc""abc" work similarly to
the shell.
24 July 2008
* Finally lose inconsistently-used SCREEN_DEF* defines.
* If cursor mode is on, switch the arrow keys from \033[A to \033OA.
* Support the numeric keypad in both application and numbers mode. This is
different from screen which always keeps it in application mode.
19 July 2008
* Unbreak "set status" - tmux thought it was ambiguous, reported by rivo nurges.
02 July 2008
* Split vi and emacs mode keys into two tables and add an option (mode-keys)
to select between them. Default is emacs, use,
tmux set mode-keys vi
to change to vi.
vi mode uses space to start selection, enter to copy selection and escape
to clear selection.
01 July 2008
* Protocol versioning. Clients which identify as a different version from the
server will be rejected.
* tmux 0.4 released.
29 June 2008
* Zombie windows. These are not closed when the child process dies. May be
set for a window with the new "remain-on-exit" option; the default setting
of this flag for new windows may be set with the "remain-by-default" session
option.
A window may be restarted with the respawn-window command:
respawn-window [-k] [command]
If -k is given, any existing process running in the window is killed;
if command is omitted, the same command as when the window was first
created is used.
27 June 2008
* Handle nonexistent session or client to -t properly.
25 June 2008
* select-prompt command to allow a window to be selected at a prompt. Only
windows in the current session may be selected. Bound to ' by default.
Suggested by merdely.
* move-window command. Requested by merdely.
* Support binding alt keys (prefixed with M-). Change default to use
C- for ctrl keys (^ is still accepted as an alternative).
* Slim down default key bindings: support lowercase only.
* Handle escaped keys properly (parse eg \033b into a single key code) and
use this to change copy mode next/previous work to M-f and M-b to match
emacs.
24 June 2008
* Next word (C-n/w) and previous word (C-b/b) in copy mode.
23 June 2008
* list-commands command (alias lscm).
* Split information about options into a table and use it to parse options
on input (allowing abbreviations) and to print them with show-options
(meaning that bell-action gets a proper string). This turned out a bit ugly
though :-/.
22 June 2008
* Do not translate black and white into default if the terminal supports
default colours. This was nice to force programs which didn't use default
colours to be properly transparent in rxvt/aterm windows with a background
image, but it causes trouble if someone redefines the default foreground and
background (to have black on white or something).
21 June 2008
* Naive tab completion in the command prompt. This only completes command
names if a) they are at the start of the text b) the cursor is at
the end of the text c) the text contains no spaces.
* Only attempt to set the title where TERM looks like an xterm (contains
"xterm", "rxvt" or is "screen"). I hate this but I don't see a better way:
setting the title actually kills some other terminals pretty much dead.
* Strip padding out of terminfo(5) strings. Currently the padding is just
ignored, this may need to be altered if there are any software terminals
out there that actually need it.
20 June 2008
* buffer-limit option to set maximum size of buffer stack. Default is 9.
* Initial buffer improvements. Each session has a stack of buffers and each
buffer command takes a -b option to manipulate items on the stack. If -b
is omitted, the top entry is used. The following commands are currently
available:
set-buffer [-b index] [-t target-session] string
paste-buffer [-d] [-b index] [-t target-window]
delete-buffer [-b index] [-t target-session]
show-buffers [-t target-session]
show-buffer [-b index] [-t target-session]
-d to paste-buffer deletes the buffer after pasting it.
* New option, display-time, sets the time status line messages stay on screen
(unless a key is pressed). Set in milliseconds, default is 750 (0.75 seconds).
The timer is only checked every 100 ms or so.
19 June 2008
* Use "status" consistently for status line option, and prefix for "prefix" key
option.
* Allow commands to be entered at a prompt. This is triggered with the
command-prompt command, bound to : by default.
* Show status messages properly, without blocking the server.
18 June 2008
* New option, set-titles. On by default, this attempts to set the window title
using the \e]2;...\007 xterm code.
Note that elinks requires the STY environment variable (used by screen) to be
set before it will set the window title. So, if you want window titles set by
elinks, set STY before running it (any value will do). I can't do this for all
windows since setting it to an invalid value breaks screen.
* Show arrows at either end of status line when scrolled if more windows
exist. Highlight the arrow if a hidden window has activity or bell.
* Scroll the status line to show the current window if necessary. Also handle
windows smaller than needed better (show a blank status line instead of
hanging or crashing).
17 June 2008
* tmux 0.3 released.
16 June 2008
* Add some information messages when window options are changed, suggested by
Mike Erdely. Also add a -q command-line option to suppress them.
* show-window-options (showw) command.
15 June 2008
* show-options (show) command to show one or all options.
14 June 2008
* New window options: force-width and force-height. This will force a window
to an arbitrary width and height (0 for the default unlimited). This is
neat for emacs which doesn't have a sensible way to force hard wrapping at 80
columns. Also, don't try to be clever and use clr_eol when redrawing the
whole screen, it causes trouble since the redraw functions are used to draw
the blank areas too.
* Clear the blank area below windows properly when they are smaller than client,
also add an indicator line to show the vertical limit.
* Don't die on empty strings in config file, reported by Will Maier.
08 June 2008
* Set socket mode +x if any sessions are attached and -x if not.
07 June 2008
* Make status-interval actually changeable.
06 June 2008
* New window option: aggressive-resize. Normally, windows are resized to the
size of the smallest attached session to which they are linked. This means a
window only changes size when sessions are detached or attached, or they are
linked or unlinked from a session. This flag changes a window to be the size
of the smallest attached session for which it is the current window - it is
resized every time a session changes to it or away from it. This is nice for
things that handle SIGWINCH well (like irssi) and bad for things like shells.
* The server now exits when no sessions remain.
* Fix bug with inserting characters with TERM=xterm-color.
05 June 2008
* Completely reorganise command parsing. Much more common code in cmd-generic.c
and a new way of specifying windows, clients or sessions. Now, most commands
take a -t argument, which specifies a client, a session, or a window target.
Clients and sessions are given alone (sessions are fnmatch(3)d and
clients currently not), windows are give by (client|session):index. For
example, if a user is in session "1" window 0 on /dev/ttypi, these should all
be equivalent:
tmux renamew newname (current session and window)
tmux renamew -t: newname (current session and window)
tmux renamew -t:0 newname (current session, window 0)
tmux renamew -t0 newname (current session, window 0)
tmux renamew -t1:0 newname (session 1, window 0)
tmux renamew -t1: newname (session 1's current window)
tmux renamew -t/dev/ttypi newname (client /dev/ttypi's current
session and window)
tmux renamew -t/dev/ttypi: newname (client /dev/ttypi's current
session and window)
tmux renamew -t/dev/ttypi:0 newname (client /dev/ttypi's current
session, window 0)
This does have some downsides, for example, having to use -t on selectw,
tmux selectw -t7
is annoying. But then using non-flagged arguments would mean renaming the
current window would need to be something like:
tmux renamew : newname
It might be better not to try and be so consistent; comments to the usual
address ;-).
* Infrastructure for printing arguments in list-keys output. Easy ones only for
now.
04 June 2008
* Add some vi(1) key bindings in copy mode, and support binding ^[, ^\, ^]
^^ and ^_. Both from/prompted by Will Maier.
* setw monitor-activity and set status without arguments now toggle the current
value; suggested by merdely.
* New command set-window-option (alias setw) to set the single current window
option: monitor-activity to determine whether window activity is shown in
the status bar for that window (default off).
* Change so active/bell windows are inverted in status line.
* Activity monitoring - window with activity are marked in status line. No
way to disable this/filter windows yet.
* Brought select-window command into line with everything else; it now uses
-i for the window index.
* Strings to display on the left and right of the status bar may now be set
with the status-left and status-right options. These are passed through
strftime(3) before being displayed. The status bar is automatically updated
at an interval set by the status-interval option. The default is to display
nothing on the left and the date and time on the left; the default update
interval is 15 seconds.
03 June 2008
* Per session options. Setting options without specifying a session sets the
global options as normal (global options are inherited by all sessions);
passing -c or -s will set the option only for that session.
* Because a client has a session attached, any command needing a session can
take a client and use its session. So, anything that used to accept -s now
accepts -c as well.
* -s to specify session name now supports fnmatch(3) wildcards; if multiple
sessions are found, or if no -s is specified, the most newly created is used.
* If no command is specified, assume new-session. As a byproduct, clean up
command default values into separate init functions.
* kill-server command.
02 June 2008
* New command, start-server (alias "start"), to start the tmux server and do
nothing else. This is good if you have a configuration file which creates
windows or sessions (like me): in that case, starting the server the first
time tmux new is run is bad since it creates a new session and window (as
it is supposed to - starting the server is a side-effect).
Instead, I have a little script which does the equivalent of:
tmux has -s0 2>/dev/null || tmux start
tmux attach -d -s0
And I use it to start the server if necessary and attach to my primary
session.
* Basic configuration file in ~/.tmux.conf or specified with -f. This is file
contains a set of tmux commands that are run the first time the server is
started. The configuration commands are executed before any others, so
if you have a configuration file that contains:
new -d
neww -s0
And you do the following without an existing server running:
tmux new
You will end up with two sessions, session 0 with two windows (created by
the configuration file) and your client attached to session 1 with one
window (created by the command-line command). I'm not completely happy with
this, it seems a little non-obvious, but I haven't yet decided what to do
about it.
There is no environment variable handling or other special stuff yet.
In the future, it might be nice to be able to have per-session configuration
settings, probably by having conditionals in the file (so you could, for
example, have commands to define a particular window layout that would only
be invoked if you called tmux new -smysession and mysession did not
|