aboutsummaryrefslogtreecommitdiffstats
path: root/.gotty
blob: e69fe1335e049eb1d45ca85948c32b027adcc72b (plain) (blame)
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
// [string] Address to listen, all addresses will be used when empty
address = "localhost"

// [string] Port to listen
port = "9000"

// [bool] Permit clients to write to the TTY
permit_write = true

// [bool] Enable basic authentication
// enable_basic_auth = false

// [string] Default username and password of basic authentication (user:pass)
//          To enable basic authentication, set `true` to `enable_basic_auth`
// credential = "user:pass"

// [bool] Enable random URL generation
// enable_random_url = false

// [int] Default length of random strings appended to URL
//       To enable random URL generation, set `true` to `enable_random_url`
// random_url_length = 8

// [bool] Enable TLS/SSL
// enable_tls = false

// [string] Default TLS certificate file path
// tls_crt_file = "~/.gotty.crt"

// [string] Default TLS key file path
// tls_key_file = "~/.gotty.key"

// [bool] Enable client certificate authentication
// enable_tls_client_auth = false

// [string] Certificate file of CA for client certificates
// tls_ca_crt_file = "~/.gotty.ca.crt"

// [string] Custom index.html file
// index_file = ""

// [string] Title format of browser window
//          Available variables are:
//            Command    Command string
//            Pid        PID of the process for the client
//            Hostname   Server hostname
//            RemoteAddr Client IP address
// title_format = "GoTTY - {{ .Command }} ({{ .Hostname }})"

// [bool] Enable client side reconnection when connection closed
// enable_reconnect = false

// [int] Interval time to try reconnection (seconds)
//       To enable reconnection, set `true` to `enable_reconnect`
// reconnect_time = 10

// [int] Timeout seconds for waiting a client (0 to disable)
// timeout = 60

// [int] Maximum connection to gotty, 0(default) means no limit.
// max_connection = 0

// [bool] Accept only one client and exit gotty once the client exits
// once = false

// [bool] Permit clients to send command line arguments in URL (e.g. http://example.com:8080/?arg=AAA&arg=BBB)
// permit_arguments = false

