aboutsummaryrefslogblamecommitdiffstats
path: root/.gotty
blob: e69fe1335e049eb1d45ca85948c32b027adcc72b (plain) (tree)













































































































































































































































































































                                                                                                                                  
// [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 = ""

}