forked from mintty/mintty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmintty.1
1518 lines (1275 loc) · 55.7 KB
/
mintty.1
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
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\" mintty man page
.\"
.\" This 'man' page is Copyright 2009 Lee D. Rothstein, 2009-13 Andy Koppe
.\"
.\" You may distribute, use, and modify this man page under the terms
.\" of the GNU Free Documentation License (GFDL), Version 1.3,
.\" 3 November 2008 (or later) as specified.
.TH mintty 1 mintty
.ad l
.SH NAME
mintty \(en Cygwin terminal emulator
.SH SYNOPSIS
\fBmintty\fP [\fIOPTION\fP]... [ \fB-\fP | \fIPROGRAM\fP [\fIARG\fP]... ]
.SH DESCRIPTION
\fBMintty\fP is a terminal emulator for Cygwin with a native Windows user
interface and minimalist design.
Its terminal emulation is largely compatible with \fBxterm\fP, but it does not
require an X server.
.SH INVOCATION
If a program name is supplied on the command line, this is executed with any
additional arguments given.
Otherwise, mintty looks for a shell to execute in the \fISHELL\fP environment
variable.
If that is not set, it reads the user's default shell setting from
\fI/etc/passwd\fP.
As a last resort, it falls back to \fI/bin/sh\fP.
If a single dash is specified instead of a program name, the shell is invoked
as a login shell.
.SH OPTIONS
The standard GNU option formats are accepted, with single dashes
introducing short options and double dashes introducing long options.
.TP
\fB-c\fP, \fB--config\fP \fIFILENAME\fP
Read settings from the specified configuration file, in addition to
the default config files.
Configuration changes are saved to the last file thus specified and not
read-only at the time of loading.
.TP
\fB-C\fP, \fB--loadconfig\fP \fIFILENAME\fP
Read settings from the specified configuration file, in addition to
the default config files.
The file is not taken into account for saving configuration changes.
This is useful to mix-in partial configuration variants, particularly
colour schemes. However, \fB-o ThemeFile=\fIFILENAME\fP may be preferable.
.TP
\fB-e\fP, \fB--exec\fP \fIPROGRAM\fP [\fIARG\fP ...]
Execute the specified program in the terminal session and pass on any additional
arguments.
This option is present for compatibility with other terminal emulators only.
It can be omitted, in which case the first non-option argument, if any,
is taken as the name of the program to execute.
.TP
\fB-h\fP, \fB--hold\fP \fBnever\fP|\fBstart\fP|\fBerror\fP|\fBalways\fP
Determine whether to keep the terminal window open when the command has
finished and no more processes are connected to the terminal.
The argument can be abbreviated to a single letter.
By default, the window is closed immediately, except if the child process has
exited with status 255, which is used to indicate failure to execute the shell
command. (Exit status 255 is also used by \fBssh\fP to indicate connection
errors.)
Alternatively, the window can be set to never stay open, to always stay open,
or to stay open only if the child process terminates with an error, i.e. with
a non-zero exit status or due to a signal indicating a runtime error.
.TP
\fB-i\fP, \fB--icon\fP \fIFILE\fP[\fB,\fIINDEX\fR]
Load the window icon from an executable, DLL, or icon file. The optional
comma-separated index can be used to select a particular icon in a file with
multiple icons.
\fINote:\fP About interaction problems of icon, shortcut, and the Windows taskbar:
In a Windows desktop shortcut, to achieve consistent icon behaviour,
the same icon should be specified in the shortcut properties (Change Icon...)
and the mintty command line (Target:),
or (beginning 2.2.3) no icon should be specified on the command line as
mintty will then take the icon from the invoking shortcut,
also resolving a leading Windows environment variable (like %SystemRoot%).
.TP
\fB-l\fP, \fB--log\fP \fIFILE\fP|\fB-\fP
Copy all output into the specified log file, or standard output if a dash is
given instead of a file name.
If FILE contains \fB%d\fP it will be substituted with the process ID.
(See also \fIscript\fP(1) for a more flexible logging tool.)
.TP
\fB-o\fP, \fB--option\fP \fINAME\fP=\fIVALUE\fP
Override the named config file option with the given value, e.g.
\fC-o ScrollbackLines=1000\fP.
.TP
\fB-p\fP, \fB--position\fP \fIX\fB,\fIY\fR
Open the window with its top left corner at the specified coordinates.
Instead of coordinates, "centre" or "center" can be specified to place
the window in the screen centre, and "right" or "bottom" can be specified
to align the right or bottom window border with the right or bottom
screen border (together with another option -p to specify an offset).
Option value "@N" where N is a number places the window on monitor N.
Multiple -p options can be combined; coordinates have a different meaning
depending on other options:
.br
\(en With "left", "top", or "@N", related coordinates are relative to the monitor.
.br
\(en With "right" or "bottom", related coordinates adjust the right or bottom
window border relative to the monitor.
.br
\(en Otherwise, coordinates are absolute and address the common multi-monitor
address space as provided by Windows.
\fINote:\fP For another option to select the monitor for a new mintty window,
see the description of Alt+F2.
.TP
\fB-s\fP, \fB--size\fP \fICOLS\fB,\fIROWS\fR
Set the default size of the window in character columns and rows.
(The xterm-like syntax \fICOLS\fBx\fIROWS\fR is accepted too.)
Instead of coordinates, "maxwidth" or "maxheight" can be specified;
this can be combined with another parameter \fB-s\fP for the other dimension.
The dimension for which "max" is applied is ignored in further \fB-s\fP or
\fB-p\fP parameters.
For example, \fBmintty -s maxwidth -p 0,0 -s 0,10\fP will start a window
at full screen width, positioned at the top of the screen, with 10 lines.
.TP
\fB-t\fP, \fB--title\fP \fITITLE\fP
Use \fITITLE\fP as the initial window title.
By default, the title is set to the executed command.
.TP
\fB-T\fP, \fB--Title\fP \fITITLE\fP
Use \fITITLE\fP as the permanent window title.
The title is not changeable by control sequences.
This feature is only available on the command line.
.TP
\fB-B\fP, \fB--Border\fP \fBframe\fP|\fBvoid\fP
Suppress window title, display only a frame or no border.
This feature is only available on the command line.
.TP
\fB-u\fP, \fB--utmp\fP
Create a utmp entry.
.TP
\fB-w\fP, \fB--window\fP \fBnormal\fP|\fBmin\fP|\fBmax\fP|\fBfull\fP|\fBhide\fP
Set the initial window state: normal, minimised, maximised, full screen,
or hidden.
.TP
\fB--class\fP \fICLASS\fP
Use \fICLASS\fP as the window class name of the main window.
This allows scripting tools to distinguish different mintty instances.
The default is "mintty".
.TP
\fB-d\fP, \fB--nodaemon\fP
Do not apply "daemonizing".
By default, mintty tries to detach itself from the invoking terminal when
started from a Cygwin Console in order to avoid disabled signal reception,
and when cloning the window (Alt+F2) in order to avoid a remaining zombie process.
.TP
\fB-D\fP, \fB--daemon\fP
Enforce "daemonizing".
By default, mintty tries to detach itself from the invoking terminal only
as described above. With this option, it tries to detach always.
This makes a difference if a Windows "Shortcut key" is configured in a
Windows desktop shortcut for starting mintty. Without daemonizing, the
shortcut key will focus an already running instance of mintty, with
daemonizing it always starts a new instance.
.TP
\fB-R\fP, \fB--Reportpos\fP \fImode\fP
Report position and size of window before mintty exits. This can be used
to manage last window positions and reopen mintty windows accordingly.
Mode is "s" or "o" to choose short or long option syntax.
The restored (i.e. neither maximised nor minimised) geometry is reported
and min/max/fullscreen information is added.
.TP
\fB--store-taskbar-properties\fP
Enable persistent storage of Windows taskbar properties together with
options AppName and AppLaunchCmd.
.TP
\fB--nopin\fP
Prevent pinning of the mintty window to the Windows taskbar.
.TP
\fB-H\fP, \fB--help\fP
Display a brief help message and exit.
.TP
\fB-V\fP, \fB--version\fP
Print version information and exit.
.SH USAGE
Mintty tries to adhere to both Windows and Unix usage conventions.
Where they conflict, an option is usually provided.
This section primarily describes the default configuration;
see the \fBCONFIGURATION\fP section on how it can be customised.
.SS Menus
The context menu can be opened by right-clicking the mouse (with Shift
in case right-click has been redefined or redirected to the application) or by
pressing the \fBMenu\fP key that is normally located next to the right Ctrl key.
Mintty also adds a couple of items to the window menu, which can be accessed
by clicking on the program icon or pressing \fBAlt+Space\fP.
Both menus have an entry that leads to the options dialog for changing mintty's
configuration.
.SS Copy & paste
Screen contents can be selected by holding down the left mouse button and
dragging the mouse. If Alt is held down before the left mouse button, a
rectangular block instead of whole lines will be selected.
The selection can be extended by holding down \fBShift\fP while left-clicking.
Double-clicking or triple-clicking selects a whole word or line, whereby word
selection includes special characters that commonly appear in file names and
URLs.
By default, selected text is automatically copied to the clipboard.
This can be disabled on the \fBMouse\fP page of the options dialog.
Selected text can also be copied manually using either the \fBCopy\fP menu
command, the \fBCtrl+Ins\fP or \fBCtrl+C\fP keyboard shortcuts,
or the middle mouse button combined with \fBShift\fP.
The selected region is copied as "rich text" as well as normal text,
which means it can be pasted with colours and formatting into applications
that support it, e.g. word processors ("true colour" attributes are not supported).
The window title can be copied using the \fBCopy Title\fP command in the window
menu.
The clipboard contents can be pasted using either the \fBPaste\fP menu command,
the \fBShift+Ins\fP or \fBCtrl+V\fP keyboard shortcuts,
or the middle mouse button.
Not only text but also files and directories can be pasted,
whereby the latter are inserted as Cygwin file names.
Shell quoting is added to file names that contain spaces or special characters.
.SS Drag & drop
Text, files and directories can be dropped into the mintty window.
They are inserted in the same way as if they were pasted from the clipboard.
.SS Opening files, directories and URLs
Files, directories, URLs and web addresses beginning with "www." can be
opened either by holding \fBCtrl\fP while left-clicking on them (or
double-clicking, if and as enabled by option OpeningClicks), or by
selecting them and choosing the \fBOpen\fP command from the context menu.
Please note that a relative file or directory path is interpreted as relative
to the current working directory of the terminal foreground process if that
can be determined.
.SS Font zoom
The font size can be increased or decreased using the keyboard shortcuts
\fBCtrl+(keypad-)plus\fP and \fBCtrl+(keypad-)minus\fP,
or by holding \fBCtrl\fP while rolling the mousewheel.
\fBCtrl+zero\fP or \fBCtrl+middle-mouse click\fP returns the font size
to the default.
.br
\fIShift-coupled window-with-font zooming:\fP
If Shift is also held while zooming, the window will be resized to scale
together with the font, keeping the terminal character size if possible.
This is not applied to the shifted numeric keypad "0" (which has other
meaning) and to the shifted normal (non-keypad) "-" and "+" keys
(because the shifted key could have a valid mapping, e.g. Ctrl+_, or the
"+" key could be shifted itself already).
.br
Zooming by keyboard or mouse can be disabled, respectively, with options
ZoomShortcuts=no or ZoomMouse=no.
.SS Drag resize
The usual windows function to drag on the window border resizes the terminal.
.br
\fIShift-coupled font-with-window zooming:\fP
If Shift is also held while resizing, the font will be scaled along with
the resizing, unless disabled with ZoomFontWithWindow=false
(which would help to avoid interference with certain shifted hotkeys configured
to resize the window).
.br
Note that due to the different height/width factors, coupled font zooming
is not a precise operation.
.SS DPI change
When DPI setting changes (by reconfiguration of display properties
"what's on your screen ... smaller/medium/larger" or moving the mintty window
between monitors with different DPI settings), mintty adapts its screen
size to avoid Windows blurred auto-adaptation. If Shift is also held during
the change, the font will be scaled too, roughly maintaining the screen
dimensions.
.SS Full screen
Full screen mode can be toggled using either the \fBFull Screen\fP command in
the menu or either of the \fBAlt+Enter\fP and \fBAlt+F11\fP keyboard shortcuts,
or the generic window title functions.
.SS Default size
If the window has been resized, it can be returned to the default size set in
the Window pane of the options using the \fBDefault size\fP command in the
menu or the \fBAlt+F10\fP shortcut.
\fBShift+Alt+F10\fP also restores the font size to its default.
.SS Reset
Sometimes a faulty application or printing a binary file will leave the
terminal in an unusable state. In that case, resetting the terminal's state
via the \fBReset\fP command in the menu or the \fBAlt+F8\fP keyboard shortcut
may help.
.SS Scrolling
Mintty has a scrollback buffer that can hold up to 10000 lines in the default
configuration.
It can be accessed using the scrollbar, the mouse wheel, or the keyboard.
Hold the \fBShift\fP key while pressing the \fBUp\fP and \fBDown\fP arrow keys
to scroll line-by-line or the \fBPageUp\fP and \fBPageDown\fP keys to scroll
page-by-page.
.SS Searching in the text and scrollback buffer
Alt-F3 opens a search bar with an input field for a search string. Matches are
highlighted in the scrollback buffer. Enter/Shift+Enter find the next/previous
position of the match and scrolls the scrollback buffer accordingly.
The appearance of the search bar and the matching highlight colours can be
customized.
.SS Flip screen
Applications such as editors and file viewers normally use a terminal feature
called the alternate screen, which is a second screen buffer without scrollback.
When they exit, they switch back to the primary screen to restore the command
line as it was before invoking the application.
The \fBFlip Screen\fP menu command and \fBAlt+F12\fP shortcut allow looking
at the primary screen while the alternate screen is active, and vice versa.
For example, this allows to refer to past commands while editing a file.
.SS Switching session
The \fBCtrl+Tab\fP and \fBCtrl+Shift+Tab\fP shortcuts can be used to switch
between mintty windows. Minimised windows are skipped.
.SS Closing a session
Clicking the window's close button, pressing \fBAlt+F4\fP, or choosing
\fBClose\fP from the window menu sends a \fISIGHUP\fP signal to the process
running in mintty, which normally causes it to exit.
That signal can be ignored, though, in which case the program might have to be
forced to terminate by sending a \fISIGKILL\fP signal instead.
This can be done by holding down \fBShift\fP when using the close button,
shortcut or menu item.
.SS Mouse tracking
When an application activates mouse tracking, mouse events are sent to the
application rather than being treated as window events.
This is indicated by the mouse pointer changing from an \fBI\fP shape to an
arrow.
Holding down \fBShift\fP overrides mouse tracking mode and sends mouse
events to the window instead, so that e.g. text can be selected and the context
menu can be accessed.
.SS Alt codes
The Windows Alt+Numpad method for entering character codes is supported,
whereby the Alt key has to be held while entering the character code.
Only the first key has to be on the numpad; subsequent digits can be entered
both on the numpad or the main part of the keyboard.
If the first key is the \fB'+'\fP on the numpad, the code is interpreted as
hexadecimal, whereby digits A through F can be entered using the letter keys.
If the first key is a zero, the code is interpreted as octal.
If the first key is any other digit from 1 to 9, the code is interpreted as
decimal.
For UTF-8 and other Unicode encodings such as GB18030, the entered code is
interpreted as a Unicode codepoint and encoded accordingly before it is sent.
For other encodings, the entered code is sent as is. If it doesn't fit into one
byte, it is sent as multiple bytes, with the the most significant non-zero byte
first.
.SS Shortcuts
An overview of all the keyboard shortcuts.
.TP
\fBScrollback\fP
.br
\(en \fBShift+Up\fP: Line up
.br
\(en \fBShift+Down\fP: Line down
.br
\(en \fBShift+PgUp\fP: Page up
.br
\(en \fBShift+PgDn\fP: Page down
.br
\(en \fBShift+Home\fP: Top
.br
\(en \fBShift+End\fP: Bottom
.br
\(en \fBAlt+F3\fP: Search
.TP
\fBCopy and paste\fP
.br
\(en \fBCtrl+Ins\fP: Copy
.br
\(en \fBShift+Ins\fP: Paste
.br
\(en \fBCtrl+Shift+Ins\fP: Copy and paste
.TP
\fBWindow commands\fP
.br
\(en \fBAlt+F2\fP: New (clone window at current size); see notes below
.br
\(en \fBShift+Alt+F2\fP: New (clone window at configured size); see notes below
.br
\(en \fBAlt+F3\fP: Search (in scrollback buffer)
.br
\(en \fBAlt+F4\fP: Close
.br
\(en \fBAlt+F8\fP: Reset
.br
\(en \fBAlt+F10\fP: Default terminal size (rows/columns)
.br
\(en \fBShift+Alt+F10\fP: Default terminal size (rows/columns) and font size
.br
\(en \fBAlt+F11\fP or \fBAlt+Enter\fP: Toggle full screen
.br
\(en \fBShift+Alt+F11\fP or \fBShift+Alt+Enter\fP: Toggle full screen and zoom font
(Note that due to the different height/width factors, this is not a precise operation)
.br
\(en \fBAlt+F12\fP: Flip screen
.br
\(en \fBAlt+Space\fP: Window menu
.br
\(en \fBCtrl+Tab\fP: Next window
.br
\(en \fBCtrl+Shift+Tab\fP: Previous window
Multi-monitor selection support: Alt+F2 will only spawn a new window
after F2 has been released. While F2 is being held, the target monitor
can be selected with a sequence of numeric keypad keys:
.br
\(en cursor-up/down/left/right (8/2/4/6) navigate the target focus to the
respective neighbour in the monitor grid;
.br
\(en the diagonal keys (7/9/1/3) combine two directions respectively;
.br
\(en the central key (5) sets the target focus to the Windows "primary" monitor;
.br
\(en the Ins key (0) or Del resets the focus to the current monitor.
.br
These navigation controls can be applied repeatedly to select a monitor further away.
Note that a heuristic algorithm is used, based on the size of the smallest
monitor attached to the system, so the target may not always be selected
as expected if multiple monitors of different size are available or
monitors are not arranged in a regular grid.
.TP
\fBFont zoom\fP
.br
\(en \fBCtrl+(keypad-)plus\fP: Zoom font in
.br
\(en \fBCtrl+(keypad-)minus\fP: Zoom font out
.br
\(en \fBCtrl+Shift+(keypad-)plus\fP: Zoom font and window in
.br
\(en \fBCtrl+Shift+(keypad-)minus\fP: Zoom font and window out
.br
\(en \fBCtrl+zero\fP: Back to configured font size
.TP
\fBCtrl+Shift+letter shortcuts\fP
An alternative set of shortcuts for clipboard and window commands using
\fBCtrl+Shift+letter\fP combinations is available. These can be enabled on the
Keys pane of the options dialog.
.br
\(en \fBCtrl+Shift+A\fP: Select all
.br
\(en \fBCtrl+Shift+C\fP: Copy
.br
\(en \fBCtrl+Shift+V\fP: Paste
.br
\(en \fBCtrl+Shift+N\fP: New
.br
\(en \fBCtrl+Shift+H\fP: Search scrollback buffer
.br
\(en \fBCtrl+Shift+W\fP: Close
.br
\(en \fBCtrl+Shift+R\fP: Reset
.br
\(en \fBCtrl+Shift+D\fP: Default terminal size (rows/columns)
.br
\(en \fBCtrl+Shift+F\fP: Full screen (not zooming font despite Shift)
.br
\(en \fBCtrl+Shift+S\fP: Flip screen
.SH CONFIGURATION
Mintty has a graphical options dialog that can be reached via the context menu
or the window menu. It has the following action buttons:
.br
\(en \fBCancel\fP: discards changes.
.br
\(en \fBSave\fP: applies and saves changes and closes the dialog.
.br
\(en \fBApply\fP: applies changes to the current instance of mintty
but does not save them to the configuration file. So using \fBApply\fP
then \fBCancel\fP, local changes can be applied (and tested) without
affecting further instances of mintty.
In configuration files, settings are stored as \fINAME\fP=\fIVALUE\fP pairs,
with one per line. By default, they are read from any file of
\fI/etc/minttyrc\fP, \fI$APPDATA/mintty/config\fP,
\fI~/.config/mintty/config\fP, \fI~/.minttyrc\fP, in this order.
Additional configuration files can be specified using the
\fB-c\fP/\fB--config\fP or \fB-C\fP/\fB--loadconfig\fP command line options.
These are read in order after the default config files,
with settings in later files overriding those in earlier ones.
Configuration changes are saved to the last writable file
read by default or specified with \fB-c\fP/\fB--config\fP,
or \fI~/.minttyrc\fP if none is given.
Individual settings can also be specified on the command line using the
\fB-o\fP/\fB--option\fP.
\fINote:\fP Many string values in the config files, especially those
referring to file names or Windows items, are \fBUnicode-enabled\fP,
meaning they are expected to be UTF-8-encoded in the configuration
file independently of the encoding the terminal runs in; as a fallback,
if the configuration value is not valid UTF-8, it is interpreted in
the system ANSI encoding.
(This does not apply to the same configuration settings when given on the
command-line.)
.br
Unicode-enabled settings: BellFile, ThemeFile, Title, ExitTitle, Icon, Log,
Font, Printer, Answerback, Class, AppID, AppName, AppLaunchCmd.
Be careful when running multiple instances of mintty. If options are saved
from different instances, obviously they can overwrite each other; if
different mintty versions are run (e.g. from cygwin and msys sharing the same
home directory), options may even get dropped from the configuration file.
Additional resource files are used for colour schemes (option ThemeFile,
subdirectory \fIthemes\fP) and wave files (option BellFile, subdirectory \fIsounds\fP)
within the mintty resource directories \fI~/.mintty\fP, \fI~/.config/mintty\fP,
\fI$APPDATA/mintty\fP, \fI/usr/share/mintty\fP.
The following sections explain the settings on each pane of the options
dialog, followed by settings that do not appear in the dialog.
For each setting, its name in the config file is shown in parentheses,
along with its default value.
If there is only a name in parentheses, there is currently
no GUI configuration facility for that option
(see also Hidden settings below).
.SS Looks
Settings affecting mintty's appearance.
.TP
\fBColours\fP
Clicking on one of the buttons here opens the colour selection dialog.
.br
In the settings (config file or command-line options), colours are
represented as comma-separated RGB triples with decimal 8-bit values
ranging from 0 to 255. X-style hexadecimal colour specifications such
as #RRGGBB, rgb:RR/GG/BB or rgb:RRRR/GGGG/BBBB can be used as well.
Also X11 color names are supported.
.br
\(en \fBForeground\fP (ForegroundColour=191,191,191)
.br
\(en \fBBackground\fP (BackgroundColour=0,0,0)
.br
\(en \fBCursor\fP (CursorColour=191,191,191)
\(en \fBTheme\fP (ThemeFile=):
The popup offers theme files as stored in a resource subdirectory
\fIthemes\fP for selection as a colour scheme.
The option can also be set to a filename (like D:/.../solarized-light.minttyrc).
The field can also be used as a drag-and-drop target for colour schemes
downloaded from the Color Scheme Configurator, or for theme files from the web
(note that the program \fBcurl\fP needs to be installed for the latter option).
See the Tips wiki page \fIhttps://github.com/mintty/mintty/wiki/Tips\fP
about this mechanism.
.TP
\fBTransparency\fP (Transparency=off)
Window transparency level, with the following choices:
.br
\(en \fBOff\fP
.br
\(en \fBLow\fP
.br
\(en \fBMedium\fP
.br
\(en \fBHigh\fP
.br
\(en \fBGlass\fP
The \fBGlass\fP option is only available on Vista and above with desktop
compositing enabled.
To make this reasonably usable, the glass colour needs to be set to be as dark
as possible in the Windows control panel: choose \fIPersonalize\fP from the
desktop context menu, click on \fIWindow Color\fP, turn the colour intensity up
to the maximum, show the colour mixer, and turn the brightness down to black.
Numeric transparency values ranging from 4 to 254 can be specified in config
files or on the command line. (Values below 4 are multiplied by 16, for
backward compatibility reasons.)
.TP
\fBOpaque when focused\fP (OpaqueWhenFocused=no)
Enable to make the window opaque when it is active (to avoid background
distractions when working in it).
.TP
\fBCursor\fP (CursorType=line)
The following cursor types are available:
.br
\(en \fBLine\fP
.br
\(en \fBBlock\fP
.br
\(en \fBUnderscore\fP
The line cursor is displayed with the width set in the Accessibility Options
control panel / Ease of Access Center, mouse panel or Optimize visual display.
.TP
\fBCursor blink\fP (CursorBlinks=yes)
If enabled, the cursor blinks at the rate set in the Keyboard control panel.
.SS Text
Settings controlling text display.
.TP
\fBFont selection\fP
Clicking on the \fBSelect\fP button opens a dialog where the font and its
properties can be chosen. Font styles other than \fBBold\fP are ignored.
In the config file, this corresponds to the following entries:
.br
\(en \fBFont\fP (Font=Lucida Console)
.br
\(en \fBFont style\fP (FontWeight=400, FontIsBold=no)
.br
\(en \fBSize\fP (FontHeight=9)
.br
The font selection dialog also offers an \fBApply\fP button for
convenient testing how the selected font looks. Its function is the same
as the \fBApply\fP button of the Options dialog.
Further settings can be given in the config file:
.br
\(en \fBFont boldness\fP (FontWeight=400): This is an implicit value after
selecting a font in the font selection menu, or can be specified in the
config file or on the command line for font selection. Typical weights
are \fBNormal\fP/\fBRegular\fP (FontWeight=400) and \fBBold\fP (FontWeight=700
or FontIsBold=yes) but if a font family has a different scheme or more than
2 font weights, the weight value can be used for more specific selection.
If a font family has no bold weight but boldness was requested, mintty
does not adhere to this scheme but enforces bold font selection; however,
in this case the bold attribute may not be effective.
.br
\(en \fBShow "hidden" fonts\fP (ShowHiddenFonts=no):
This hidden setting enables display of monospace fonts in the font selection
menu even if they are marked to Hide in the Windows Font settings (from the
Control Panel \(em Fonts folder).
.TP
\fBShow bold as font\fP (BoldAsFont=no)
When this option is enabled, the ANSI bold (or 'intense') text attribute is
shown as a bold-style font. Where a bold variant of the selected font that
has the same width as the base font is available, that is used; otherwise, the
bolding is simulated by rendering the text twice with a one-pixel offset.
.TP
\fBShow bold as colour\fP (BoldAsColour=yes)
By default, text with the ANSI bold attribute set is displayed with a
different colour, usually with increased brightness. This can be disabled
here.
Note that when \fBBoldAsFont\fP is enabled, only bold text in one of the eight
ANSI colours has its colour changed, i.e. bold text without an explicitly
specified colour is shown with a bold font only. This matches \fBxterm\fP behaviour.
This option also controls how the 'half-bright' (or 'dim') text
attribute is displayed: if it is on, half-bright text is
shown with halved foreground colour brightness; otherwise, it is shown
by blending the foreground colour with the background colour.
.TP
\fBAllow blinking\fP (AllowBlinking=no)
When text blinking is disabled, as it is by default, the blink attribute is
displayed as a bold background colour instead.
.TP
\fBFont smoothing\fP (FontSmoothing=default)
Select the amount of font smoothing from the following choices:
.br
\(en \fBDefault\fP: Use Windows setting.
.br
\(en \fBNone\fP: With all the jaggies.
.br
\(en \fBPartial\fP: Greyscale anti-aliasing.
.br
\(en \fBFull\fP: Subpixel anti-aliasing ("ClearType").
.TP
\fBLocale\fP (Locale=)
The locale setting consists of a lowercase two-letter or three-letter language
code followed by a two-letter country code, for instance \fBen_US\fP or
\fBzh_CN\fP. The Windows default system and user locales are shown in the
drop-down list for this setting. Alternatively, the language-neutral "C"
locale can be selected.
If no locale is set here, which is the default, mintty uses the locale and
character set specified via the environment variables \fILC_ALL\fP,
\fILC_CTYPE\fP or \fILANG\fP.
If the locale option is set, however, it will override any environment
variable setting: \fILC_ALL\fP and the \fILC_*\fP variables for specific
locale categories are cleared, while \fILANG\fP is set according to the
selected locale and character set.
\fINote:\fP This means, while not strictly necessary, that also locale variables
unrelated to the terminal character set (e.g. LC_MESSAGES) are cleared
to avoid confusion.
.TP
\fBCharacter set\fP (Charset=)
The character set to be used for encoding input and decoding output.
If no locale is set, this setting is ignored.
While changing the character set takes effect immediately for text input and
ouput, it does not affect the processes already running in mintty.
This is because the environment variables of a running process cannot be
changed from outside that process.
Therefore mintty should be restarted for a character set change to take full
effect.
.SS Keys
Settings controlling keyboard behaviour.
.TP
\fBBackspace sends ^H\fP (BackspaceSendsBS=no)
By default, mintty sends \fB^?\fP (ASCII DEL) as the keycode for the backspace key.
If this option is enabled, \fB^H\fP is sent instead.
This also changes the \fBCtrl+Backspace\fP code from \fB^_\fP to \fB^?\fP.
(Corresponds to the xterm BackarrowKey resource.)
.TP
\fB\fP(DeleteSendsDEL=no)
By default, mintty sends VT100 Remove as the keycode for the keypad Del key.
If this option is enabled, \fB^?\fP (ASCII DEL) is sent instead.
(Corresponds to the xterm DeleteIsDEL resource.)
.TP
\fBCtrl+LeftAlt is AltGr\fP (CtrlAltIsAltGr=no)
The AltGr key on non-US Windows systems is a strange beast: pressing it is
synonymous with pressing the left Ctrl key and the right Alt key at the
same time, and Windows programs usually treat any Ctrl+Alt combination as
AltGr.
Some programs, however, chief among them Microsoft's very own Office, do not
treat Ctrl+LeftAlt as AltGr, so that Ctrl+LeftAlt combinations can be used in
command shortcuts even when a key has an AltGr character binding.
By default, mintty follows Office's approach, because a number of terminal
programs make use of Ctrl+Alt shortcuts.
The "standard" Windows behaviour can be restored by ticking the checkbox here.
The setting makes no difference for keys without AltGr key bindings
(e.g. any key on the standard US layout).
.TP
\fBCopy and Paste shortcuts\fP (ClipShortcuts=yes)
Checkbox for enabling the clipboard shortcuts \fBCtrl+Ins\fP for copying and
\fBShift+Ins\fP for pasting.
.TP
\fBMenu and Full Screen shortcuts\fP (WindowShortcuts=yes)
Checkbox for enabling the \fBAlt+Space\fP and \fBAlt+Enter\fP shortcuts for
showing the window menu and toggling full screen mode.
.TP
\fBSwitch window shortcuts\fP (SwitchShortcuts=yes)
Checkbox for enabling the \fBCtrl+Tab\fP and \fBCtrl+Shift+Tab\fP shortcuts
for switching between mintty windows.
.TP
\fBZoom shortcuts\fP (ZoomShortcuts=yes)
Checkbox for enabling the font zooming shortcuts \fBCtrl+plus/minus/zero\fP.
.TP
\fBAlt+Fn shortcuts\fP (AltFnShortcuts=yes)
Checkbox for enabling the use of combinations of Alt and functions keys as
shortcuts, for example \fBAlt+F4\fP for closing the window or \fBAlt+F11\fP
fortoggling full screen mode. Disable to have \fBAlt+Fn\fP combinations
sent to applications instead.
.TP
\fBCtrl+Shift+letter shortcuts\fP (CtrlShiftShortcuts=no)
Checkbox for enabling alternative clipboard and window command shortcuts
using \fBCtrl+Shift+letter\fP combinations such as \fBCtrl+Shift+V\fP for
paste or \fBCtrl+Shift+N\fP for starting a new session.
These can replace the \fBCtrl/Shift+Ins\fP and \fBAlt+Fn\fP shortcuts, whereby
they show up in menus only if the corresponding default shortcuts are disabled.
See the shortcuts section above for the list of shortcuts controlled by this
option. When it is disabled, Ctrl+Shift+letter combinations are sent to
applications as C1 control characters instead.
.SS Mouse
Settings controlling mouse support.
.TP
\fBCopy on select\fP (CopyOnSelect=yes)
If enabled, the region selected with the mouse is copied to the clipboard as
soon as the mouse button is released, thus emulating X Window behaviour.
.TP
\fBCopy as rich text\fP (CopyAsRTF=yes)
If this option is enabled, which it is by default, text is copied to the
clipboard in rich text format (RTF) in addition to plain text format.
RTF preserves colours and styles when pasting text into applications that
support it, e.g. word processors.
.TP
\fBClicks place command line cursor\fP (ClicksPlaceCursor=no)
If enabled, the command line cursor can be placed by pressing the left
mouse button.
This works by sending the number of cursor keycodes needed to get to the
destination.
.TP
\fB\fP(MiddleClickAction=paste)
Action to take when the middle mouse button is pressed.
.br
\(en \fBPaste\fP: Paste the clipboard contents.
.br
\(en \fBExtend\fP: Extend the selected region.
.br
\(en \fBEnter\fP: Simulate \fBEnter\fP/\fBReturn\fP key.
.br
\(en \fBVoid\fP: Do nothing.
.TP
\fBRight click action\fP (RightClickAction=menu)
Action to take when the right mouse button is pressed.
.br
\(en \fBPaste\fP: Paste the clipboard contents.
.br
\(en \fBExtend\fP: Extend the selected region.
.br
\(en \fBEnter\fP: Simulate \fBEnter\fP/\fBReturn\fP key.
.br
\(en \fBMenu\fP: Show the context menu.
If this is set to \fBPaste\fP, the middle button extends the selected region
instead of pasting the clipboard. If it is set to \fBExtend\fP, a left click
with \fBShift\fP pressed pastes the clipboard instead of extending the
selection.
.TP
\fBDefault click target\fP (ClicksTargetApp=yes)
This applies to application mouse mode, i.e. when the application activates
xterm-style mouse reporting.
In that mode, mouse clicks can be sent either to the application to process
as it sees fit, or to the window for the usual actions such as select and paste.
.br
\(en \fBWindow\fP
.br
\(en \fBApplication\fP
.TP
\fBModifier key for overriding default\fP (ClickTargetMod=shift)
The modifier key selected here can be used to override the click target in
application mouse mode.
With the default settings, clicks are sent to the application and Shift needs
to be held to trigger window actions instead.
The \fBOff\fP setting disables overriding.
.br
\(en \fBShift\fP
.br
\(en \fBCtrl\fP
.br
\(en \fBAlt\fP
.br
\(en \fBOff\fP
.TP
\fB\fP(HideMouse=on)
By default, mintty automatically hides the cross-hair mouse cursor when
keyboard input is being entered. Setting this option =false keeps the cursor.
.SS Window
Window properties.
.TP
\fBColumns\fP (Columns=80)
Default width of the window, in character cells.
.TP
\fBRows\fP (Rows=24)
Default height of the window, in character cells.
.TP
\fB\fP(RowSpacing=0)
Additional row padding.
\fINote:\fP Mintty adjusts row spacing according to the font metrics, to
compensate for tight or tall spacing of some fonts (e.g. Consolas, FreeMono, Monaco).
The RowSpacing value is added to that.
.TP
\fB\fP(ColSpacing=0)
Additional column padding; ColSpacing=1 can avoid boldened glyphs being clipped.
.TP
\fB\fP(Padding=1)
Window padding; margin between text and window border. The effective value
is limited by the character cell width (scaling with font zooming).
A negative value indicates that always the character cell width shall be used,
without fixed limit.
.TP
\fBCurrent size\fP
Pressing this button sets the default width and height to the window's
current size.
.TP
\fBScrollback lines\fP (ScrollbackLines=10000)
The maximum number of lines to keep in the scrollback buffer.
.TP
\fBScrollbar\fP (Scrollbar=right)
The scrollbar can be shown on either side of the window or just hidden.
By default, it is shown on the right-hand side.
.br
\(en \fBLeft\fP
.br
\(en \fBNone\fP
.br
\(en \fBRight\fP
.TP
\fBModifier for scrolling\fP (ScrollMod=shift)
The modifier key that needs to be pressed together with the arrow up/down,
PgUp/PgDn, or Home/End keys to access the scrollback buffer.
The default is \fBShift\fP.
The \fBOff\fP setting disables scrolling with keyboard shortcuts.
.br
\(en \fBShift\fP
.br
\(en \fBCtrl\fP
.br
\(en \fBAlt\fP
.br
\(en \fBOff\fP