// [object] Client terminal (hterm) preferences
preferences {

  // [enum(null, "none", "ctrl-alt", "left-alt", "right-alt")]
  //     Select an AltGr detection hack^Wheuristic.
  //       null: Autodetect based on navigator.language: "en-us" => "none", else => "right-alt"
  //       "none": Disable any AltGr related munging.
  //       "ctrl-alt": Assume Ctrl+Alt means AltGr.
  //       "left-alt": Assume left Alt means AltGr.
  //       "right-alt": Assume right Alt means AltGr.
  // alt_gr_mode = null

  // [bool] If set, alt-backspace indeed is alt-backspace.
  // alt_backspace_is_meta_backspace = false

  // [bool] Set whether the alt key acts as a meta key or as a distinct alt key.
  // alt_is_meta = false

  // [enum("escape", "8-bit", "browser-key")]
  //     Controls how the alt key is handled.
  //       "escape"....... Send an ESC prefix.
  //       "8-bit"........ Add 128 to the unshifted character as in xterm.
  //       "browser-key".. Wait for the keypress event and see what the browser says.
  //                       (This won't work well on platforms where the browser performs a default action for some alt sequences.)
  // alt_sends_what = "escape"

  // [string] URL of the terminal bell sound.  Empty string for no audible bell.
  // audible_bell_sound = "lib-resource:hterm/audio/bell"

  // [bool] If true, terminal bells in the background will create a Web Notification. http://www.w3.org/TR/notifications/
  //        Displaying notifications requires permission from the user.
  //        When this option is set to true, hterm will attempt to ask the user for permission if necessary.
  //        Note browsers may not show this permission request
  //        if it did not originate from a user action.
  // desktop_notification_bell = false

  // [string] The background color for text with no other color attributes.
  background_color = "rgb(0, 0, 0)"

  // [string] CSS value of the background image.  Empty string for no image.
  //          For example:
  //            "url(https://goo.gl/anedTK) linear-gradient(top bottom, blue, red)"
  // background_image = ""

  // [string] CSS value of the background image size.  Defaults to none.
  // background_size = ""

  // [string] CSS value of the background image position.
  //          For example:
  //           "10% 10% center"
  // background_position = ""

  // [bool] If true, the backspace should send BS ('\x08', aka ^H).  Otherwise the backspace key should send '\x7f'.
  // backspace_sends_backspace = false

  // [map[string]map[string]string]
  //     A nested map where each property is the character set code and the value is a map that is a sparse array itself.
  //     In that sparse array, each property is the received character and the value is the displayed character.
  //     For example:
  //       {"0" = {"+" = "\u2192"
  //               "," = "\u2190"
  //               "-" = "\u2191"
  //               "." = "\u2193"
  //               "0" = "\u2588"}}
  // character_map_overrides = null

  // [bool] Whether or not to close the window when the command exits.
  // close_on_exit = true

  // [bool] Whether or not to blink the cursor by default.
  // cursor_blink = false

  // [2[int]] The cursor blink rate in milliseconds.
  //          A two element array, the first of which is how long the cursor should be on, second is how long it should be off.
  // cursor_blink_cycle = [1000, 500]

  // [string] The color of the visible cursor.
  // cursor_color = "rgba(255, 0, 0, 0.5)"

  // [[]string]
  //     Override colors in the default palette.
  //     This can be specified as an array or an object.
  //     Values can be specified as almost any css color value.
  //     This includes #RGB, #RRGGBB, rgb(...), rgba(...), and any color names that are also part of the stock X11 rgb.txt file.
  //     You can use 'null' to specify that the default value should be not be changed.
  //     This is useful for skipping a small number of indicies when the value is specified as an array.
  // color_palette_overrides = null

  // [bool] Automatically copy mouse selection to the clipboard.
  // copy_on_select = true

  // [bool] Whether to use the default window copy behaviour
  // use_default_window_copy = false

  // [bool] Whether to clear the selection after copying.
  // clear_selection_after_copy = true

  // [bool] If true, Ctrl-Plus/Minus/Zero controls zoom.
  //        If false, Ctrl-Shift-Plus/Minus/Zero controls zoom, Ctrl-Minus sends ^_, Ctrl-Plus/Zero do nothing.
  // ctrl_plus_minus_zero_zoom = true

  // [bool] Ctrl+C copies if true, send ^C to host if false.
  //        Ctrl+Shift+C sends ^C to host if true, copies if false.
  // ctrl_c_copy = false

  // [bool] Ctrl+V pastes if true, send ^V to host if false.
  //        Ctrl+Shift+V sends ^V to host if true, pastes if false.
  // ctrl_v_paste = false

  // [bool] Set whether East Asian Ambiguous characters have two column width.
  // east_asian_ambiguous_as_two_column = false

  // [bool] True to enable 8-bit control characters, false to ignore them.
  //        We'll respect the two-byte versions of these control characters regardless of this setting.
  // enable_8_bit_control = false

  // [enum(null, true, false)]
  //     True if we should use bold weight font for text with the bold/bright attribute.
  //     False to use the normal weight font.
  //     Null to autodetect.
  enable_bold = false

  // [bool] True if we should use bright colors (8-15 on a 16 color palette) for any text with the bold attribute.
  //        False otherwise.
  enable_bold_as_bright = false

  // [bool] Show a message in the terminal when the host writes to the clipboard.
  // enable_clipboard_notice = true

  // [bool] Allow the host to write directly to the system clipboard.
  enable_clipboard_write = true

  // [bool] Respect the host's attempt to change the cursor blink status using DEC Private Mode 12.
  // enable_dec12 = false

  // [map[string]string] The default environment variables, as an object.
  environment = {"TERM" = "xterm-256color"}

  // [string] Default font family for the terminal text.
  font_family = "'DejaVuSansMono NF', 'Everson Mono', FreeMono, 'Menlo', 'Terminal', monospace"

  // [int] The default font size in pixels.
  // font_size = 15

  // [string] CSS font-smoothing property.
  // font_smoothing = "antialiased"

  // [string] The foreground color for text with no other color attributes.
  // foreground_color = "rgb(240, 240, 240)"

  // [bool] If true, home/end will control the terminal scrollbar and shift home/end will send the VT keycodes.
  //        If false then home/end sends VT codes and shift home/end scrolls.
  // home_keys_scroll = false

  // [map[string]string]
  //     A map of key sequence to key actions.
  //     Key sequences include zero or more modifier keys followed by a key code.
  //     Key codes can be decimal or hexadecimal numbers, or a key identifier.
  //     Key actions can be specified a string to send to the host, or an action identifier.
  //     For a full list of key code and action identifiers, see https://goo.gl/8AoD09.
  //     Sample keybindings:
  //       {"Ctrl-Alt-K" = "clearScrollback"
  //        "Ctrl-Shift-L"= "PASS"
  //        "Ctrl-H" = "'HELLO\n'"}
  // keybindings = null

  // [int] Max length of a DCS, OSC, PM, or APS sequence before we give up and ignore the code.
  // max_string_sequence = 100000

  // [bool] If true, convert media keys to their Fkey equivalent.
  //        If false, let the browser handle the keys.
  // media_keys_are_fkeys = false

  // [bool] Set whether the meta key sends a leading escape or not.
  // meta_sends_escape = true

  // [enum(null, 0, 1, 2, 3, 4, 5, 6]
  //     Mouse paste button, or null to autodetect.
  //     For autodetect, we'll try to enable middle button paste for non-X11 platforms.
  //     On X11 we move it to button 3.
  // mouse_paste_button = null

  // [bool] If true, page up/down will control the terminal scrollbar and shift page up/down will send the VT keycodes.
  //        If false then page up/down sends VT codes and shift page up/down scrolls.
  // page_keys_scroll = false

  // [enum(null, true, false)]
  //     Set whether we should pass Alt-1..9 to the browser.
  //     This is handy when running hterm in a browser tab, so that you don't lose Chrome's "switch to tab" keyboard accelerators.
  //     When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.
  //     If true, Alt-1..9 will be handled by the browser.
  //     If false, Alt-1..9 will be sent to the host.
  //     If null, autodetect based on browser platform and window type.
  // pass_alt_number = null

  // [enum(null, true, false)]
  //     Set whether we should pass Ctrl-1..9 to the browser.
  //     This is handy when running hterm in a browser tab, so that you don't lose Chrome's "switch to tab" keyboard accelerators.
  //     When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.
  //     If true, Ctrl-1..9 will be handled by the browser.
  //     If false, Ctrl-1..9 will be sent to the host.
  //     If null, autodetect based on browser platform and window type.
  // pass_ctrl_number = null

  // [enum(null, true, false)]
  //     Set whether we should pass Meta-1..9 to the browser.
  //     This is handy when running hterm in a browser tab, so that you don't lose Chrome's "switch to tab" keyboard accelerators.
  //     When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.
  //     If true, Meta-1..9 will be handled by the browser.
  //     If false, Meta-1..9 will be sent to the host.  If null, autodetect based on browser platform and window type.
  // pass_meta_number = null

  // [bool] Set whether meta-V gets passed to host.
  // pass_meta_v = true

  // [bool] If true, scroll to the bottom on any keystroke.
  // scroll_on_keystroke = true

  // [bool] If true, scroll to the bottom on terminal output.
  // scroll_on_output = false

  // [bool] The vertical scrollbar mode.
  scrollbar_visible = true

  // [int] The multiplier for the pixel delta in mousewheel event caused by the scroll wheel. Alters how fast the page scrolls.
  // scroll_wheel_move_multiplier = 1

  // [bool] Shift + Insert pastes if true, sent to host if false.
  shift_insert_paste = true

  // [string] URL of user stylesheet to include in the terminal document.
  // user_css = ""

}