└── addons └── godot_xterm ├── plugin.gd.uid ├── util ├── tput.gd.uid └── tput.gd ├── godot-xterm.gdextension.uid ├── resources ├── asciicast.gd.uid ├── xrdb_theme.gd.uid ├── xrdb_theme.gd └── asciicast.gd ├── shaders ├── common.gdshaderinc.uid ├── background.gdshader.uid ├── foreground.gdshader.uid ├── background.gdshader ├── foreground.gdshader └── common.gdshaderinc ├── import_plugins ├── xrdb_import_plugin.gd.uid ├── asciicast_import_plugin.gd.uid ├── asciicast_import_plugin.gd └── xrdb_import_plugin.gd ├── editor_plugins └── terminal │ ├── terminal_panel.gd.uid │ ├── editor_terminal.gd.uid │ ├── settings │ ├── terminal_settings.gd.uid │ ├── default_tab_left_shortcut.tres │ ├── default_tab_right_shortcut.tres │ ├── default_copy_shortcut.tres │ ├── default_paste_shortcut.tres │ ├── default_kill_terminal_shortcut.tres │ ├── default_new_terminal_shortcut.tres │ └── terminal_settings.gd │ ├── editor_terminal.tscn │ ├── editor_terminal.gd │ ├── terminal_panel.tscn │ └── terminal_panel.gd ├── plugin.cfg ├── themes └── fonts │ ├── jet_brains_mono │ ├── jet_brains_mono_nl-regular-2.304.ttf │ ├── AUTHORS.txt │ ├── jet_brains_mono_nl-regular-2.304.ttf.import │ └── OFL.txt │ └── regular.tres ├── lib └── .gitignore ├── icons ├── pty_icon.svg.import ├── terminal_icon.svg.import ├── terminal_icon.svg └── pty_icon.svg ├── LICENSE.md ├── plugin.gd ├── godot-xterm.gdextension ├── .gitignore ├── THIRDPARTY_NOTICES_nopty.txt └── THIRDPARTY_NOTICES.txt /addons/godot_xterm/plugin.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ds0khigrtnemq 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/util/tput.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dud4ii1gy5sa 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/godot-xterm.gdextension.uid: -------------------------------------------------------------------------------- 1 | uid://xlyw0p2epn3l 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/resources/asciicast.gd.uid: -------------------------------------------------------------------------------- 1 | uid://daqhwrk6s4r7s 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/resources/xrdb_theme.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b5w7m5xhi0vba 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/shaders/common.gdshaderinc.uid: -------------------------------------------------------------------------------- 1 | uid://ceh0d3iwam1vt 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/shaders/background.gdshader.uid: -------------------------------------------------------------------------------- 1 | uid://d3dy6nhv17r6y 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/shaders/foreground.gdshader.uid: -------------------------------------------------------------------------------- 1 | uid://dvtgnfmmhwteh 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/import_plugins/xrdb_import_plugin.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dgssqoaaxy4xh 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cufcnr6pxqofk 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/import_plugins/asciicast_import_plugin.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ghf570kuknhi 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/editor_terminal.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cgjg4p52appdp 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/settings/terminal_settings.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b6t33wgbi4wx5 2 | -------------------------------------------------------------------------------- /addons/godot_xterm/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="GodotXterm" 4 | description="" 5 | author="Leroy Hopson" 6 | version="4.0.2" 7 | script="plugin.gd" 8 | -------------------------------------------------------------------------------- /addons/godot_xterm/themes/fonts/jet_brains_mono/jet_brains_mono_nl-regular-2.304.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lihop/godot-xterm/HEAD/addons/godot_xterm/themes/fonts/jet_brains_mono/jet_brains_mono_nl-regular-2.304.ttf -------------------------------------------------------------------------------- /addons/godot_xterm/lib/.gitignore: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: none 2 | # SPDX-License-Identifier: CC0-1.0 3 | *.so* 4 | *.wasm 5 | *.dylib 6 | *.exp 7 | *.framework 8 | *.xcframework 9 | *.dll 10 | spawn-helper 11 | 12 | -------------------------------------------------------------------------------- /addons/godot_xterm/resources/xrdb_theme.gd: -------------------------------------------------------------------------------- 1 | extends Theme 2 | 3 | 4 | func get_class() -> String: 5 | return "XrdbTheme" 6 | 7 | 8 | func is_class(name) -> bool: 9 | return name == get_class() or super.is_class(name) 10 | -------------------------------------------------------------------------------- /addons/godot_xterm/shaders/background.gdshader: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2024 Leroy Hopson 2 | // SPDX-License-Identifier: MIT 3 | shader_type canvas_item; 4 | #define BACKGROUND 5 | #include "./common.gdshaderinc" -------------------------------------------------------------------------------- /addons/godot_xterm/shaders/foreground.gdshader: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2024 Leroy Hopson 2 | // SPDX-License-Identifier: MIT 3 | shader_type canvas_item; 4 | #define FOREGROUND 5 | #include "./common.gdshaderinc" -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/settings/default_tab_left_shortcut.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Shortcut" load_steps=2 format=3 uid="uid://dpb1qwlv6mkfs"] 2 | 3 | [sub_resource type="InputEventKey" id="InputEventKey_v5b4d"] 4 | ctrl_pressed = true 5 | keycode = 4194324 6 | 7 | [resource] 8 | events = [SubResource("InputEventKey_v5b4d")] 9 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/settings/default_tab_right_shortcut.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Shortcut" load_steps=2 format=3 uid="uid://djs5hhu8vbmqf"] 2 | 3 | [sub_resource type="InputEventKey" id="InputEventKey_svjos"] 4 | ctrl_pressed = true 5 | keycode = 4194323 6 | 7 | [resource] 8 | events = [SubResource("InputEventKey_svjos")] 9 | -------------------------------------------------------------------------------- /addons/godot_xterm/themes/fonts/regular.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="FontVariation" load_steps=2 format=3 uid="uid://vmgmcu8gc6nt"] 2 | 3 | [ext_resource type="FontFile" uid="uid://c51gnbjamppg" path="res://addons/godot_xterm/themes/fonts/jet_brains_mono/jet_brains_mono_nl-regular-2.304.ttf" id="1_8kori"] 4 | 5 | [resource] 6 | base_font = ExtResource("1_8kori") 7 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/settings/default_copy_shortcut.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Shortcut" load_steps=2 format=3 uid="uid://cdr3iu6ttahlt"] 2 | 3 | [sub_resource type="InputEventKey" id="InputEventKey_emaic"] 4 | shift_pressed = true 5 | ctrl_pressed = true 6 | keycode = 67 7 | 8 | [resource] 9 | events = [SubResource("InputEventKey_emaic")] 10 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/settings/default_paste_shortcut.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Shortcut" load_steps=2 format=3 uid="uid://cn2b3aeang6b"] 2 | 3 | [sub_resource type="InputEventKey" id="InputEventKey_sihkr"] 4 | shift_pressed = true 5 | ctrl_pressed = true 6 | keycode = 86 7 | 8 | [resource] 9 | events = [SubResource("InputEventKey_sihkr")] 10 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/settings/default_kill_terminal_shortcut.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Shortcut" load_steps=2 format=3 uid="uid://b5vans7f0vp2y"] 2 | 3 | [sub_resource type="InputEventKey" id="InputEventKey_7k47m"] 4 | shift_pressed = true 5 | ctrl_pressed = true 6 | keycode = 88 7 | 8 | [resource] 9 | events = [SubResource("InputEventKey_7k47m")] 10 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/settings/default_new_terminal_shortcut.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Shortcut" load_steps=2 format=3 uid="uid://d3iu5cplfailp"] 2 | 3 | [sub_resource type="InputEventKey" id="InputEventKey_0hq5g"] 4 | shift_pressed = true 5 | ctrl_pressed = true 6 | keycode = 84 7 | 8 | [resource] 9 | events = [SubResource("InputEventKey_0hq5g")] 10 | -------------------------------------------------------------------------------- /addons/godot_xterm/themes/fonts/jet_brains_mono/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | # This is the official list of project authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS.txt file. 3 | # See the latter for an explanation. 4 | # 5 | # Names should be added to this file as: 6 | # Name or Organization 7 | 8 | JetBrains <> 9 | Philipp Nurullin 10 | Konstantin Bulenkov 11 | -------------------------------------------------------------------------------- /addons/godot_xterm/resources/asciicast.gd: -------------------------------------------------------------------------------- 1 | extends Animation 2 | 3 | signal data_written(data) 4 | signal data_read(data) 5 | 6 | @export var version: int = 2 7 | # Initial terminal width (number of columns). 8 | @export var width: int 9 | # Initial terminal height (number of rows). 10 | @export var height: int 11 | 12 | 13 | func get_class() -> String: 14 | return "Asciicast" 15 | 16 | 17 | func is_class(name) -> bool: 18 | return name == get_class() or super.is_class(name) 19 | 20 | 21 | func _init(): 22 | step = 0.01 # Parent override. 23 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/editor_terminal.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bkcyv0w3setep"] 2 | 3 | [ext_resource type="Script" uid="uid://cgjg4p52appdp" path="res://addons/godot_xterm/editor_plugins/terminal/editor_terminal.gd" id="1"] 4 | 5 | [node name="Terminal" type="Terminal"] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | grow_horizontal = 2 10 | grow_vertical = 2 11 | size_flags_horizontal = 4 12 | size_flags_vertical = 4 13 | focus_mode = 1 14 | script = ExtResource("1") 15 | 16 | [node name="PTY" type="PTY" parent="."] 17 | cols = 114 18 | rows = 29 19 | terminal_path = NodePath("..") 20 | 21 | [node name="Bell" type="AudioStreamPlayer" parent="."] 22 | 23 | [connection signal="data_sent" from="." to="PTY" method="write"] 24 | [connection signal="size_changed" from="." to="PTY" method="resizev"] 25 | [connection signal="data_received" from="PTY" to="." method="write"] 26 | [connection signal="exited" from="PTY" to="." method="_on_PTY_exited"] 27 | -------------------------------------------------------------------------------- /addons/godot_xterm/themes/fonts/jet_brains_mono/jet_brains_mono_nl-regular-2.304.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://c51gnbjamppg" 6 | path="res://.godot/imported/jet_brains_mono_nl-regular-2.304.ttf-96fa438503371775be3cc744a4450fc2.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/godot_xterm/themes/fonts/jet_brains_mono/jet_brains_mono_nl-regular-2.304.ttf" 11 | dest_files=["res://.godot/imported/jet_brains_mono_nl-regular-2.304.ttf-96fa438503371775be3cc744a4450fc2.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | keep_rounding_remainders=true 27 | oversampling=0.0 28 | Fallbacks=null 29 | fallbacks=[] 30 | Compress=null 31 | compress=true 32 | preload=[] 33 | language_support={} 34 | script_support={} 35 | opentype_features={} 36 | -------------------------------------------------------------------------------- /addons/godot_xterm/icons/pty_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ixravk0w4lkt" 6 | path="res://.godot/imported/pty_icon.svg-7c3f500292e2f95935d23c435d6de47f.ctex" 7 | metadata={ 8 | "has_editor_variant": true, 9 | "vram_texture": false 10 | } 11 | 12 | [deps] 13 | 14 | source_file="res://addons/godot_xterm/icons/pty_icon.svg" 15 | dest_files=["res://.godot/imported/pty_icon.svg-7c3f500292e2f95935d23c435d6de47f.ctex"] 16 | 17 | [params] 18 | 19 | compress/mode=0 20 | compress/high_quality=false 21 | compress/lossy_quality=0.7 22 | compress/hdr_compression=1 23 | compress/normal_map=0 24 | compress/channel_pack=0 25 | mipmaps/generate=false 26 | mipmaps/limit=-1 27 | roughness/mode=0 28 | roughness/src_normal="" 29 | process/fix_alpha_border=true 30 | process/premult_alpha=false 31 | process/normal_map_invert_y=false 32 | process/hdr_as_srgb=false 33 | process/hdr_clamp_exposure=false 34 | process/size_limit=0 35 | detect_3d/compress_to=0 36 | svg/scale=1.0 37 | editor/scale_with_editor_scale=true 38 | editor/convert_colors_with_editor_theme=false 39 | -------------------------------------------------------------------------------- /addons/godot_xterm/icons/terminal_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://b1cq080dxs1ft" 6 | path="res://.godot/imported/terminal_icon.svg-2a4b198a0e3aa43f04b43cec3e3f109d.ctex" 7 | metadata={ 8 | "has_editor_variant": true, 9 | "vram_texture": false 10 | } 11 | 12 | [deps] 13 | 14 | source_file="res://addons/godot_xterm/icons/terminal_icon.svg" 15 | dest_files=["res://.godot/imported/terminal_icon.svg-2a4b198a0e3aa43f04b43cec3e3f109d.ctex"] 16 | 17 | [params] 18 | 19 | compress/mode=0 20 | compress/high_quality=false 21 | compress/lossy_quality=0.7 22 | compress/hdr_compression=1 23 | compress/normal_map=0 24 | compress/channel_pack=0 25 | mipmaps/generate=false 26 | mipmaps/limit=-1 27 | roughness/mode=0 28 | roughness/src_normal="" 29 | process/fix_alpha_border=true 30 | process/premult_alpha=false 31 | process/normal_map_invert_y=false 32 | process/hdr_as_srgb=false 33 | process/hdr_clamp_exposure=false 34 | process/size_limit=0 35 | detect_3d/compress_to=0 36 | svg/scale=1.0 37 | editor/scale_with_editor_scale=true 38 | editor/convert_colors_with_editor_theme=false 39 | -------------------------------------------------------------------------------- /addons/godot_xterm/LICENSE.md: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | Copyright (c) 2020-2025, Leroy Hopson and GodotXterm contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /addons/godot_xterm/icons/terminal_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | image/svg+xml 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /addons/godot_xterm/plugin.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends EditorPlugin 3 | 4 | var pty_supported := ( 5 | OS.get_name() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD", "macOS", "Windows"] 6 | ) 7 | var asciicast_import_plugin 8 | var xrdb_import_plugin 9 | var terminal_panel: Control 10 | 11 | 12 | func _enter_tree(): 13 | asciicast_import_plugin = preload("./import_plugins/asciicast_import_plugin.gd").new() 14 | add_import_plugin(asciicast_import_plugin) 15 | 16 | xrdb_import_plugin = preload("./import_plugins/xrdb_import_plugin.gd").new() 17 | add_import_plugin(xrdb_import_plugin) 18 | 19 | var asciicast_script = preload("./resources/asciicast.gd") 20 | add_custom_type("Asciicast", "Animation", asciicast_script, null) 21 | 22 | if pty_supported: 23 | terminal_panel = preload("./editor_plugins/terminal/terminal_panel.tscn").instantiate() 24 | terminal_panel.editor_plugin = self 25 | terminal_panel.editor_interface = get_editor_interface() 26 | add_control_to_bottom_panel(terminal_panel, "Terminal") 27 | 28 | 29 | func _exit_tree(): 30 | remove_import_plugin(asciicast_import_plugin) 31 | asciicast_import_plugin = null 32 | 33 | remove_import_plugin(xrdb_import_plugin) 34 | xrdb_import_plugin = null 35 | 36 | remove_custom_type("Asciicast") 37 | 38 | if pty_supported: 39 | remove_control_from_bottom_panel(terminal_panel) 40 | terminal_panel.free() 41 | -------------------------------------------------------------------------------- /addons/godot_xterm/icons/pty_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 14 | 16 | 17 | 19 | image/svg+xml 20 | 22 | 23 | 24 | 25 | 26 | 28 | 31 | 38 | 39 | 40 | 43 | 45 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/settings/terminal_settings.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | 3 | enum FileType { 4 | USE_SHELL_ENV, 5 | CUSTOM_FILE, 6 | } 7 | 8 | enum CWDType { 9 | USE_PROJECT_DIRECTORY, 10 | CUSTOM_CWD, 11 | } 12 | 13 | ### Shortcuts ### 14 | 15 | @export var new_terminal_shortcut: Shortcut = preload("./default_new_terminal_shortcut.tres") 16 | @export var kill_terminal_shortcut: Shortcut = preload("./default_kill_terminal_shortcut.tres") 17 | @export var copy_shortcut: Shortcut = preload("./default_copy_shortcut.tres") 18 | @export var paste_shortcut: Shortcut = preload("./default_paste_shortcut.tres") 19 | 20 | @export var next_tab_shortcut: Shortcut = preload("./default_tab_right_shortcut.tres") 21 | @export var previous_tab_shortcut: Shortcut = preload("./default_tab_left_shortcut.tres") 22 | 23 | ### Scroll settings ### 24 | 25 | # The maximum amount of lines the terminal keeps in its buffer. 26 | @export var scrollback_buffer_lines := 1000 27 | # If true, mouse wheel up and down can be used to scroll the terminal. 28 | @export var mouse_wheel_scroll := true 29 | # Whether or not to display scroll bar. 30 | @export var show_scroll_bar := true 31 | 32 | # Copy/paste settings. 33 | @export var copy_on_selection := false 34 | 35 | # Font settings. 36 | @export var font_size: int = 14 37 | @export var letter_spacing: int = 0 38 | @export var line_height: float = 1.2 39 | @export var ctrl_scroll_to_resize_font := true 40 | 41 | # Bell settings. 42 | @export var visual_bell := true 43 | @export var audio_bell := true 44 | @export var bell_sound: AudioStream 45 | 46 | # Exec args. 47 | @export var file_type := FileType.USE_SHELL_ENV 48 | @export var custom_file := "/bin/sh" 49 | 50 | @export var cwd_type := CWDType.USE_PROJECT_DIRECTORY 51 | @export var custom_cwd := "" 52 | 53 | @export var args := PackedStringArray() 54 | 55 | @export var use_os_env := true 56 | @export var extra_env := { 57 | TERM = "xterm-256color", 58 | COLORTERM = "truecolor", 59 | } 60 | 61 | 62 | func _init(p_copy_on_selection := false): 63 | copy_on_selection = p_copy_on_selection 64 | -------------------------------------------------------------------------------- /addons/godot_xterm/godot-xterm.gdextension: -------------------------------------------------------------------------------- 1 | [configuration] 2 | 3 | entry_symbol = "godot_xterm_library_init" 4 | compatibility_minimum = "4.3.0" 5 | 6 | [icons] 7 | 8 | Terminal = "res://addons/godot_xterm/icons/terminal_icon.svg" 9 | PTY = "res://addons/godot_xterm/icons/pty_icon.svg" 10 | 11 | [libraries] 12 | 13 | linux.debug.x86_64 = "res://addons/godot_xterm/lib/libgodot-xterm.linux.template_debug.x86_64.so" 14 | linux.release.x86_64 = "res://addons/godot_xterm/lib/libgodot-xterm.linux.template_release.x86_64.so" 15 | linux.debug.x86_32 = "res://addons/godot_xterm/lib/libgodot-xterm.linux.template_debug.x86_32.so" 16 | linux.release.x86_32 = "res://addons/godot_xterm/lib/libgodot-xterm.linux.template_release.x86_32.so" 17 | linux.debug.arm64 = "res://addons/godot_xterm/lib/libgodot-xterm.linux.template_debug.arm64.so" 18 | linux.release.arm64 = "res://addons/godot_xterm/lib/libgodot-xterm.linux.template_release.arm64.so" 19 | linux.debug.arm32 = "res://addons/godot_xterm/lib/libgodot-xterm.linux.template_debug.arm32.so" 20 | linux.release.arm32 = "res://addons/godot_xterm/lib/libgodot-xterm.linux.template_release.arm32.so" 21 | web.debug.wasm32 = "res://addons/godot_xterm/lib/libgodot-xterm.web.template_debug.wasm32.wasm" 22 | web.release.wasm32 = "res://addons/godot_xterm/lib/libgodot-xterm.web.template_release.wasm32.wasm" 23 | macos.debug = "res://addons/godot_xterm/lib/libgodot-xterm.macos.template_debug.framework" 24 | macos.release = "res://addons/godot_xterm/lib/libgodot-xterm.macos.template_release.framework" 25 | windows.debug.x86_64 = "res://addons/godot_xterm/lib/libgodot-xterm.windows.template_debug.x86_64.dll" 26 | windows.release.x86_64 = "res://addons/godot_xterm/lib/libgodot-xterm.windows.template_release.x86_64.dll" 27 | windows.debug.x86_32 = "res://addons/godot_xterm/lib/libgodot-xterm.windows.template_debug.x86_32.dll" 28 | windows.release.x86_32 = "res://addons/godot_xterm/lib/libgodot-xterm.windows.template_release.x86_32.dll" 29 | windows.debug.arm64 = "res://addons/godot_xterm/lib/libgodot-xterm.windows.template_debug.arm64.dll" 30 | windows.release.arm64 = "res://addons/godot_xterm/lib/libgodot-xterm.windows.template_release.arm64.dll" 31 | -------------------------------------------------------------------------------- /addons/godot_xterm/import_plugins/asciicast_import_plugin.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends EditorImportPlugin 3 | 4 | const Asciicast = preload("../resources/asciicast.gd") 5 | 6 | 7 | func _get_importer_name(): 8 | return "godot_xterm" 9 | 10 | 11 | func _get_visible_name(): 12 | return "asciicast" 13 | 14 | 15 | func _get_recognized_extensions(): 16 | return ["cast"] 17 | 18 | 19 | func _get_save_extension(): 20 | return "res" 21 | 22 | 23 | func _get_resource_type(): 24 | return "Animation" 25 | 26 | 27 | func _get_import_options(preset, _i): 28 | return [] 29 | 30 | 31 | func _get_priority(): 32 | return 1.0 33 | 34 | 35 | func _get_import_order(): 36 | return 0 37 | 38 | 39 | func _get_preset_count(): 40 | return 0 41 | 42 | 43 | func _import(source_file, save_path, options, r_platform_variant, r_gen_files): 44 | var file = FileAccess.open(source_file, FileAccess.READ) 45 | var err = FileAccess.get_open_error() 46 | if err != OK: 47 | return err 48 | 49 | var header = file.get_line() 50 | 51 | var asciicast = Asciicast.new() 52 | 53 | asciicast.add_track(Animation.TYPE_METHOD, 0) 54 | asciicast.track_set_path(0, ".") 55 | 56 | var frame = {"time": 0.0, "data": {"method": "write", "args": [PackedByteArray()]}} 57 | 58 | while not file.eof_reached(): 59 | var line = file.get_line() 60 | if line == "": 61 | continue 62 | 63 | var test_json_conv = JSON.new() 64 | test_json_conv.parse(line) 65 | var p = test_json_conv.get_data() 66 | if typeof(p) != TYPE_ARRAY: 67 | continue 68 | 69 | var event_type: String = p[1] 70 | var event_data: PackedByteArray = p[2].to_utf8_buffer() 71 | 72 | # Asciicast recordings have a resolution of 0.000001, however animation 73 | # track keys only have a resolution of 0.01, therefore we must combine 74 | # events that would occur in the same keyframe, otherwise only the last 75 | # event is inserted and the previous events are overwritten. 76 | var time = snapped(p[0], 0.01) 77 | 78 | if event_type == "o": 79 | if time == frame.time: 80 | asciicast.track_remove_key_at_time(0, time) 81 | frame.data.args[0] = frame.data.args[0] + event_data 82 | else: 83 | frame.time = time 84 | frame.data.args = [event_data] 85 | 86 | asciicast.track_insert_key(0, frame.time, frame.data) 87 | 88 | asciicast.length = frame.time 89 | 90 | return ResourceSaver.save(asciicast, "%s.%s" % [save_path, _get_save_extension()]) 91 | -------------------------------------------------------------------------------- /addons/godot_xterm/shaders/common.gdshaderinc: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2024 Leroy Hopson 2 | // SPDX-License-Identifier: MIT 3 | 4 | #define FLAG_INVERSE 1 << 0 5 | #define FLAG_BLINK 1 << 1 6 | #define FLAG_CURSOR 1 << 2 7 | 8 | #define transparent vec4(0) 9 | 10 | uniform int cols; 11 | uniform int rows; 12 | uniform vec2 size; 13 | uniform vec2 cell_size; 14 | uniform vec2 grid_size; 15 | 16 | uniform sampler2D attributes; 17 | uniform bool inverse_enabled = true; 18 | uniform bool has_focus = false; 19 | 20 | #ifdef BACKGROUND 21 | uniform vec4 background_color; 22 | uniform sampler2D background_colors; 23 | uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest; 24 | #endif 25 | 26 | #ifdef FOREGROUND 27 | uniform float blink_off_time = 0.3; 28 | uniform float blink_on_time = 0.6; 29 | #endif 30 | 31 | bool has_attribute(vec2 uv, int flag) { 32 | int flags = int(texture(attributes, uv).r * 255.0 + 0.5); 33 | return (flags & flag) != 0; 34 | } 35 | 36 | void fragment() { 37 | // Check if we are inside the grid. 38 | if (UV.x * size.x < grid_size.x && UV.y * size.y < grid_size.y) { 39 | vec2 grid_uv = UV * size / cell_size; 40 | 41 | int cell_x = int(grid_uv.x); 42 | int cell_y = int(grid_uv.y); 43 | 44 | vec2 sample_uv = (vec2(float(cell_x), float(cell_y)) + 0.5) / vec2(float(cols), float(rows)); 45 | 46 | vec4 color; 47 | #ifdef BACKGROUND 48 | color = texture(background_colors, sample_uv); 49 | #elif defined(FOREGROUND) 50 | color = texture(TEXTURE, UV); 51 | #endif 52 | 53 | bool unfocused_cursor = !has_focus && has_attribute(sample_uv, FLAG_CURSOR); 54 | 55 | #ifdef BACKGROUND 56 | if (has_attribute(sample_uv, FLAG_INVERSE) && inverse_enabled) { 57 | vec4 bg_color = textureLod(screen_texture, SCREEN_UV, 0.0); 58 | vec4 target_color; 59 | target_color.a = color.a + (1.0 - color.a) * bg_color.a; 60 | target_color.rgb = 1.0 / target_color.a * (color.a * color.rgb + (1.0 - color.a) * bg_color.a * bg_color.rgb); 61 | color = vec4(1.0 - target_color.rgb, target_color.a); 62 | } 63 | #else 64 | if (has_attribute(sample_uv, FLAG_INVERSE) && inverse_enabled && !unfocused_cursor) { 65 | color.rgb = vec3(1.0 - color.rgb); 66 | } 67 | #endif 68 | 69 | #ifdef FOREGROUND 70 | if (has_attribute(sample_uv, FLAG_BLINK)) { 71 | float blink_cycle = blink_on_time + blink_off_time; 72 | float current_time = mod(TIME + blink_cycle, blink_cycle); // The offset ensures blink always starts at the beginning of the ON cycle. 73 | if (current_time > blink_on_time) { 74 | color = transparent; 75 | } 76 | } 77 | #endif 78 | 79 | #ifdef BACKGROUND 80 | if (unfocused_cursor) { 81 | // Draw hollow cursor when not focused. 82 | bool isBorderX = (UV.x * size.x - float(cell_x) * cell_size.x) < 1.0 || (float(cell_x + 1) * cell_size.x - UV.x * size.x) < 1.0; 83 | bool isBorderY = (UV.y * size.y - float(cell_y) * cell_size.y) < 1.0 || (float(cell_y + 1) * cell_size.y - UV.y * size.y) < 1.0; 84 | if (!isBorderX && !isBorderY) { 85 | color = transparent; 86 | } 87 | } 88 | #endif 89 | 90 | COLOR = color; 91 | } else { // Outside the grid. 92 | COLOR = transparent; 93 | } 94 | } -------------------------------------------------------------------------------- /addons/godot_xterm/util/tput.gd: -------------------------------------------------------------------------------- 1 | extends RefCounted 2 | 3 | # Control Sequence Introducer 4 | const CSI = "\u001b[" 5 | 6 | const CURSOR_UP = "\u001b[A" 7 | const CURSOR_DOWN = "\u001b[B" 8 | const CURSOR_RIGHT = "\u001b[C" 9 | const CURSOR_LEFT = "\u001b[D" 10 | 11 | const DEFAULT_FOREGROUND_COLOR = "\u001b[0m" 12 | 13 | 14 | class ANSIColor: 15 | extends Object 16 | # Using ANSIColor constants, rather than Color will respect the 17 | # colors of the selected terminal theme. Whereas Color will set 18 | # the exact color specified regardless of theme. 19 | 20 | const black = {fg = 30, panel = 40} 21 | const red = {fg = 31, panel = 41} 22 | const green = {fg = 32, panel = 42} 23 | const yellow = {fg = 33, panel = 43} 24 | const blue = {fg = 34, panel = 44} 25 | const magenta = {fg = 35, panel = 45} 26 | const cyan = {fg = 36, panel = 46} 27 | const white = {fg = 37, panel = 47} 28 | const bright_black = {fg = 90, panel = 100} 29 | const gray = bright_black 30 | const grey = bright_black 31 | const bright_red = {fg = 91, panel = 101} 32 | const bright_green = {fg = 92, panel = 102} 33 | const bright_yellow = {fg = 93, panel = 103} 34 | const bright_blue = {fg = 94, panel = 104} 35 | const bright_magenta = {fg = 95, panel = 105} 36 | const bright_cyan = {fg = 96, panel = 106} 37 | const bright_white = {fg = 97, panel = 107} 38 | 39 | func _init(): 40 | # "ANSIColor is an abstract class. You should only use the color constants (e.g. ANSIColor.black)." 41 | assert(false) 42 | 43 | 44 | var terminal 45 | 46 | 47 | func _init(p_terminal: Control): 48 | if p_terminal: 49 | terminal = p_terminal 50 | 51 | 52 | func write_string(string: String, color: Color = Color.WHITE) -> void: 53 | if color: 54 | var fg = "\u001b[38;2;%d;%d;%dm" % [color.r8, color.g8, color.b8] 55 | terminal.write(fg.to_utf8_buffer()) 56 | 57 | terminal.write(string.to_utf8_buffer()) 58 | 59 | # Reset color back to default. 60 | terminal.write("\u001b[0m".to_utf8_buffer()) 61 | 62 | 63 | # tput_* functions based on the tput command. 64 | # See: https://man7.org/linux/man-pages/man1/tput.1.html for more info. 65 | 66 | 67 | # Hide the cursor. 68 | func civis(): 69 | terminal.write("%s?25l" % CSI) 70 | 71 | 72 | # Position the cursor at the given row and col. 73 | func cup(row: int = 0, col: int = 0) -> void: 74 | terminal.write("\u001b[%d;%dH" % [row, col]) 75 | 76 | 77 | func setaf(color) -> void: 78 | if color is Color: 79 | terminal.write("\u001b[38;2;%d;%d;%dm" % [color.r8, color.g8, color.b8]) 80 | elif "fg" in color and color.fg is int: 81 | terminal.write("\u001b[%dm" % color.fg) 82 | else: 83 | push_error("Invalid color: %s" % color) 84 | 85 | 86 | func setab(color) -> void: 87 | if color is Color: 88 | terminal.write("\u001b[48;2;%d;%d;%dm" % [color.r8, color.g8, color.b8]) 89 | elif "panel" in color and color.panel is int: 90 | terminal.write("\u001b[%dm" % color.panel) 91 | else: 92 | push_error("Invalid color: %s" % color) 93 | 94 | 95 | func rev() -> void: 96 | terminal.write("\u001b[7m") 97 | 98 | 99 | func sgr0() -> void: 100 | terminal.write("\u001b[0m") 101 | 102 | 103 | func reset() -> void: 104 | terminal.write("\u001bc") 105 | -------------------------------------------------------------------------------- /addons/godot_xterm/themes/fonts/jet_brains_mono/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | https://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /addons/godot_xterm/import_plugins/xrdb_import_plugin.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends EditorImportPlugin 3 | 4 | const XrdbTheme := preload("../resources/xrdb_theme.gd") 5 | 6 | 7 | func _get_importer_name(): 8 | return "godot_xterm_xrdb_importer" 9 | 10 | 11 | func _get_visible_name(): 12 | return "xrdb_theme" 13 | 14 | 15 | func _get_recognized_extensions(): 16 | return ["xrdb", "Xresources", "xresources"] 17 | 18 | 19 | func _get_save_extension(): 20 | return "res" 21 | 22 | 23 | func _get_resource_type(): 24 | return "Theme" 25 | 26 | 27 | func _get_import_options(preset, _i): 28 | return [] 29 | 30 | 31 | func _get_priority(): 32 | return 1.0 33 | 34 | 35 | func _get_import_order(): 36 | return 0 37 | 38 | 39 | func _get_preset_count(): 40 | return 0 41 | 42 | 43 | func _import(source_file, save_path, options, r_platform_variant, r_gen_files): 44 | var file = FileAccess.open(source_file, FileAccess.READ) 45 | var err = FileAccess.get_open_error() 46 | if err != OK: 47 | return err 48 | 49 | var theme: Theme = XrdbTheme.new() 50 | theme.set_theme_item(Theme.DATA_TYPE_FONT_SIZE, "font_size", "Terminal", 14) 51 | theme.set_theme_item( 52 | Theme.DATA_TYPE_FONT, "normal_font", "Terminal", preload("../themes/fonts/regular.tres") 53 | ) 54 | 55 | var word_regex = RegEx.new() 56 | word_regex.compile("\\S+") 57 | 58 | var color_regex = RegEx.new() 59 | color_regex.compile(".*(?cursor|foreground|background|color\\d+):") 60 | 61 | while not file.eof_reached(): 62 | var line = file.get_line().strip_edges() 63 | var words = word_regex.search_all(line) 64 | if words.size() < 2: 65 | continue 66 | 67 | var name: String 68 | var color: Color 69 | 70 | if words.size() == 2: 71 | if "cursorColor" in words[0].get_string(): 72 | name = "cursorcolor" 73 | color = Color(words[1].get_string()) 74 | else: 75 | var c = color_regex.search_all(words[0].get_string().to_lower()) 76 | if c.size() > 0: 77 | name = c[0].get_string("name").to_lower() 78 | color = Color(words[1].get_string()) 79 | 80 | if words.size() == 3 and words[0].get_string() == "#define": 81 | name = words[1].get_string().to_lower() 82 | color = Color(words[2].get_string()) 83 | 84 | if name == null or color == null: 85 | continue 86 | 87 | match name: 88 | "color0", "ansi_0_color": 89 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_0_color", "Terminal", color) 90 | "color1", "ansi_1_color": 91 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_1_color", "Terminal", color) 92 | "color2", "ansi_2_color": 93 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_2_color", "Terminal", color) 94 | "color3", "ansi_3_color": 95 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_3_color", "Terminal", color) 96 | "color4", "ansi_4_color": 97 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_4_color", "Terminal", color) 98 | "color5", "ansi_5_color": 99 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_5_color", "Terminal", color) 100 | "color6", "ansi_6_color": 101 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_6_color", "Terminal", color) 102 | "color7", "ansi_7_color": 103 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_7_color", "Terminal", color) 104 | "color8", "ansi_8_color": 105 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_8_color", "Terminal", color) 106 | "color9", "ansi_9_color": 107 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_9_color", "Terminal", color) 108 | "color10", "ansi_10_color": 109 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_10_color", "Terminal", color) 110 | "color11", "ansi_11_color": 111 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_11_color", "Terminal", color) 112 | "color12", "ansi_12_color": 113 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_12_color", "Terminal", color) 114 | "color13", "ansi_13_color": 115 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_13_color", "Terminal", color) 116 | "color14", "ansi_14_color": 117 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_14_color", "Terminal", color) 118 | "color15", "ansi_15_color": 119 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "ansi_15_color", "Terminal", color) 120 | "foreground", "foreground_color": 121 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "foreground_color", "Terminal", color) 122 | "background", "background_color": 123 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "background_color", "Terminal", color) 124 | "selection_color": 125 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "selection_color", "Terminal", color) 126 | "selected_text_color": 127 | theme.set_theme_item( 128 | Theme.DATA_TYPE_COLOR, "selected_text_color", "Terminal", color 129 | ) 130 | "cursorcolor", "cursor_color": 131 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "cursor_color", "Terminal", color) 132 | "cursor_text_color": 133 | theme.set_theme_item(Theme.DATA_TYPE_COLOR, "cursor_text_color", "Terminal", color) 134 | 135 | return ResourceSaver.save(theme, "%s.%s" % [save_path, _get_save_extension()]) 136 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/editor_terminal.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Terminal 3 | 4 | signal exited(exit_code, signum) 5 | 6 | var editor_settings: EditorSettings 7 | 8 | @onready var pty = $PTY 9 | 10 | 11 | # Sets terminal colors according to a dictionary that maps terminal color names 12 | # to TextEditor theme color names. 13 | func _set_terminal_colors(color_map: Dictionary) -> void: 14 | for key in color_map.keys(): 15 | var val: String = color_map[key] 16 | var editor_color = editor_settings.get_setting("text_editor/theme/highlighting/%s" % val) 17 | var color: Color = editor_color if editor_color else Color.BLACK 18 | add_theme_color_override(key, color) 19 | 20 | 21 | func _apply_font_size(font_size: int) -> void: 22 | add_theme_font_size_override("normal_font_size", font_size) 23 | add_theme_font_size_override("bold_font_size", font_size) 24 | add_theme_font_size_override("italics_font_size", font_size) 25 | add_theme_font_size_override("bold_italics_font_size", font_size) 26 | 27 | 28 | func _set_terminal_font() -> void: 29 | # Try to get editor's code font and font size first. 30 | var editor_font = null 31 | if editor_settings.has_setting("interface/editor/code_font"): 32 | editor_font = editor_settings.get_setting("interface/editor/code_font") 33 | if editor_settings.has_setting("interface/editor/code_font_size"): 34 | var editor_font_size = editor_settings.get_setting("interface/editor/code_font_size") 35 | if editor_font_size is int: 36 | _apply_font_size(editor_font_size) 37 | 38 | # If we have an editor font, use it. 39 | if editor_font and editor_font is Font: 40 | add_theme_font_override("normal_font", editor_font) 41 | add_theme_font_override("bold_font", editor_font) 42 | add_theme_font_override("italics_font", editor_font) 43 | add_theme_font_override("bold_italics_font", editor_font) 44 | return 45 | 46 | # Fallback to bundled monospace font. 47 | var font_path = "res://addons/godot_xterm/themes/fonts/regular.tres" 48 | if ResourceLoader.exists(font_path): 49 | var default_font = load(font_path) 50 | if default_font and default_font is Font: 51 | add_theme_font_override("normal_font", default_font) 52 | add_theme_font_override("bold_font", default_font) 53 | add_theme_font_override("italics_font", default_font) 54 | add_theme_font_override("bold_italics_font", default_font) 55 | 56 | 57 | func _ready(): 58 | if not editor_settings: 59 | return 60 | 61 | # Ensure monospace font is loaded for editor terminal. 62 | _set_terminal_font() 63 | 64 | # Get colors from TextEdit theme. Created using the default (Adaptive) theme 65 | # for reference, but will probably cause strange results if using another theme 66 | # better to use a dedicated terminal theme, rather than relying on this. 67 | _set_terminal_colors( 68 | { 69 | "background_color": "background_color", 70 | "foreground_color": "text_color", 71 | "ansi_0_color": "caret_background_color", 72 | "ansi_1_color": "brace_mismatch_color", 73 | "ansi_2_color": "gdscript/node_reference_color", 74 | "ansi_3_color": "executing_line_color", 75 | "ansi_4_color": "bookmark_color", 76 | "ansi_5_color": "control_flow_keyword_color", 77 | "ansi_6_color": "engine_type_color", 78 | "ansi_7_color": "comment_color", 79 | "ansi_8_color": "completion_background_color", 80 | "ansi_9_color": "keyword_color", 81 | "ansi_10_color": "base_type_color", 82 | "ansi_11_color": "string_color", 83 | "ansi_12_color": "function_color", 84 | "ansi_13_color": "gdscript/global_function_color", 85 | "ansi_14_color": "gdscript/function_definition_color", 86 | "ansi_15_color": "caret_color", 87 | } 88 | ) 89 | 90 | 91 | func _input(event): 92 | if has_focus() and event is InputEventKey and event.is_pressed(): 93 | if event.ctrl_pressed and event.keycode in [KEY_PAGEUP, KEY_PAGEDOWN]: 94 | # Handled by switch tabs shortcut. 95 | return 96 | 97 | if event.ctrl_pressed and event.shift_pressed: 98 | # Not handled by terminal. 99 | return 100 | 101 | # Handle all other InputEventKey events to prevent triggering of editor 102 | # shortcuts when using the terminal. 103 | # 104 | # Currently the only way to get shortcuts is by calling editor_settings.get_setting("shortcuts") 105 | # and it returns an array that *only* contains shortcuts that have been modified from the original. 106 | # Once https://github.com/godotengine/godot-proposals/issues/4112 is resolved it should be possible 107 | # to get all shortcuts by their editor setting string as documented here: 108 | # https://docs.godotengine.org/en/stable/tutorials/editor/default_key_mapping.html. 109 | # In this case we could simply add a setting called something like "allowed shortcuts" or 110 | # "propagated shortcuts" consisting of an array of shortcut editor setting strings. 111 | # For example "editor/save_scene" which saves the scene and by default maps to 'Ctrl + S'. 112 | # Then any shortcut events listed here can be handled by the terminal *and* the editor. 113 | 114 | 115 | func _on_PTY_exited(exit_code: int, signum: int): 116 | emit_signal("exited", exit_code, signum) 117 | -------------------------------------------------------------------------------- /addons/godot_xterm/.gitignore: -------------------------------------------------------------------------------- 1 | # Godot auto generated files 2 | *.gen.* 3 | .import/ 4 | 5 | # Documentation generated by doxygen or from classes.xml 6 | doc/_build/ 7 | 8 | # Javascript specific 9 | *.bc 10 | 11 | # CLion 12 | cmake-build-debug 13 | 14 | # Android specific 15 | .gradle 16 | local.properties 17 | *.iml 18 | .idea 19 | .gradletasknamecache 20 | project.properties 21 | platform/android/java/app/libs/* 22 | platform/android/java/libs/* 23 | platform/android/java/lib/.cxx/ 24 | 25 | # General c++ generated files 26 | *.lib 27 | *.o 28 | *.ox 29 | *.a 30 | *.ax 31 | *.d 32 | *.so 33 | *.os 34 | *.Plo 35 | *.lo 36 | 37 | # Libs generated files 38 | .deps/* 39 | .dirstamp 40 | 41 | # Gprof output 42 | gmon.out 43 | 44 | # Vim temp files 45 | *.swo 46 | *.swp 47 | 48 | # Qt project files 49 | *.config 50 | *.creator 51 | *.creator.* 52 | *.files 53 | *.includes 54 | *.cflags 55 | *.cxxflags 56 | 57 | # Code::Blocks files 58 | *.cbp 59 | *.layout 60 | *.depend 61 | 62 | # Eclipse CDT files 63 | .cproject 64 | .settings/ 65 | *.pydevproject 66 | *.launch 67 | 68 | # Geany/geany-plugins files 69 | *.geany 70 | .geanyprj 71 | 72 | # Jetbrains IDEs 73 | .idea/ 74 | 75 | # Misc 76 | .DS_Store 77 | __MACOSX 78 | logs/ 79 | 80 | # for projects that use SCons for building: http://http://www.scons.org/ 81 | .sconf_temp 82 | .sconsign*.dblite 83 | *.pyc 84 | 85 | # https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 86 | ## Ignore Visual Studio temporary files, build results, and 87 | ## files generated by popular Visual Studio add-ons. 88 | 89 | # User-specific files 90 | *.suo 91 | *.user 92 | *.sln.docstates 93 | *.sln 94 | *.vcxproj* 95 | 96 | # Custom SCons configuration override 97 | /custom.py 98 | 99 | # Build results 100 | [Dd]ebug/ 101 | [Dd]ebugPublic/ 102 | [Rr]elease/ 103 | x64/ 104 | build/ 105 | bld/ 106 | [Oo]bj/ 107 | *.debug 108 | *.dSYM 109 | 110 | # Visual Studio cache/options directory 111 | .vs/ 112 | 113 | # MSTest test Results 114 | [Tt]est[Rr]esult*/ 115 | [Bb]uild[Ll]og.* 116 | 117 | # Hints for improving IntelliSense, created together with VS project 118 | cpp.hint 119 | 120 | #NUNIT 121 | *.VisualState.xml 122 | TestResult.xml 123 | 124 | *.o 125 | *.a 126 | *_i.c 127 | *_p.c 128 | *_i.h 129 | *.ilk 130 | *.meta 131 | *.obj 132 | *.pch 133 | *.pdb 134 | *.pgc 135 | *.pgd 136 | *.rsp 137 | *.sbr 138 | *.tlb 139 | *.tli 140 | *.tlh 141 | *.tmp 142 | *.tmp_proj 143 | *.bak 144 | *.log 145 | *.vspscc 146 | *.vssscc 147 | .builds 148 | *.pidb 149 | *.svclog 150 | *.scc 151 | *.nib 152 | 153 | # Chutzpah Test files 154 | _Chutzpah* 155 | 156 | # Visual C++ cache files 157 | ipch/ 158 | *.aps 159 | *.ncb 160 | *.opensdf 161 | *.sdf 162 | *.cachefile 163 | *.VC.db 164 | *.VC.opendb 165 | *.VC.VC.opendb 166 | enc_temp_folder/ 167 | 168 | # Visual Studio profiler 169 | *.psess 170 | *.vsp 171 | *.vspx 172 | 173 | # CodeLite project files 174 | *.project 175 | *.workspace 176 | .codelite/ 177 | 178 | # TFS 2012 Local Workspace 179 | $tf/ 180 | 181 | # Guidance Automation Toolkit 182 | *.gpState 183 | 184 | # ReSharper is a .NET coding add-in 185 | _ReSharper*/ 186 | *.[Rr]e[Ss]harper 187 | *.DotSettings.user 188 | 189 | # JustCode is a .NET coding addin-in 190 | .JustCode 191 | 192 | # TeamCity is a build add-in 193 | _TeamCity* 194 | 195 | # DotCover is a Code Coverage Tool 196 | *.dotCover 197 | 198 | # NCrunch 199 | *.ncrunch* 200 | _NCrunch_* 201 | .*crunch*.local.xml 202 | 203 | # MightyMoose 204 | *.mm.* 205 | AutoTest.Net/ 206 | 207 | # Web workbench (sass) 208 | .sass-cache/ 209 | 210 | # Installshield output folder 211 | [Ee]xpress/ 212 | 213 | # DocProject is a documentation generator add-in 214 | DocProject/buildhelp/ 215 | DocProject/Help/*.HxT 216 | DocProject/Help/*.HxC 217 | DocProject/Help/*.hhc 218 | DocProject/Help/*.hhk 219 | DocProject/Help/*.hhp 220 | DocProject/Help/Html2 221 | DocProject/Help/html 222 | 223 | # Click-Once directory 224 | publish/ 225 | 226 | # Publish Web Output 227 | *.[Pp]ublish.xml 228 | *.azurePubxml 229 | 230 | # NuGet Packages Directory 231 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 232 | #packages/* 233 | ## TODO: If the tool you use requires repositories.config, also uncomment the next line 234 | #!packages/repositories.config 235 | 236 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 237 | # This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) 238 | !packages/build/ 239 | 240 | # Windows Azure Build Output 241 | csx/ 242 | *.build.csdef 243 | 244 | # Windows Store app package directory 245 | AppPackages/ 246 | 247 | # Others 248 | sql/ 249 | *.Cache 250 | ClientBin/ 251 | [Ss]tyle[Cc]op.* 252 | ~$* 253 | *~ 254 | *.dbmdl 255 | *.dbproj.schemaview 256 | *.pfx 257 | *.publishsettings 258 | node_modules/ 259 | __pycache__/ 260 | 261 | # KDE 262 | .directory 263 | 264 | #Kdevelop project files 265 | *.kdev4 266 | 267 | # Xcode 268 | xcuserdata/ 269 | *.xcscmblueprint 270 | *.xccheckout 271 | *.xcodeproj/* 272 | 273 | # RIA/Silverlight projects 274 | Generated_Code/ 275 | 276 | # Backup & report files from converting an old project file to a newer 277 | # Visual Studio version. Backup files are not needed, because we have git ;-) 278 | _UpgradeReport_Files/ 279 | Backup*/ 280 | UpgradeLog*.XML 281 | UpgradeLog*.htm 282 | 283 | # SQL Server files 284 | App_Data/*.mdf 285 | App_Data/*.ldf 286 | 287 | # Business Intelligence projects 288 | *.rdl.data 289 | *.bim.layout 290 | *.bim_*.settings 291 | 292 | # Microsoft Fakes 293 | FakesAssemblies/ 294 | 295 | # ========================= 296 | # Windows detritus 297 | # ========================= 298 | 299 | # Windows image file caches 300 | [Tt]humbs.db 301 | [Tt]humbs.db:encryptable 302 | ehthumbs.db 303 | ehthumbs_vista.db 304 | 305 | # Windows stackdumps 306 | *.stackdump 307 | 308 | # Windows shortcuts 309 | *.lnk 310 | 311 | # Folder config file 312 | [Dd]esktop.ini 313 | 314 | # Recycle Bin used on file shares 315 | $RECYCLE.BIN/ 316 | logo.h 317 | *.autosave 318 | 319 | # https://github.com/github/gitignore/blob/master/Global/Tags.gitignore 320 | # Ignore tags created by etags, ctags, gtags (GNU global) and cscope 321 | TAGS 322 | !TAGS/ 323 | tags 324 | *.tags 325 | !tags/ 326 | gtags.files 327 | GTAGS 328 | GRTAGS 329 | GPATH 330 | cscope.files 331 | cscope.out 332 | cscope.in.out 333 | cscope.po.out 334 | godot.creator.* 335 | 336 | projects/ 337 | platform/windows/godot_res.res 338 | 339 | # Visual Studio 2017 and Visual Studio Code workspace folder 340 | /.vs 341 | *.vscode 342 | 343 | # Visual Studio Code workspace file 344 | *.code-workspace 345 | 346 | # Scons construction environment dump 347 | .scons_env.json 348 | 349 | # Scons cache 350 | .cache 351 | 352 | # Scons progress indicator 353 | .scons_node_count 354 | 355 | # ccls cache (https://github.com/MaskRay/ccls) 356 | .ccls-cache/ 357 | 358 | # compile commands (https://clang.llvm.org/docs/JSONCompilationDatabase.html) 359 | compile_commands.json 360 | 361 | # Cppcheck 362 | *.cppcheck 363 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/terminal_panel.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=5 format=3 uid="uid://cbxovnvw5o4mo"] 2 | 3 | [ext_resource type="Script" uid="uid://cufcnr6pxqofk" path="res://addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd" id="1"] 4 | 5 | [sub_resource type="Image" id="Image_stuna"] 6 | data = { 7 | "data": PackedByteArray(255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 0, 255, 92, 92, 127, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 0, 255, 93, 93, 255, 255, 92, 92, 127, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 92, 92, 127, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 92, 92, 127, 255, 92, 92, 0, 255, 92, 92, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 231, 255, 90, 90, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 90, 90, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 0, 255, 93, 93, 0, 255, 91, 91, 0, 255, 91, 91, 0, 255, 91, 91, 42, 255, 90, 90, 0, 255, 94, 94, 0, 255, 91, 91, 42, 255, 93, 93, 233, 255, 92, 92, 232, 255, 93, 93, 41, 255, 90, 90, 0, 255, 94, 94, 0, 255, 91, 91, 42, 255, 93, 93, 233, 255, 92, 92, 232, 255, 92, 92, 0, 255, 92, 92, 0, 255, 91, 91, 0, 255, 91, 91, 0, 255, 91, 91, 0, 255, 91, 91, 45, 255, 93, 93, 44, 255, 91, 91, 0, 255, 91, 91, 42, 255, 91, 91, 42, 255, 93, 93, 0, 255, 91, 91, 45, 255, 93, 93, 44, 255, 91, 91, 0, 255, 91, 91, 42, 255, 91, 91, 42, 255, 91, 91, 0, 255, 91, 91, 0, 255, 91, 91, 0, 255, 91, 91, 0, 255, 91, 91, 45, 255, 92, 92, 235, 255, 92, 92, 234, 255, 89, 89, 43, 255, 91, 91, 0, 255, 91, 91, 0, 255, 91, 91, 45, 255, 92, 92, 235, 255, 92, 92, 234, 255, 89, 89, 43, 255, 91, 91, 0, 255, 91, 91, 0, 255, 91, 91, 0, 255, 91, 91, 0, 255, 92, 92, 0, 255, 92, 92, 0, 255, 92, 92, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 91, 91, 59, 255, 92, 92, 61, 255, 92, 92, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 91, 91, 59, 255, 92, 92, 61, 255, 92, 92, 0, 255, 92, 92, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0, 255, 93, 93, 0), 8 | "format": "RGBA8", 9 | "height": 16, 10 | "mipmaps": false, 11 | "width": 16 12 | } 13 | 14 | [sub_resource type="ImageTexture" id="ImageTexture_umfb5"] 15 | image = SubResource("Image_stuna") 16 | 17 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_osmrc"] 18 | bg_color = Color(0.113329, 0.129458, 0.156802, 1) 19 | 20 | [node name="Panel" type="Panel"] 21 | custom_minimum_size = Vector2(0, 206) 22 | anchors_preset = 15 23 | anchor_right = 1.0 24 | anchor_bottom = 1.0 25 | offset_right = 2304.0 26 | offset_bottom = -233.0 27 | grow_horizontal = 2 28 | grow_vertical = 2 29 | script = ExtResource("1") 30 | 31 | [node name="VBoxContainer" type="VBoxContainer" parent="."] 32 | layout_mode = 1 33 | anchors_preset = 15 34 | anchor_right = 1.0 35 | anchor_bottom = 1.0 36 | grow_horizontal = 2 37 | grow_vertical = 2 38 | theme_override_constants/separation = 0 39 | 40 | [node name="TabbarContainer" type="HBoxContainer" parent="VBoxContainer"] 41 | layout_mode = 2 42 | 43 | [node name="Tabs" type="TabBar" parent="VBoxContainer/TabbarContainer"] 44 | layout_mode = 2 45 | size_flags_horizontal = 3 46 | focus_mode = 0 47 | tab_close_display_policy = 2 48 | drag_to_rearrange_enabled = true 49 | 50 | [node name="AddButton" type="Button" parent="VBoxContainer/TabbarContainer"] 51 | layout_mode = 2 52 | tooltip_text = "New Terminal (Ctrl+Shift+T)" 53 | theme_override_colors/icon_normal_color = Color(0.6, 0.6, 0.6, 0.8) 54 | flat = true 55 | 56 | [node name="PopupMenu" type="PopupMenu" parent="VBoxContainer/TabbarContainer"] 57 | item_count = 4 58 | item_0/text = "Kill" 59 | item_0/id = 0 60 | item_1/text = "Kill Others" 61 | item_1/id = 1 62 | item_2/text = "Kill to the Right" 63 | item_2/id = 2 64 | item_3/text = "Kill All" 65 | item_3/id = 3 66 | 67 | [node name="TabContainer" type="TabContainer" parent="VBoxContainer"] 68 | clip_contents = true 69 | layout_mode = 2 70 | size_flags_vertical = 3 71 | theme_override_styles/panel = SubResource("StyleBoxFlat_osmrc") 72 | tabs_visible = false 73 | deselect_enabled = true 74 | 75 | [node name="TerminalPopupMenu" type="PopupMenu" parent="VBoxContainer"] 76 | size = Vector2i(136, 178) 77 | item_count = 8 78 | item_0/text = "New Terminal" 79 | item_0/id = 0 80 | item_1/id = 1 81 | item_1/disabled = true 82 | item_1/separator = true 83 | item_2/text = "Copy" 84 | item_2/id = 2 85 | item_3/text = "Paste" 86 | item_3/id = 3 87 | item_4/text = "Select All" 88 | item_4/id = 4 89 | item_5/id = 5 90 | item_5/separator = true 91 | item_6/text = "Clear" 92 | item_6/id = 6 93 | item_7/text = "Kill Terminal" 94 | item_7/id = 7 95 | 96 | [node name="SizeLabel" type="Label" parent="."] 97 | visible = false 98 | layout_mode = 1 99 | anchors_preset = 8 100 | anchor_left = 0.5 101 | anchor_top = 0.5 102 | anchor_right = 0.5 103 | anchor_bottom = 0.5 104 | offset_left = -52.0 105 | offset_top = -15.5 106 | offset_right = 52.0 107 | offset_bottom = 15.5 108 | grow_horizontal = 2 109 | grow_vertical = 2 110 | text = "Size: 111 | (3456 x 1035 px)" 112 | 113 | [node name="Panel" type="Panel" parent="SizeLabel"] 114 | show_behind_parent = true 115 | layout_mode = 1 116 | anchors_preset = 15 117 | anchor_right = 1.0 118 | anchor_bottom = 1.0 119 | offset_left = -5.0 120 | offset_top = -5.0 121 | offset_right = 5.0 122 | offset_bottom = 5.0 123 | grow_horizontal = 2 124 | grow_vertical = 2 125 | 126 | [node name="SizeLabelTimer" type="Timer" parent="SizeLabel"] 127 | 128 | [connection signal="resized" from="." to="." method="_on_Panel_resized"] 129 | [connection signal="tab_changed" from="VBoxContainer/TabbarContainer/Tabs" to="." method="_on_Tabs_tab_changed"] 130 | [connection signal="tab_close_pressed" from="VBoxContainer/TabbarContainer/Tabs" to="." method="_on_Tabs_tab_close"] 131 | [connection signal="pressed" from="VBoxContainer/TabbarContainer/AddButton" to="." method="_on_AddButton_pressed"] 132 | [connection signal="gui_input" from="VBoxContainer/TabContainer" to="." method="_on_TabContainer_gui_input"] 133 | [connection signal="tab_changed" from="VBoxContainer/TabContainer" to="." method="_on_TabContainer_tab_changed"] 134 | [connection signal="id_pressed" from="VBoxContainer/TerminalPopupMenu" to="." method="_on_TerminalPopupMenu_id_pressed"] 135 | [connection signal="timeout" from="SizeLabel/SizeLabelTimer" to="." method="_on_SizeLabelTimer_timeout"] 136 | -------------------------------------------------------------------------------- /addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021, Leroy Hopson (MIT License). 2 | # 3 | # This file contains snippets of code derived from Godot's editor_node.cpp file. 4 | # These snippets are copyright of their authors and released under the MIT license: 5 | # - Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur (MIT License). 6 | # - Copyright (c) 2014-2021 Godot Engine contributors (MIT License). 7 | @tool 8 | extends Control 9 | 10 | const EditorTerminal := preload("./editor_terminal.tscn") 11 | const TerminalSettings := preload("./settings/terminal_settings.gd") 12 | 13 | const SETTINGS_FILE_PATH := "res://.gdxterm/settings.tres" 14 | 15 | enum TerminalPopupMenuOptions { 16 | NEW_TERMINAL = 0, 17 | COPY = 2, 18 | PASTE = 3, 19 | SELECT_ALL = 4, 20 | CLEAR = 6, 21 | KILL_TERMINAL = 7, 22 | } 23 | 24 | # Has access to the EditorSettings singleton so it can dynamically generate the 25 | # terminal color scheme based on editor theme settings. 26 | var editor_plugin: EditorPlugin 27 | var editor_interface: EditorInterface 28 | var editor_settings: EditorSettings 29 | 30 | @onready var tabs: TabBar = $VBoxContainer/TabbarContainer/Tabs 31 | @onready var tabbar_container: HBoxContainer = $VBoxContainer/TabbarContainer 32 | @onready var add_button: Button = $VBoxContainer/TabbarContainer/AddButton 33 | @onready var tab_container: TabContainer = $VBoxContainer/TabContainer 34 | @onready var terminal_popup_menu: PopupMenu = $VBoxContainer/TerminalPopupMenu 35 | 36 | # Size label. 37 | # Used to show the size of the terminal (rows/cols) and panel (pixels) when resized. 38 | @onready var size_label: Label = $SizeLabel 39 | @onready var size_label_timer: Timer = $SizeLabel/SizeLabelTimer 40 | 41 | @onready var is_ready := true 42 | 43 | var _theme := Theme.new() 44 | var _settings: TerminalSettings 45 | var _tab_container_min_size 46 | 47 | 48 | func _ready(): 49 | if editor_interface: 50 | add_button.set("icon", get_theme_icon("Add", "EditorIcons")) 51 | editor_settings = editor_interface.get_editor_settings() 52 | _update_settings() 53 | 54 | 55 | func _load_or_create_settings() -> void: 56 | # Use only default settings for now, until settings are properly defined 57 | # and documented. 58 | _settings = TerminalSettings.new() 59 | 60 | 61 | func _update_settings() -> void: 62 | _load_or_create_settings() 63 | 64 | var editor_scale: float = 1.0 65 | if editor_interface and editor_interface.has_method("get_editor_scale"): 66 | editor_scale = editor_interface.get_editor_scale() 67 | 68 | custom_minimum_size = Vector2(0, tabbar_container.size.y + 182) * editor_scale 69 | call_deferred("set_size", Vector2(size.x, 415)) 70 | 71 | tabs.tab_close_display_policy = TabBar.CLOSE_BUTTON_SHOW_ALWAYS 72 | 73 | # Update shortcuts. 74 | if _settings.new_terminal_shortcut: 75 | terminal_popup_menu.set_item_shortcut( 76 | TerminalPopupMenuOptions.NEW_TERMINAL, _settings.new_terminal_shortcut, true 77 | ) 78 | if _settings.kill_terminal_shortcut: 79 | terminal_popup_menu.set_item_shortcut( 80 | TerminalPopupMenuOptions.KILL_TERMINAL, _settings.kill_terminal_shortcut, false 81 | ) 82 | if _settings.copy_shortcut: 83 | terminal_popup_menu.set_item_shortcut( 84 | TerminalPopupMenuOptions.COPY, _settings.copy_shortcut, false 85 | ) 86 | if _settings.paste_shortcut: 87 | terminal_popup_menu.set_item_shortcut( 88 | TerminalPopupMenuOptions.PASTE, _settings.paste_shortcut, false 89 | ) 90 | 91 | _update_terminal_tabs() 92 | 93 | 94 | func _update_terminal_tabs(): 95 | # Wait a couple of frames to allow everything to resize before updating. 96 | var tree = get_tree() 97 | if tree: 98 | await tree.process_frame 99 | await tree.process_frame 100 | 101 | if tabs.get_offset_buttons_visible(): 102 | # Move add button to fixed position at the right of the tabbar container. 103 | if add_button.get_parent() == tabs: 104 | tabs.remove_child(add_button) 105 | tabbar_container.add_child(add_button) 106 | # Keep it at the end (right side) of the container. 107 | else: 108 | # Move add button after last tab. 109 | if tabs.tab_count > 0 and add_button.get_parent() == tabbar_container: 110 | tabbar_container.remove_child(add_button) 111 | tabs.add_child(add_button) 112 | var last_tab := Rect2() 113 | if tabs.get_tab_count() > 0: 114 | last_tab = tabs.get_tab_rect(tabs.get_tab_count() - 1) 115 | add_button.position = Vector2( 116 | last_tab.position.x + last_tab.size.x + 3, last_tab.position.y 117 | ) 118 | if tabs.tab_count == 0 and add_button.get_parent() == tabs: 119 | tabs.remove_child(add_button) 120 | tabbar_container.add_child(add_button) 121 | tabbar_container.move_child(add_button, 0) # Move to start (left side) 122 | add_button.position = Vector2.ZERO 123 | 124 | # Make sure we still own the button, so it gets saved with our scene. 125 | add_button.owner = self 126 | 127 | 128 | func _on_AddButton_pressed(): 129 | var shell = ( 130 | OS.get_environment("SHELL") 131 | if OS.has_environment("SHELL") 132 | else ("powershell" if OS.get_name() == "Windows" else "sh") 133 | ) 134 | var terminal := EditorTerminal.instantiate() 135 | tabs.add_tab(shell.get_file()) 136 | terminal.editor_settings = editor_settings 137 | terminal.set_anchors_preset(PRESET_BOTTOM_WIDE) 138 | terminal.connect("gui_input", Callable(self, "_on_TabContainer_gui_input")) 139 | terminal.connect("exited", Callable(self, "_on_Terminal_exited").bind(terminal)) 140 | tab_container.add_child(terminal) 141 | terminal.pty.fork(shell) 142 | terminal.grab_focus() 143 | tabs.current_tab = tabs.get_tab_count() - 1 144 | tab_container.current_tab = tabs.current_tab 145 | _update_terminal_tabs() 146 | 147 | 148 | func _on_Tabs_tab_changed(tab_index): 149 | # Simply sync the TabContainer - focus handling happens in TabContainer signal 150 | # Only sync if TabContainer has enough tabs 151 | if tab_index < tab_container.get_tab_count(): 152 | tab_container.current_tab = tab_index 153 | 154 | 155 | func _on_TabContainer_tab_changed(tab_index): 156 | # TabContainer has already changed, so we can safely focus immediately 157 | var current_tab_control = tab_container.get_current_tab_control() 158 | if current_tab_control: 159 | current_tab_control.grab_focus() 160 | 161 | 162 | func _on_Tabs_tab_close(tab_index): 163 | tabs.remove_tab(tab_index) 164 | tab_container.get_child(tab_index).queue_free() 165 | 166 | # Sync TabContainer to the current TabBar selection 167 | # Focus will be handled automatically by the TabContainer signal 168 | if tabs.get_tab_count() > 0: 169 | tab_container.current_tab = tabs.current_tab 170 | 171 | _update_terminal_tabs() 172 | 173 | 174 | func _notification(what): 175 | if not is_ready: 176 | return 177 | 178 | match what: 179 | EditorSettings.NOTIFICATION_EDITOR_SETTINGS_CHANGED: 180 | _update_settings() 181 | _update_terminal_tabs() 182 | NOTIFICATION_RESIZED: 183 | _update_terminal_tabs() 184 | NOTIFICATION_APPLICATION_FOCUS_IN: 185 | _update_terminal_tabs() 186 | 187 | 188 | func _input(event: InputEvent) -> void: 189 | if not _settings or not event.is_pressed(): 190 | return 191 | 192 | # Global shortcut to open new terminal and make terminal panel visible. 193 | if _settings.new_terminal_shortcut and _settings.new_terminal_shortcut.matches_event(event): 194 | get_viewport().set_input_as_handled() 195 | editor_plugin.make_bottom_panel_item_visible(self) 196 | _on_AddButton_pressed() 197 | 198 | # Non-global shortcuts, only applied if terminal is active and focused. 199 | if ( 200 | tabs.get_tab_count() > 0 and tab_container.get_child(tabs.current_tab).has_focus() 201 | or terminal_popup_menu.has_focus() 202 | ): 203 | # Kill terminal. 204 | if ( 205 | _settings.kill_terminal_shortcut 206 | and _settings.kill_terminal_shortcut.matches_event(event) 207 | ): 208 | get_viewport().set_input_as_handled() 209 | _on_TerminalPopupMenu_id_pressed(TerminalPopupMenuOptions.KILL_TERMINAL) 210 | 211 | # Copy. 212 | if _settings.copy_shortcut and _settings.copy_shortcut.matches_event(event): 213 | get_viewport().set_input_as_handled() 214 | _on_TerminalPopupMenu_id_pressed(TerminalPopupMenuOptions.COPY) 215 | 216 | # Paste. 217 | if _settings.paste_shortcut and _settings.paste_shortcut.matches_event(event): 218 | get_viewport().set_input_as_handled() 219 | _on_TerminalPopupMenu_id_pressed(TerminalPopupMenuOptions.PASTE) 220 | 221 | # Next tab. 222 | if _settings.next_tab_shortcut and _settings.next_tab_shortcut.matches_event(event): 223 | get_viewport().set_input_as_handled() 224 | tabs.current_tab = min(tabs.current_tab + 1, tabs.get_tab_count() - 1) 225 | 226 | # Previous tab. 227 | if _settings.previous_tab_shortcut and _settings.previous_tab_shortcut.matches_event(event): 228 | get_viewport().set_input_as_handled() 229 | tabs.current_tab = max(tabs.current_tab - 1, 0) 230 | 231 | 232 | func _on_TabContainer_gui_input(event): 233 | if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_RIGHT: 234 | terminal_popup_menu.position = event.global_position 235 | terminal_popup_menu.popup() 236 | 237 | 238 | func _on_TerminalPopupMenu_id_pressed(id): 239 | match id: 240 | TerminalPopupMenuOptions.NEW_TERMINAL: 241 | _on_AddButton_pressed() 242 | 243 | if tabs.get_tab_count() > 0: 244 | var terminal = tab_container.get_child(tab_container.current_tab) 245 | match id: 246 | TerminalPopupMenuOptions.COPY: 247 | DisplayServer.clipboard_set(terminal.copy_selection()) 248 | TerminalPopupMenuOptions.PASTE: 249 | terminal.pty.write(DisplayServer.clipboard_get()) 250 | TerminalPopupMenuOptions.SELECT_ALL: 251 | terminal.select(0, 0, terminal.get_rows(), terminal.get_cols()) 252 | TerminalPopupMenuOptions.CLEAR: 253 | terminal.clear() 254 | TerminalPopupMenuOptions.KILL_TERMINAL: 255 | _on_Tabs_tab_close(tabs.current_tab) 256 | 257 | 258 | func _on_Tabs_reposition_active_tab_request(idx_to): 259 | var active = tab_container.get_child(tab_container.current_tab) 260 | tab_container.move_child(active, idx_to) 261 | 262 | 263 | func _on_Panel_resized(): 264 | if not size_label: 265 | return 266 | 267 | var size = tab_container.size 268 | if tabs.get_tab_count() > 0: 269 | var terminal = tab_container.get_child(tabs.current_tab) 270 | var cols = terminal.get_cols() 271 | var rows = terminal.get_rows() 272 | size_label.text = "Size: %d cols; %d rows\n(%d x %d px)" % [cols, rows, size.x, size.y] 273 | else: 274 | size_label.text = "Size:\n(%d x %d px)" % [size.x, size.y] 275 | 276 | size_label.visible = true 277 | size_label_timer.wait_time = 1 278 | size_label_timer.start() 279 | 280 | 281 | func _on_SizeLabelTimer_timeout(): 282 | if size_label: 283 | size_label.visible = false 284 | 285 | 286 | func _on_Terminal_exited(exit_code, signum, terminal): 287 | # Leave non-zero exit code terminals open in case they have some important 288 | # error information. 289 | if exit_code == 0: 290 | _on_Tabs_tab_close(terminal.get_index()) 291 | -------------------------------------------------------------------------------- /addons/godot_xterm/THIRDPARTY_NOTICES_nopty.txt: -------------------------------------------------------------------------------- 1 | THIRD-PARTY SOFTWARE NOTICES AND INFORMATION 2 | 3 | The GodotXterm project incorporates components from the projects listed below. 4 | The original copyright notices and the licenses under which GodotXterm received such components are set forth below. 5 | 6 | 1. godot-cpp 7 | 2. htable 8 | 3. libtsm 9 | 4. wcwidth 10 | 11 | 12 | %% godot-cpp NOTICES AND INFORMATION BEGIN HERE 13 | ========================================= 14 | # MIT License 15 | 16 | Copyright (c) 2017-present Godot Engine contributors. 17 | 18 | Permission is hereby granted, free of charge, to any person obtaining a copy 19 | of this software and associated documentation files (the "Software"), to deal 20 | in the Software without restriction, including without limitation the rights 21 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 22 | copies of the Software, and to permit persons to whom the Software is 23 | furnished to do so, subject to the following conditions: 24 | 25 | The above copyright notice and this permission notice shall be included in all 26 | copies or substantial portions of the Software. 27 | 28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 29 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 30 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 31 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 32 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 33 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 34 | SOFTWARE. 35 | ========================================= 36 | END OF godot-cpp NOTICES AND INFORMATION 37 | 38 | %% htable NOTICES AND INFORMATION BEGIN HERE 39 | ========================================= 40 | 41 | GNU LESSER GENERAL PUBLIC LICENSE 42 | Version 2.1, February 1999 43 | 44 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 45 | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 46 | Everyone is permitted to copy and distribute verbatim copies 47 | of this license document, but changing it is not allowed. 48 | 49 | [This is the first released version of the Lesser GPL. It also counts 50 | as the successor of the GNU Library Public License, version 2, hence 51 | the version number 2.1.] 52 | 53 | Preamble 54 | 55 | The licenses for most software are designed to take away your 56 | freedom to share and change it. By contrast, the GNU General Public 57 | Licenses are intended to guarantee your freedom to share and change 58 | free software--to make sure the software is free for all its users. 59 | 60 | This license, the Lesser General Public License, applies to some 61 | specially designated software packages--typically libraries--of the 62 | Free Software Foundation and other authors who decide to use it. You 63 | can use it too, but we suggest you first think carefully about whether 64 | this license or the ordinary General Public License is the better 65 | strategy to use in any particular case, based on the explanations 66 | below. 67 | 68 | When we speak of free software, we are referring to freedom of use, 69 | not price. Our General Public Licenses are designed to make sure that 70 | you have the freedom to distribute copies of free software (and charge 71 | for this service if you wish); that you receive source code or can get 72 | it if you want it; that you can change the software and use pieces of 73 | it in new free programs; and that you are informed that you can do 74 | these things. 75 | 76 | To protect your rights, we need to make restrictions that forbid 77 | distributors to deny you these rights or to ask you to surrender these 78 | rights. These restrictions translate to certain responsibilities for 79 | you if you distribute copies of the library or if you modify it. 80 | 81 | For example, if you distribute copies of the library, whether gratis 82 | or for a fee, you must give the recipients all the rights that we gave 83 | you. You must make sure that they, too, receive or can get the source 84 | code. If you link other code with the library, you must provide 85 | complete object files to the recipients, so that they can relink them 86 | with the library after making changes to the library and recompiling 87 | it. And you must show them these terms so they know their rights. 88 | 89 | We protect your rights with a two-step method: (1) we copyright the 90 | library, and (2) we offer you this license, which gives you legal 91 | permission to copy, distribute and/or modify the library. 92 | 93 | To protect each distributor, we want to make it very clear that 94 | there is no warranty for the free library. Also, if the library is 95 | modified by someone else and passed on, the recipients should know 96 | that what they have is not the original version, so that the original 97 | author's reputation will not be affected by problems that might be 98 | introduced by others. 99 | 100 | Finally, software patents pose a constant threat to the existence of 101 | any free program. We wish to make sure that a company cannot 102 | effectively restrict the users of a free program by obtaining a 103 | restrictive license from a patent holder. Therefore, we insist that 104 | any patent license obtained for a version of the library must be 105 | consistent with the full freedom of use specified in this license. 106 | 107 | Most GNU software, including some libraries, is covered by the 108 | ordinary GNU General Public License. This license, the GNU Lesser 109 | General Public License, applies to certain designated libraries, and 110 | is quite different from the ordinary General Public License. We use 111 | this license for certain libraries in order to permit linking those 112 | libraries into non-free programs. 113 | 114 | When a program is linked with a library, whether statically or using 115 | a shared library, the combination of the two is legally speaking a 116 | combined work, a derivative of the original library. The ordinary 117 | General Public License therefore permits such linking only if the 118 | entire combination fits its criteria of freedom. The Lesser General 119 | Public License permits more lax criteria for linking other code with 120 | the library. 121 | 122 | We call this license the "Lesser" General Public License because it 123 | does Less to protect the user's freedom than the ordinary General 124 | Public License. It also provides other free software developers Less 125 | of an advantage over competing non-free programs. These disadvantages 126 | are the reason we use the ordinary General Public License for many 127 | libraries. However, the Lesser license provides advantages in certain 128 | special circumstances. 129 | 130 | For example, on rare occasions, there may be a special need to 131 | encourage the widest possible use of a certain library, so that it 132 | becomes a de-facto standard. To achieve this, non-free programs must 133 | be allowed to use the library. A more frequent case is that a free 134 | library does the same job as widely used non-free libraries. In this 135 | case, there is little to gain by limiting the free library to free 136 | software only, so we use the Lesser General Public License. 137 | 138 | In other cases, permission to use a particular library in non-free 139 | programs enables a greater number of people to use a large body of 140 | free software. For example, permission to use the GNU C Library in 141 | non-free programs enables many more people to use the whole GNU 142 | operating system, as well as its variant, the GNU/Linux operating 143 | system. 144 | 145 | Although the Lesser General Public License is Less protective of the 146 | users' freedom, it does ensure that the user of a program that is 147 | linked with the Library has the freedom and the wherewithal to run 148 | that program using a modified version of the Library. 149 | 150 | The precise terms and conditions for copying, distribution and 151 | modification follow. Pay close attention to the difference between a 152 | "work based on the library" and a "work that uses the library". The 153 | former contains code derived from the library, whereas the latter must 154 | be combined with the library in order to run. 155 | 156 | GNU LESSER GENERAL PUBLIC LICENSE 157 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 158 | 159 | 0. This License Agreement applies to any software library or other 160 | program which contains a notice placed by the copyright holder or 161 | other authorized party saying it may be distributed under the terms of 162 | this Lesser General Public License (also called "this License"). 163 | Each licensee is addressed as "you". 164 | 165 | A "library" means a collection of software functions and/or data 166 | prepared so as to be conveniently linked with application programs 167 | (which use some of those functions and data) to form executables. 168 | 169 | The "Library", below, refers to any such software library or work 170 | which has been distributed under these terms. A "work based on the 171 | Library" means either the Library or any derivative work under 172 | copyright law: that is to say, a work containing the Library or a 173 | portion of it, either verbatim or with modifications and/or translated 174 | straightforwardly into another language. (Hereinafter, translation is 175 | included without limitation in the term "modification".) 176 | 177 | "Source code" for a work means the preferred form of the work for 178 | making modifications to it. For a library, complete source code means 179 | all the source code for all modules it contains, plus any associated 180 | interface definition files, plus the scripts used to control 181 | compilation and installation of the library. 182 | 183 | Activities other than copying, distribution and modification are not 184 | covered by this License; they are outside its scope. The act of 185 | running a program using the Library is not restricted, and output from 186 | such a program is covered only if its contents constitute a work based 187 | on the Library (independent of the use of the Library in a tool for 188 | writing it). Whether that is true depends on what the Library does 189 | and what the program that uses the Library does. 190 | 191 | 1. You may copy and distribute verbatim copies of the Library's 192 | complete source code as you receive it, in any medium, provided that 193 | you conspicuously and appropriately publish on each copy an 194 | appropriate copyright notice and disclaimer of warranty; keep intact 195 | all the notices that refer to this License and to the absence of any 196 | warranty; and distribute a copy of this License along with the 197 | Library. 198 | 199 | You may charge a fee for the physical act of transferring a copy, 200 | and you may at your option offer warranty protection in exchange for a 201 | fee. 202 | 203 | 2. You may modify your copy or copies of the Library or any portion 204 | of it, thus forming a work based on the Library, and copy and 205 | distribute such modifications or work under the terms of Section 1 206 | above, provided that you also meet all of these conditions: 207 | 208 | a) The modified work must itself be a software library. 209 | 210 | b) You must cause the files modified to carry prominent notices 211 | stating that you changed the files and the date of any change. 212 | 213 | c) You must cause the whole of the work to be licensed at no 214 | charge to all third parties under the terms of this License. 215 | 216 | d) If a facility in the modified Library refers to a function or a 217 | table of data to be supplied by an application program that uses 218 | the facility, other than as an argument passed when the facility 219 | is invoked, then you must make a good faith effort to ensure that, 220 | in the event an application does not supply such function or 221 | table, the facility still operates, and performs whatever part of 222 | its purpose remains meaningful. 223 | 224 | (For example, a function in a library to compute square roots has 225 | a purpose that is entirely well-defined independent of the 226 | application. Therefore, Subsection 2d requires that any 227 | application-supplied function or table used by this function must 228 | be optional: if the application does not supply it, the square 229 | root function must still compute square roots.) 230 | 231 | These requirements apply to the modified work as a whole. If 232 | identifiable sections of that work are not derived from the Library, 233 | and can be reasonably considered independent and separate works in 234 | themselves, then this License, and its terms, do not apply to those 235 | sections when you distribute them as separate works. But when you 236 | distribute the same sections as part of a whole which is a work based 237 | on the Library, the distribution of the whole must be on the terms of 238 | this License, whose permissions for other licensees extend to the 239 | entire whole, and thus to each and every part regardless of who wrote 240 | it. 241 | 242 | Thus, it is not the intent of this section to claim rights or contest 243 | your rights to work written entirely by you; rather, the intent is to 244 | exercise the right to control the distribution of derivative or 245 | collective works based on the Library. 246 | 247 | In addition, mere aggregation of another work not based on the Library 248 | with the Library (or with a work based on the Library) on a volume of 249 | a storage or distribution medium does not bring the other work under 250 | the scope of this License. 251 | 252 | 3. You may opt to apply the terms of the ordinary GNU General Public 253 | License instead of this License to a given copy of the Library. To do 254 | this, you must alter all the notices that refer to this License, so 255 | that they refer to the ordinary GNU General Public License, version 2, 256 | instead of to this License. (If a newer version than version 2 of the 257 | ordinary GNU General Public License has appeared, then you can specify 258 | that version instead if you wish.) Do not make any other change in 259 | these notices. 260 | 261 | Once this change is made in a given copy, it is irreversible for 262 | that copy, so the ordinary GNU General Public License applies to all 263 | subsequent copies and derivative works made from that copy. 264 | 265 | This option is useful when you wish to copy part of the code of 266 | the Library into a program that is not a library. 267 | 268 | 4. You may copy and distribute the Library (or a portion or 269 | derivative of it, under Section 2) in object code or executable form 270 | under the terms of Sections 1 and 2 above provided that you accompany 271 | it with the complete corresponding machine-readable source code, which 272 | must be distributed under the terms of Sections 1 and 2 above on a 273 | medium customarily used for software interchange. 274 | 275 | If distribution of object code is made by offering access to copy 276 | from a designated place, then offering equivalent access to copy the 277 | source code from the same place satisfies the requirement to 278 | distribute the source code, even though third parties are not 279 | compelled to copy the source along with the object code. 280 | 281 | 5. A program that contains no derivative of any portion of the 282 | Library, but is designed to work with the Library by being compiled or 283 | linked with it, is called a "work that uses the Library". Such a 284 | work, in isolation, is not a derivative work of the Library, and 285 | therefore falls outside the scope of this License. 286 | 287 | However, linking a "work that uses the Library" with the Library 288 | creates an executable that is a derivative of the Library (because it 289 | contains portions of the Library), rather than a "work that uses the 290 | library". The executable is therefore covered by this License. 291 | Section 6 states terms for distribution of such executables. 292 | 293 | When a "work that uses the Library" uses material from a header file 294 | that is part of the Library, the object code for the work may be a 295 | derivative work of the Library even though the source code is not. 296 | Whether this is true is especially significant if the work can be 297 | linked without the Library, or if the work is itself a library. The 298 | threshold for this to be true is not precisely defined by law. 299 | 300 | If such an object file uses only numerical parameters, data 301 | structure layouts and accessors, and small macros and small inline 302 | functions (ten lines or less in length), then the use of the object 303 | file is unrestricted, regardless of whether it is legally a derivative 304 | work. (Executables containing this object code plus portions of the 305 | Library will still fall under Section 6.) 306 | 307 | Otherwise, if the work is a derivative of the Library, you may 308 | distribute the object code for the work under the terms of Section 6. 309 | Any executables containing that work also fall under Section 6, 310 | whether or not they are linked directly with the Library itself. 311 | 312 | 6. As an exception to the Sections above, you may also combine or 313 | link a "work that uses the Library" with the Library to produce a 314 | work containing portions of the Library, and distribute that work 315 | under terms of your choice, provided that the terms permit 316 | modification of the work for the customer's own use and reverse 317 | engineering for debugging such modifications. 318 | 319 | You must give prominent notice with each copy of the work that the 320 | Library is used in it and that the Library and its use are covered by 321 | this License. You must supply a copy of this License. If the work 322 | during execution displays copyright notices, you must include the 323 | copyright notice for the Library among them, as well as a reference 324 | directing the user to the copy of this License. Also, you must do one 325 | of these things: 326 | 327 | a) Accompany the work with the complete corresponding 328 | machine-readable source code for the Library including whatever 329 | changes were used in the work (which must be distributed under 330 | Sections 1 and 2 above); and, if the work is an executable linked 331 | with the Library, with the complete machine-readable "work that 332 | uses the Library", as object code and/or source code, so that the 333 | user can modify the Library and then relink to produce a modified 334 | executable containing the modified Library. (It is understood 335 | that the user who changes the contents of definitions files in the 336 | Library will not necessarily be able to recompile the application 337 | to use the modified definitions.) 338 | 339 | b) Use a suitable shared library mechanism for linking with the 340 | Library. A suitable mechanism is one that (1) uses at run time a 341 | copy of the library already present on the user's computer system, 342 | rather than copying library functions into the executable, and (2) 343 | will operate properly with a modified version of the library, if 344 | the user installs one, as long as the modified version is 345 | interface-compatible with the version that the work was made with. 346 | 347 | c) Accompany the work with a written offer, valid for at least 348 | three years, to give the same user the materials specified in 349 | Subsection 6a, above, for a charge no more than the cost of 350 | performing this distribution. 351 | 352 | d) If distribution of the work is made by offering access to copy 353 | from a designated place, offer equivalent access to copy the above 354 | specified materials from the same place. 355 | 356 | e) Verify that the user has already received a copy of these 357 | materials or that you have already sent this user a copy. 358 | 359 | For an executable, the required form of the "work that uses the 360 | Library" must include any data and utility programs needed for 361 | reproducing the executable from it. However, as a special exception, 362 | the materials to be distributed need not include anything that is 363 | normally distributed (in either source or binary form) with the major 364 | components (compiler, kernel, and so on) of the operating system on 365 | which the executable runs, unless that component itself accompanies 366 | the executable. 367 | 368 | It may happen that this requirement contradicts the license 369 | restrictions of other proprietary libraries that do not normally 370 | accompany the operating system. Such a contradiction means you cannot 371 | use both them and the Library together in an executable that you 372 | distribute. 373 | 374 | 7. You may place library facilities that are a work based on the 375 | Library side-by-side in a single library together with other library 376 | facilities not covered by this License, and distribute such a combined 377 | library, provided that the separate distribution of the work based on 378 | the Library and of the other library facilities is otherwise 379 | permitted, and provided that you do these two things: 380 | 381 | a) Accompany the combined library with a copy of the same work 382 | based on the Library, uncombined with any other library 383 | facilities. This must be distributed under the terms of the 384 | Sections above. 385 | 386 | b) Give prominent notice with the combined library of the fact 387 | that part of it is a work based on the Library, and explaining 388 | where to find the accompanying uncombined form of the same work. 389 | 390 | 8. You may not copy, modify, sublicense, link with, or distribute 391 | the Library except as expressly provided under this License. Any 392 | attempt otherwise to copy, modify, sublicense, link with, or 393 | distribute the Library is void, and will automatically terminate your 394 | rights under this License. However, parties who have received copies, 395 | or rights, from you under this License will not have their licenses 396 | terminated so long as such parties remain in full compliance. 397 | 398 | 9. You are not required to accept this License, since you have not 399 | signed it. However, nothing else grants you permission to modify or 400 | distribute the Library or its derivative works. These actions are 401 | prohibited by law if you do not accept this License. Therefore, by 402 | modifying or distributing the Library (or any work based on the 403 | Library), you indicate your acceptance of this License to do so, and 404 | all its terms and conditions for copying, distributing or modifying 405 | the Library or works based on it. 406 | 407 | 10. Each time you redistribute the Library (or any work based on the 408 | Library), the recipient automatically receives a license from the 409 | original licensor to copy, distribute, link with or modify the Library 410 | subject to these terms and conditions. You may not impose any further 411 | restrictions on the recipients' exercise of the rights granted herein. 412 | You are not responsible for enforcing compliance by third parties with 413 | this License. 414 | 415 | 11. If, as a consequence of a court judgment or allegation of patent 416 | infringement or for any other reason (not limited to patent issues), 417 | conditions are imposed on you (whether by court order, agreement or 418 | otherwise) that contradict the conditions of this License, they do not 419 | excuse you from the conditions of this License. If you cannot 420 | distribute so as to satisfy simultaneously your obligations under this 421 | License and any other pertinent obligations, then as a consequence you 422 | may not distribute the Library at all. For example, if a patent 423 | license would not permit royalty-free redistribution of the Library by 424 | all those who receive copies directly or indirectly through you, then 425 | the only way you could satisfy both it and this License would be to 426 | refrain entirely from distribution of the Library. 427 | 428 | If any portion of this section is held invalid or unenforceable under 429 | any particular circumstance, the balance of the section is intended to 430 | apply, and the section as a whole is intended to apply in other 431 | circumstances. 432 | 433 | It is not the purpose of this section to induce you to infringe any 434 | patents or other property right claims or to contest validity of any 435 | such claims; this section has the sole purpose of protecting the 436 | integrity of the free software distribution system which is 437 | implemented by public license practices. Many people have made 438 | generous contributions to the wide range of software distributed 439 | through that system in reliance on consistent application of that 440 | system; it is up to the author/donor to decide if he or she is willing 441 | to distribute software through any other system and a licensee cannot 442 | impose that choice. 443 | 444 | This section is intended to make thoroughly clear what is believed to 445 | be a consequence of the rest of this License. 446 | 447 | 12. If the distribution and/or use of the Library is restricted in 448 | certain countries either by patents or by copyrighted interfaces, the 449 | original copyright holder who places the Library under this License 450 | may add an explicit geographical distribution limitation excluding those 451 | countries, so that distribution is permitted only in or among 452 | countries not thus excluded. In such case, this License incorporates 453 | the limitation as if written in the body of this License. 454 | 455 | 13. The Free Software Foundation may publish revised and/or new 456 | versions of the Lesser General Public License from time to time. 457 | Such new versions will be similar in spirit to the present version, 458 | but may differ in detail to address new problems or concerns. 459 | 460 | Each version is given a distinguishing version number. If the Library 461 | specifies a version number of this License which applies to it and 462 | "any later version", you have the option of following the terms and 463 | conditions either of that version or of any later version published by 464 | the Free Software Foundation. If the Library does not specify a 465 | license version number, you may choose any version ever published by 466 | the Free Software Foundation. 467 | 468 | 14. If you wish to incorporate parts of the Library into other free 469 | programs whose distribution conditions are incompatible with these, 470 | write to the author to ask for permission. For software which is 471 | copyrighted by the Free Software Foundation, write to the Free 472 | Software Foundation; we sometimes make exceptions for this. Our 473 | decision will be guided by the two goals of preserving the free status 474 | of all derivatives of our free software and of promoting the sharing 475 | and reuse of software generally. 476 | 477 | NO WARRANTY 478 | 479 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 480 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 481 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 482 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 483 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 484 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 485 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 486 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 487 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 488 | 489 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 490 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 491 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 492 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 493 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 494 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 495 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 496 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 497 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 498 | DAMAGES. 499 | 500 | END OF TERMS AND CONDITIONS 501 | 502 | How to Apply These Terms to Your New Libraries 503 | 504 | If you develop a new library, and you want it to be of the greatest 505 | possible use to the public, we recommend making it free software that 506 | everyone can redistribute and change. You can do so by permitting 507 | redistribution under these terms (or, alternatively, under the terms 508 | of the ordinary General Public License). 509 | 510 | To apply these terms, attach the following notices to the library. 511 | It is safest to attach them to the start of each source file to most 512 | effectively convey the exclusion of warranty; and each file should 513 | have at least the "copyright" line and a pointer to where the full 514 | notice is found. 515 | 516 | 517 | 518 | Copyright (C) 519 | 520 | This library is free software; you can redistribute it and/or 521 | modify it under the terms of the GNU Lesser General Public 522 | License as published by the Free Software Foundation; either 523 | version 2.1 of the License, or (at your option) any later version. 524 | 525 | This library is distributed in the hope that it will be useful, 526 | but WITHOUT ANY WARRANTY; without even the implied warranty of 527 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 528 | Lesser General Public License for more details. 529 | 530 | You should have received a copy of the GNU Lesser General Public 531 | License along with this library; if not, write to the Free Software 532 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 533 | 534 | Also add information on how to contact you by electronic and paper mail. 535 | 536 | You should also get your employer (if you work as a programmer) or 537 | your school, if any, to sign a "copyright disclaimer" for the library, 538 | if necessary. Here is a sample; alter the names: 539 | 540 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 541 | library `Frob' (a library for tweaking knobs) written by James 542 | Random Hacker. 543 | 544 | , 1 April 1990 545 | Ty Coon, President of Vice 546 | 547 | That's all there is to it! 548 | 549 | 550 | ========================================= 551 | END OF htable NOTICES AND INFORMATION 552 | 553 | %% libtsm NOTICES AND INFORMATION BEGIN HERE 554 | ========================================= 555 | = Authors = 556 | 557 | This software was written by: 558 | Aetf 559 | David Herrmann 560 | Fredrik Wikstrom 561 | Ran Benita 562 | 563 | = Copyright Notice = 564 | 565 | This software is licensed under the terms of the MIT license. Please see each 566 | source file for the related copyright notice and license. 567 | 568 | If a file does not contain a copright notice, the following license shall 569 | apply: 570 | 571 | Copyright (c) 2019-2020 Fredrik Wikstrom 572 | Copyright (c) 2017-2018 Aetf 573 | Copyright (c) 2011-2013 David Herrmann 574 | 575 | Permission is hereby granted, free of charge, to any person obtaining 576 | a copy of this software and associated documentation files 577 | (the "Software"), to deal in the Software without restriction, including 578 | without limitation the rights to use, copy, modify, merge, publish, 579 | distribute, sublicense, and/or sell copies of the Software, and to 580 | permit persons to whom the Software is furnished to do so, subject to 581 | the following conditions: 582 | 583 | The above copyright notice and this permission notice shall be included 584 | in all copies or substantial portions of the Software. 585 | 586 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 587 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 588 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 589 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 590 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 591 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 592 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 593 | 594 | == Third-Party Source == 595 | The hash-table implementation in src/shared/shl-htable.* uses internally the 596 | htable from CCAN, see LICENSE_htable. 597 | 598 | The wcwidth() implementation in ./external/wcwidth is from 599 | 600 | Copyright (C) Fredrik Fornwall 2016. 601 | Distributed under the MIT License. 602 | 603 | Implementation of wcwidth(3) as a C port of: 604 | https://github.com/jquast/wcwidth 605 | 606 | Report issues at: 607 | https://github.com/termux/wcwidth 608 | 609 | UCS-4 to UTF-8 encoding is copied from "terminology": 610 | 611 | Copyright (C) 2012-2012 Carsten Haitzler and various contributors 612 | 613 | All rights reserved. 614 | 615 | Redistribution and use in source and binary forms, with or without 616 | modification, are permitted provided that the following conditions are 617 | met: 618 | 619 | 1. Redistributions of source code must retain the above copyright 620 | notice, this list of conditions and the following disclaimer. 621 | 2. Redistributions in binary form must reproduce the above copyright 622 | notice, this list of conditions and the following disclaimer in the 623 | documentation and/or other materials provided with the distribution. 624 | 625 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 626 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 627 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 628 | THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 629 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 630 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 631 | USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 632 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 633 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 634 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 635 | 636 | The "solarized" color palettes in tsm_vte.c are from: 637 | 638 | Copyright (c) 2011 Ethan Schoonover 639 | 640 | Permission is hereby granted, free of charge, to any person obtaining a copy 641 | of this software and associated documentation files (the "Software"), to deal 642 | in the Software without restriction, including without limitation the rights 643 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 644 | copies of the Software, and to permit persons to whom the Software is 645 | furnished to do so, subject to the following conditions: 646 | 647 | The above copyright notice and this permission notice shall be included in 648 | all copies or substantial portions of the Software. 649 | 650 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 651 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 652 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 653 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 654 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 655 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 656 | THE SOFTWARE. 657 | ========================================= 658 | END OF libtsm NOTICES AND INFORMATION 659 | 660 | %% wcwidth NOTICES AND INFORMATION BEGIN HERE 661 | ========================================= 662 | This project is licensed for use as follows: 663 | 664 | """ 665 | The MIT License (MIT) 666 | 667 | Copyright (c) 2016 Fredrik Fornwall 668 | 669 | Permission is hereby granted, free of charge, to any person obtaining a copy 670 | of this software and associated documentation files (the "Software"), to deal 671 | in the Software without restriction, including without limitation the rights 672 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 673 | copies of the Software, and to permit persons to whom the Software is 674 | furnished to do so, subject to the following conditions: 675 | 676 | The above copyright notice and this permission notice shall be included in all 677 | copies or substantial portions of the Software. 678 | 679 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 680 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 681 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 682 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 683 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 684 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 685 | SOFTWARE. 686 | """ 687 | 688 | This license applies to parts originating from the 689 | https://github.com/jquast/wcwidth repository: 690 | 691 | """ 692 | The MIT License (MIT) 693 | 694 | Copyright (c) 2014 Jeff Quast 695 | 696 | Permission is hereby granted, free of charge, to any person obtaining a copy 697 | of this software and associated documentation files (the "Software"), to deal 698 | in the Software without restriction, including without limitation the rights 699 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 700 | copies of the Software, and to permit persons to whom the Software is 701 | furnished to do so, subject to the following conditions: 702 | 703 | The above copyright notice and this permission notice shall be included in all 704 | copies or substantial portions of the Software. 705 | 706 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 707 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 708 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 709 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 710 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 711 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 712 | SOFTWARE. 713 | """ 714 | ========================================= 715 | END OF wcwidth NOTICES AND INFORMATION 716 | -------------------------------------------------------------------------------- /addons/godot_xterm/THIRDPARTY_NOTICES.txt: -------------------------------------------------------------------------------- 1 | THIRD-PARTY SOFTWARE NOTICES AND INFORMATION 2 | 3 | The GodotXterm project incorporates components from the projects listed below. 4 | The original copyright notices and the licenses under which GodotXterm received such components are set forth below. 5 | 6 | 1. godot-cpp 7 | 2. htable 8 | 3. libtsm 9 | 4. libuv 10 | 5. node-pty 11 | 6. tmux 12 | 7. wcwidth 13 | 14 | 15 | %% godot-cpp NOTICES AND INFORMATION BEGIN HERE 16 | ========================================= 17 | # MIT License 18 | 19 | Copyright (c) 2017-present Godot Engine contributors. 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | ========================================= 39 | END OF godot-cpp NOTICES AND INFORMATION 40 | 41 | %% htable NOTICES AND INFORMATION BEGIN HERE 42 | ========================================= 43 | 44 | GNU LESSER GENERAL PUBLIC LICENSE 45 | Version 2.1, February 1999 46 | 47 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 48 | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 49 | Everyone is permitted to copy and distribute verbatim copies 50 | of this license document, but changing it is not allowed. 51 | 52 | [This is the first released version of the Lesser GPL. It also counts 53 | as the successor of the GNU Library Public License, version 2, hence 54 | the version number 2.1.] 55 | 56 | Preamble 57 | 58 | The licenses for most software are designed to take away your 59 | freedom to share and change it. By contrast, the GNU General Public 60 | Licenses are intended to guarantee your freedom to share and change 61 | free software--to make sure the software is free for all its users. 62 | 63 | This license, the Lesser General Public License, applies to some 64 | specially designated software packages--typically libraries--of the 65 | Free Software Foundation and other authors who decide to use it. You 66 | can use it too, but we suggest you first think carefully about whether 67 | this license or the ordinary General Public License is the better 68 | strategy to use in any particular case, based on the explanations 69 | below. 70 | 71 | When we speak of free software, we are referring to freedom of use, 72 | not price. Our General Public Licenses are designed to make sure that 73 | you have the freedom to distribute copies of free software (and charge 74 | for this service if you wish); that you receive source code or can get 75 | it if you want it; that you can change the software and use pieces of 76 | it in new free programs; and that you are informed that you can do 77 | these things. 78 | 79 | To protect your rights, we need to make restrictions that forbid 80 | distributors to deny you these rights or to ask you to surrender these 81 | rights. These restrictions translate to certain responsibilities for 82 | you if you distribute copies of the library or if you modify it. 83 | 84 | For example, if you distribute copies of the library, whether gratis 85 | or for a fee, you must give the recipients all the rights that we gave 86 | you. You must make sure that they, too, receive or can get the source 87 | code. If you link other code with the library, you must provide 88 | complete object files to the recipients, so that they can relink them 89 | with the library after making changes to the library and recompiling 90 | it. And you must show them these terms so they know their rights. 91 | 92 | We protect your rights with a two-step method: (1) we copyright the 93 | library, and (2) we offer you this license, which gives you legal 94 | permission to copy, distribute and/or modify the library. 95 | 96 | To protect each distributor, we want to make it very clear that 97 | there is no warranty for the free library. Also, if the library is 98 | modified by someone else and passed on, the recipients should know 99 | that what they have is not the original version, so that the original 100 | author's reputation will not be affected by problems that might be 101 | introduced by others. 102 | 103 | Finally, software patents pose a constant threat to the existence of 104 | any free program. We wish to make sure that a company cannot 105 | effectively restrict the users of a free program by obtaining a 106 | restrictive license from a patent holder. Therefore, we insist that 107 | any patent license obtained for a version of the library must be 108 | consistent with the full freedom of use specified in this license. 109 | 110 | Most GNU software, including some libraries, is covered by the 111 | ordinary GNU General Public License. This license, the GNU Lesser 112 | General Public License, applies to certain designated libraries, and 113 | is quite different from the ordinary General Public License. We use 114 | this license for certain libraries in order to permit linking those 115 | libraries into non-free programs. 116 | 117 | When a program is linked with a library, whether statically or using 118 | a shared library, the combination of the two is legally speaking a 119 | combined work, a derivative of the original library. The ordinary 120 | General Public License therefore permits such linking only if the 121 | entire combination fits its criteria of freedom. The Lesser General 122 | Public License permits more lax criteria for linking other code with 123 | the library. 124 | 125 | We call this license the "Lesser" General Public License because it 126 | does Less to protect the user's freedom than the ordinary General 127 | Public License. It also provides other free software developers Less 128 | of an advantage over competing non-free programs. These disadvantages 129 | are the reason we use the ordinary General Public License for many 130 | libraries. However, the Lesser license provides advantages in certain 131 | special circumstances. 132 | 133 | For example, on rare occasions, there may be a special need to 134 | encourage the widest possible use of a certain library, so that it 135 | becomes a de-facto standard. To achieve this, non-free programs must 136 | be allowed to use the library. A more frequent case is that a free 137 | library does the same job as widely used non-free libraries. In this 138 | case, there is little to gain by limiting the free library to free 139 | software only, so we use the Lesser General Public License. 140 | 141 | In other cases, permission to use a particular library in non-free 142 | programs enables a greater number of people to use a large body of 143 | free software. For example, permission to use the GNU C Library in 144 | non-free programs enables many more people to use the whole GNU 145 | operating system, as well as its variant, the GNU/Linux operating 146 | system. 147 | 148 | Although the Lesser General Public License is Less protective of the 149 | users' freedom, it does ensure that the user of a program that is 150 | linked with the Library has the freedom and the wherewithal to run 151 | that program using a modified version of the Library. 152 | 153 | The precise terms and conditions for copying, distribution and 154 | modification follow. Pay close attention to the difference between a 155 | "work based on the library" and a "work that uses the library". The 156 | former contains code derived from the library, whereas the latter must 157 | be combined with the library in order to run. 158 | 159 | GNU LESSER GENERAL PUBLIC LICENSE 160 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 161 | 162 | 0. This License Agreement applies to any software library or other 163 | program which contains a notice placed by the copyright holder or 164 | other authorized party saying it may be distributed under the terms of 165 | this Lesser General Public License (also called "this License"). 166 | Each licensee is addressed as "you". 167 | 168 | A "library" means a collection of software functions and/or data 169 | prepared so as to be conveniently linked with application programs 170 | (which use some of those functions and data) to form executables. 171 | 172 | The "Library", below, refers to any such software library or work 173 | which has been distributed under these terms. A "work based on the 174 | Library" means either the Library or any derivative work under 175 | copyright law: that is to say, a work containing the Library or a 176 | portion of it, either verbatim or with modifications and/or translated 177 | straightforwardly into another language. (Hereinafter, translation is 178 | included without limitation in the term "modification".) 179 | 180 | "Source code" for a work means the preferred form of the work for 181 | making modifications to it. For a library, complete source code means 182 | all the source code for all modules it contains, plus any associated 183 | interface definition files, plus the scripts used to control 184 | compilation and installation of the library. 185 | 186 | Activities other than copying, distribution and modification are not 187 | covered by this License; they are outside its scope. The act of 188 | running a program using the Library is not restricted, and output from 189 | such a program is covered only if its contents constitute a work based 190 | on the Library (independent of the use of the Library in a tool for 191 | writing it). Whether that is true depends on what the Library does 192 | and what the program that uses the Library does. 193 | 194 | 1. You may copy and distribute verbatim copies of the Library's 195 | complete source code as you receive it, in any medium, provided that 196 | you conspicuously and appropriately publish on each copy an 197 | appropriate copyright notice and disclaimer of warranty; keep intact 198 | all the notices that refer to this License and to the absence of any 199 | warranty; and distribute a copy of this License along with the 200 | Library. 201 | 202 | You may charge a fee for the physical act of transferring a copy, 203 | and you may at your option offer warranty protection in exchange for a 204 | fee. 205 | 206 | 2. You may modify your copy or copies of the Library or any portion 207 | of it, thus forming a work based on the Library, and copy and 208 | distribute such modifications or work under the terms of Section 1 209 | above, provided that you also meet all of these conditions: 210 | 211 | a) The modified work must itself be a software library. 212 | 213 | b) You must cause the files modified to carry prominent notices 214 | stating that you changed the files and the date of any change. 215 | 216 | c) You must cause the whole of the work to be licensed at no 217 | charge to all third parties under the terms of this License. 218 | 219 | d) If a facility in the modified Library refers to a function or a 220 | table of data to be supplied by an application program that uses 221 | the facility, other than as an argument passed when the facility 222 | is invoked, then you must make a good faith effort to ensure that, 223 | in the event an application does not supply such function or 224 | table, the facility still operates, and performs whatever part of 225 | its purpose remains meaningful. 226 | 227 | (For example, a function in a library to compute square roots has 228 | a purpose that is entirely well-defined independent of the 229 | application. Therefore, Subsection 2d requires that any 230 | application-supplied function or table used by this function must 231 | be optional: if the application does not supply it, the square 232 | root function must still compute square roots.) 233 | 234 | These requirements apply to the modified work as a whole. If 235 | identifiable sections of that work are not derived from the Library, 236 | and can be reasonably considered independent and separate works in 237 | themselves, then this License, and its terms, do not apply to those 238 | sections when you distribute them as separate works. But when you 239 | distribute the same sections as part of a whole which is a work based 240 | on the Library, the distribution of the whole must be on the terms of 241 | this License, whose permissions for other licensees extend to the 242 | entire whole, and thus to each and every part regardless of who wrote 243 | it. 244 | 245 | Thus, it is not the intent of this section to claim rights or contest 246 | your rights to work written entirely by you; rather, the intent is to 247 | exercise the right to control the distribution of derivative or 248 | collective works based on the Library. 249 | 250 | In addition, mere aggregation of another work not based on the Library 251 | with the Library (or with a work based on the Library) on a volume of 252 | a storage or distribution medium does not bring the other work under 253 | the scope of this License. 254 | 255 | 3. You may opt to apply the terms of the ordinary GNU General Public 256 | License instead of this License to a given copy of the Library. To do 257 | this, you must alter all the notices that refer to this License, so 258 | that they refer to the ordinary GNU General Public License, version 2, 259 | instead of to this License. (If a newer version than version 2 of the 260 | ordinary GNU General Public License has appeared, then you can specify 261 | that version instead if you wish.) Do not make any other change in 262 | these notices. 263 | 264 | Once this change is made in a given copy, it is irreversible for 265 | that copy, so the ordinary GNU General Public License applies to all 266 | subsequent copies and derivative works made from that copy. 267 | 268 | This option is useful when you wish to copy part of the code of 269 | the Library into a program that is not a library. 270 | 271 | 4. You may copy and distribute the Library (or a portion or 272 | derivative of it, under Section 2) in object code or executable form 273 | under the terms of Sections 1 and 2 above provided that you accompany 274 | it with the complete corresponding machine-readable source code, which 275 | must be distributed under the terms of Sections 1 and 2 above on a 276 | medium customarily used for software interchange. 277 | 278 | If distribution of object code is made by offering access to copy 279 | from a designated place, then offering equivalent access to copy the 280 | source code from the same place satisfies the requirement to 281 | distribute the source code, even though third parties are not 282 | compelled to copy the source along with the object code. 283 | 284 | 5. A program that contains no derivative of any portion of the 285 | Library, but is designed to work with the Library by being compiled or 286 | linked with it, is called a "work that uses the Library". Such a 287 | work, in isolation, is not a derivative work of the Library, and 288 | therefore falls outside the scope of this License. 289 | 290 | However, linking a "work that uses the Library" with the Library 291 | creates an executable that is a derivative of the Library (because it 292 | contains portions of the Library), rather than a "work that uses the 293 | library". The executable is therefore covered by this License. 294 | Section 6 states terms for distribution of such executables. 295 | 296 | When a "work that uses the Library" uses material from a header file 297 | that is part of the Library, the object code for the work may be a 298 | derivative work of the Library even though the source code is not. 299 | Whether this is true is especially significant if the work can be 300 | linked without the Library, or if the work is itself a library. The 301 | threshold for this to be true is not precisely defined by law. 302 | 303 | If such an object file uses only numerical parameters, data 304 | structure layouts and accessors, and small macros and small inline 305 | functions (ten lines or less in length), then the use of the object 306 | file is unrestricted, regardless of whether it is legally a derivative 307 | work. (Executables containing this object code plus portions of the 308 | Library will still fall under Section 6.) 309 | 310 | Otherwise, if the work is a derivative of the Library, you may 311 | distribute the object code for the work under the terms of Section 6. 312 | Any executables containing that work also fall under Section 6, 313 | whether or not they are linked directly with the Library itself. 314 | 315 | 6. As an exception to the Sections above, you may also combine or 316 | link a "work that uses the Library" with the Library to produce a 317 | work containing portions of the Library, and distribute that work 318 | under terms of your choice, provided that the terms permit 319 | modification of the work for the customer's own use and reverse 320 | engineering for debugging such modifications. 321 | 322 | You must give prominent notice with each copy of the work that the 323 | Library is used in it and that the Library and its use are covered by 324 | this License. You must supply a copy of this License. If the work 325 | during execution displays copyright notices, you must include the 326 | copyright notice for the Library among them, as well as a reference 327 | directing the user to the copy of this License. Also, you must do one 328 | of these things: 329 | 330 | a) Accompany the work with the complete corresponding 331 | machine-readable source code for the Library including whatever 332 | changes were used in the work (which must be distributed under 333 | Sections 1 and 2 above); and, if the work is an executable linked 334 | with the Library, with the complete machine-readable "work that 335 | uses the Library", as object code and/or source code, so that the 336 | user can modify the Library and then relink to produce a modified 337 | executable containing the modified Library. (It is understood 338 | that the user who changes the contents of definitions files in the 339 | Library will not necessarily be able to recompile the application 340 | to use the modified definitions.) 341 | 342 | b) Use a suitable shared library mechanism for linking with the 343 | Library. A suitable mechanism is one that (1) uses at run time a 344 | copy of the library already present on the user's computer system, 345 | rather than copying library functions into the executable, and (2) 346 | will operate properly with a modified version of the library, if 347 | the user installs one, as long as the modified version is 348 | interface-compatible with the version that the work was made with. 349 | 350 | c) Accompany the work with a written offer, valid for at least 351 | three years, to give the same user the materials specified in 352 | Subsection 6a, above, for a charge no more than the cost of 353 | performing this distribution. 354 | 355 | d) If distribution of the work is made by offering access to copy 356 | from a designated place, offer equivalent access to copy the above 357 | specified materials from the same place. 358 | 359 | e) Verify that the user has already received a copy of these 360 | materials or that you have already sent this user a copy. 361 | 362 | For an executable, the required form of the "work that uses the 363 | Library" must include any data and utility programs needed for 364 | reproducing the executable from it. However, as a special exception, 365 | the materials to be distributed need not include anything that is 366 | normally distributed (in either source or binary form) with the major 367 | components (compiler, kernel, and so on) of the operating system on 368 | which the executable runs, unless that component itself accompanies 369 | the executable. 370 | 371 | It may happen that this requirement contradicts the license 372 | restrictions of other proprietary libraries that do not normally 373 | accompany the operating system. Such a contradiction means you cannot 374 | use both them and the Library together in an executable that you 375 | distribute. 376 | 377 | 7. You may place library facilities that are a work based on the 378 | Library side-by-side in a single library together with other library 379 | facilities not covered by this License, and distribute such a combined 380 | library, provided that the separate distribution of the work based on 381 | the Library and of the other library facilities is otherwise 382 | permitted, and provided that you do these two things: 383 | 384 | a) Accompany the combined library with a copy of the same work 385 | based on the Library, uncombined with any other library 386 | facilities. This must be distributed under the terms of the 387 | Sections above. 388 | 389 | b) Give prominent notice with the combined library of the fact 390 | that part of it is a work based on the Library, and explaining 391 | where to find the accompanying uncombined form of the same work. 392 | 393 | 8. You may not copy, modify, sublicense, link with, or distribute 394 | the Library except as expressly provided under this License. Any 395 | attempt otherwise to copy, modify, sublicense, link with, or 396 | distribute the Library is void, and will automatically terminate your 397 | rights under this License. However, parties who have received copies, 398 | or rights, from you under this License will not have their licenses 399 | terminated so long as such parties remain in full compliance. 400 | 401 | 9. You are not required to accept this License, since you have not 402 | signed it. However, nothing else grants you permission to modify or 403 | distribute the Library or its derivative works. These actions are 404 | prohibited by law if you do not accept this License. Therefore, by 405 | modifying or distributing the Library (or any work based on the 406 | Library), you indicate your acceptance of this License to do so, and 407 | all its terms and conditions for copying, distributing or modifying 408 | the Library or works based on it. 409 | 410 | 10. Each time you redistribute the Library (or any work based on the 411 | Library), the recipient automatically receives a license from the 412 | original licensor to copy, distribute, link with or modify the Library 413 | subject to these terms and conditions. You may not impose any further 414 | restrictions on the recipients' exercise of the rights granted herein. 415 | You are not responsible for enforcing compliance by third parties with 416 | this License. 417 | 418 | 11. If, as a consequence of a court judgment or allegation of patent 419 | infringement or for any other reason (not limited to patent issues), 420 | conditions are imposed on you (whether by court order, agreement or 421 | otherwise) that contradict the conditions of this License, they do not 422 | excuse you from the conditions of this License. If you cannot 423 | distribute so as to satisfy simultaneously your obligations under this 424 | License and any other pertinent obligations, then as a consequence you 425 | may not distribute the Library at all. For example, if a patent 426 | license would not permit royalty-free redistribution of the Library by 427 | all those who receive copies directly or indirectly through you, then 428 | the only way you could satisfy both it and this License would be to 429 | refrain entirely from distribution of the Library. 430 | 431 | If any portion of this section is held invalid or unenforceable under 432 | any particular circumstance, the balance of the section is intended to 433 | apply, and the section as a whole is intended to apply in other 434 | circumstances. 435 | 436 | It is not the purpose of this section to induce you to infringe any 437 | patents or other property right claims or to contest validity of any 438 | such claims; this section has the sole purpose of protecting the 439 | integrity of the free software distribution system which is 440 | implemented by public license practices. Many people have made 441 | generous contributions to the wide range of software distributed 442 | through that system in reliance on consistent application of that 443 | system; it is up to the author/donor to decide if he or she is willing 444 | to distribute software through any other system and a licensee cannot 445 | impose that choice. 446 | 447 | This section is intended to make thoroughly clear what is believed to 448 | be a consequence of the rest of this License. 449 | 450 | 12. If the distribution and/or use of the Library is restricted in 451 | certain countries either by patents or by copyrighted interfaces, the 452 | original copyright holder who places the Library under this License 453 | may add an explicit geographical distribution limitation excluding those 454 | countries, so that distribution is permitted only in or among 455 | countries not thus excluded. In such case, this License incorporates 456 | the limitation as if written in the body of this License. 457 | 458 | 13. The Free Software Foundation may publish revised and/or new 459 | versions of the Lesser General Public License from time to time. 460 | Such new versions will be similar in spirit to the present version, 461 | but may differ in detail to address new problems or concerns. 462 | 463 | Each version is given a distinguishing version number. If the Library 464 | specifies a version number of this License which applies to it and 465 | "any later version", you have the option of following the terms and 466 | conditions either of that version or of any later version published by 467 | the Free Software Foundation. If the Library does not specify a 468 | license version number, you may choose any version ever published by 469 | the Free Software Foundation. 470 | 471 | 14. If you wish to incorporate parts of the Library into other free 472 | programs whose distribution conditions are incompatible with these, 473 | write to the author to ask for permission. For software which is 474 | copyrighted by the Free Software Foundation, write to the Free 475 | Software Foundation; we sometimes make exceptions for this. Our 476 | decision will be guided by the two goals of preserving the free status 477 | of all derivatives of our free software and of promoting the sharing 478 | and reuse of software generally. 479 | 480 | NO WARRANTY 481 | 482 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 483 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 484 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 485 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 486 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 487 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 488 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 489 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 490 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 491 | 492 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 493 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 494 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 495 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 496 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 497 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 498 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 499 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 500 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 501 | DAMAGES. 502 | 503 | END OF TERMS AND CONDITIONS 504 | 505 | How to Apply These Terms to Your New Libraries 506 | 507 | If you develop a new library, and you want it to be of the greatest 508 | possible use to the public, we recommend making it free software that 509 | everyone can redistribute and change. You can do so by permitting 510 | redistribution under these terms (or, alternatively, under the terms 511 | of the ordinary General Public License). 512 | 513 | To apply these terms, attach the following notices to the library. 514 | It is safest to attach them to the start of each source file to most 515 | effectively convey the exclusion of warranty; and each file should 516 | have at least the "copyright" line and a pointer to where the full 517 | notice is found. 518 | 519 | 520 | 521 | Copyright (C) 522 | 523 | This library is free software; you can redistribute it and/or 524 | modify it under the terms of the GNU Lesser General Public 525 | License as published by the Free Software Foundation; either 526 | version 2.1 of the License, or (at your option) any later version. 527 | 528 | This library is distributed in the hope that it will be useful, 529 | but WITHOUT ANY WARRANTY; without even the implied warranty of 530 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 531 | Lesser General Public License for more details. 532 | 533 | You should have received a copy of the GNU Lesser General Public 534 | License along with this library; if not, write to the Free Software 535 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 536 | 537 | Also add information on how to contact you by electronic and paper mail. 538 | 539 | You should also get your employer (if you work as a programmer) or 540 | your school, if any, to sign a "copyright disclaimer" for the library, 541 | if necessary. Here is a sample; alter the names: 542 | 543 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 544 | library `Frob' (a library for tweaking knobs) written by James 545 | Random Hacker. 546 | 547 | , 1 April 1990 548 | Ty Coon, President of Vice 549 | 550 | That's all there is to it! 551 | 552 | 553 | ========================================= 554 | END OF htable NOTICES AND INFORMATION 555 | 556 | %% libtsm NOTICES AND INFORMATION BEGIN HERE 557 | ========================================= 558 | = Authors = 559 | 560 | This software was written by: 561 | Aetf 562 | David Herrmann 563 | Fredrik Wikstrom 564 | Ran Benita 565 | 566 | = Copyright Notice = 567 | 568 | This software is licensed under the terms of the MIT license. Please see each 569 | source file for the related copyright notice and license. 570 | 571 | If a file does not contain a copright notice, the following license shall 572 | apply: 573 | 574 | Copyright (c) 2019-2020 Fredrik Wikstrom 575 | Copyright (c) 2017-2018 Aetf 576 | Copyright (c) 2011-2013 David Herrmann 577 | 578 | Permission is hereby granted, free of charge, to any person obtaining 579 | a copy of this software and associated documentation files 580 | (the "Software"), to deal in the Software without restriction, including 581 | without limitation the rights to use, copy, modify, merge, publish, 582 | distribute, sublicense, and/or sell copies of the Software, and to 583 | permit persons to whom the Software is furnished to do so, subject to 584 | the following conditions: 585 | 586 | The above copyright notice and this permission notice shall be included 587 | in all copies or substantial portions of the Software. 588 | 589 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 590 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 591 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 592 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 593 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 594 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 595 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 596 | 597 | == Third-Party Source == 598 | The hash-table implementation in src/shared/shl-htable.* uses internally the 599 | htable from CCAN, see LICENSE_htable. 600 | 601 | The wcwidth() implementation in ./external/wcwidth is from 602 | 603 | Copyright (C) Fredrik Fornwall 2016. 604 | Distributed under the MIT License. 605 | 606 | Implementation of wcwidth(3) as a C port of: 607 | https://github.com/jquast/wcwidth 608 | 609 | Report issues at: 610 | https://github.com/termux/wcwidth 611 | 612 | UCS-4 to UTF-8 encoding is copied from "terminology": 613 | 614 | Copyright (C) 2012-2012 Carsten Haitzler and various contributors 615 | 616 | All rights reserved. 617 | 618 | Redistribution and use in source and binary forms, with or without 619 | modification, are permitted provided that the following conditions are 620 | met: 621 | 622 | 1. Redistributions of source code must retain the above copyright 623 | notice, this list of conditions and the following disclaimer. 624 | 2. Redistributions in binary form must reproduce the above copyright 625 | notice, this list of conditions and the following disclaimer in the 626 | documentation and/or other materials provided with the distribution. 627 | 628 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 629 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 630 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 631 | THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 632 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 633 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 634 | USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 635 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 636 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 637 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 638 | 639 | The "solarized" color palettes in tsm_vte.c are from: 640 | 641 | Copyright (c) 2011 Ethan Schoonover 642 | 643 | Permission is hereby granted, free of charge, to any person obtaining a copy 644 | of this software and associated documentation files (the "Software"), to deal 645 | in the Software without restriction, including without limitation the rights 646 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 647 | copies of the Software, and to permit persons to whom the Software is 648 | furnished to do so, subject to the following conditions: 649 | 650 | The above copyright notice and this permission notice shall be included in 651 | all copies or substantial portions of the Software. 652 | 653 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 654 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 655 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 656 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 657 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 658 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 659 | THE SOFTWARE. 660 | ========================================= 661 | END OF libtsm NOTICES AND INFORMATION 662 | 663 | %% libuv NOTICES AND INFORMATION BEGIN HERE 664 | ========================================= 665 | libuv is licensed for use as follows: 666 | 667 | ==== 668 | Copyright (c) 2015-present libuv project contributors. 669 | 670 | Permission is hereby granted, free of charge, to any person obtaining a copy 671 | of this software and associated documentation files (the "Software"), to 672 | deal in the Software without restriction, including without limitation the 673 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 674 | sell copies of the Software, and to permit persons to whom the Software is 675 | furnished to do so, subject to the following conditions: 676 | 677 | The above copyright notice and this permission notice shall be included in 678 | all copies or substantial portions of the Software. 679 | 680 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 681 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 682 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 683 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 684 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 685 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 686 | IN THE SOFTWARE. 687 | ==== 688 | 689 | This license applies to parts of libuv originating from the 690 | https://github.com/joyent/libuv repository: 691 | 692 | ==== 693 | 694 | Copyright Joyent, Inc. and other Node contributors. All rights reserved. 695 | Permission is hereby granted, free of charge, to any person obtaining a copy 696 | of this software and associated documentation files (the "Software"), to 697 | deal in the Software without restriction, including without limitation the 698 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 699 | sell copies of the Software, and to permit persons to whom the Software is 700 | furnished to do so, subject to the following conditions: 701 | 702 | The above copyright notice and this permission notice shall be included in 703 | all copies or substantial portions of the Software. 704 | 705 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 706 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 707 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 708 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 709 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 710 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 711 | IN THE SOFTWARE. 712 | 713 | ==== 714 | 715 | This license applies to all parts of libuv that are not externally 716 | maintained libraries. 717 | 718 | The externally maintained libraries used by libuv are: 719 | 720 | - tree.h (from FreeBSD), copyright Niels Provos. Two clause BSD license. 721 | 722 | /*- 723 | * Copyright 2002 Niels Provos 724 | * All rights reserved. 725 | * 726 | * Redistribution and use in source and binary forms, with or without 727 | * modification, are permitted provided that the following conditions 728 | * are met: 729 | * 1. Redistributions of source code must retain the above copyright 730 | * notice, this list of conditions and the following disclaimer. 731 | * 2. Redistributions in binary form must reproduce the above copyright 732 | * notice, this list of conditions and the following disclaimer in the 733 | * documentation and/or other materials provided with the distribution. 734 | * 735 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 736 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 737 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 738 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 739 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 740 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 741 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 742 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 743 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 744 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 745 | */ 746 | 747 | 748 | - inet_pton and inet_ntop implementations, contained in src/inet.c, are 749 | copyright the Internet Systems Consortium, Inc., and licensed under the ISC 750 | license. 751 | 752 | /* 753 | * Copyright (c) 1996 The Internet Software Consortium. All rights reserved. 754 | * 755 | * Redistribution and use in source and binary forms, with or without 756 | * modification, are permitted provided that the following conditions 757 | * are met: 758 | * 759 | * 1. Redistributions of source code must retain the above copyright 760 | * notice, this list of conditions and the following disclaimer. 761 | * 2. Redistributions in binary form must reproduce the above copyright 762 | * notice, this list of conditions and the following disclaimer in the 763 | * documentation and/or other materials provided with the distribution. 764 | * 3. Neither the name of The Internet Software Consortium nor the names 765 | * of its contributors may be used to endorse or promote products derived 766 | * from this software without specific prior written permission. 767 | * 768 | * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND 769 | * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 770 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 771 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 772 | * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR 773 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 774 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 775 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 776 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 777 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 778 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 779 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 780 | * SUCH DAMAGE. 781 | * 782 | * This software has been written for the Internet Software Consortium 783 | * by Ted Lemon in cooperation with Vixie 784 | * Enterprises. To learn more about the Internet Software Consortium, 785 | * see ``http://www.vix.com/isc''. To learn more about Vixie 786 | * Enterprises, see ``http://www.vix.com''. 787 | */ 788 | 789 | 790 | - stdint-msvc2008.h (from msinttypes), copyright Alexander Chemeris. Three 791 | clause BSD license. 792 | 793 | // ISO C9x compliant stdint.h for Microsoft Visual Studio 794 | // Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 795 | // 796 | // Copyright (c) 2006-2008 Alexander Chemeris 797 | // 798 | // Redistribution and use in source and binary forms, with or without 799 | // modification, are permitted provided that the following conditions are met: 800 | // 801 | // 1. Redistributions of source code must retain the above copyright notice, 802 | // this list of conditions and the following disclaimer. 803 | // 804 | // 2. Redistributions in binary form must reproduce the above copyright 805 | // notice, this list of conditions and the following disclaimer in the 806 | // documentation and/or other materials provided with the distribution. 807 | // 808 | // 3. The name of the author may be used to endorse or promote products 809 | // derived from this software without specific prior written permission. 810 | // 811 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 812 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 813 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 814 | // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 815 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 816 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 817 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 818 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 819 | // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 820 | // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 821 | 822 | 823 | - pthread-fixes.c, copyright Google Inc. and Sony Mobile Communications AB. 824 | Three clause BSD license. 825 | 826 | /* Copyright (c) 2013, Sony Mobile Communications AB 827 | * Copyright (c) 2012, Google Inc. 828 | * All rights reserved. 829 | * 830 | * Redistribution and use in source and binary forms, with or without 831 | * modification, are permitted provided that the following conditions are 832 | * met: 833 | * 834 | * * Redistributions of source code must retain the above copyright 835 | * notice, this list of conditions and the following disclaimer. 836 | * * Redistributions in binary form must reproduce the above 837 | * copyright notice, this list of conditions and the following disclaimer 838 | * in the documentation and/or other materials provided with the 839 | * distribution. 840 | * * Neither the name of Google Inc. nor the names of its 841 | * contributors may be used to endorse or promote products derived from 842 | * this software without specific prior written permission. 843 | * 844 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 845 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 846 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 847 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 848 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 849 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 850 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 851 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 852 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 853 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 854 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 855 | */ 856 | 857 | 858 | - android-ifaddrs.h, android-ifaddrs.c, copyright Berkeley Software Design 859 | Inc, Kenneth MacKay and Emergya (Cloud4all, FP7/2007-2013, grant agreement 860 | n° 289016). Three clause BSD license. 861 | 862 | /* 863 | * Copyright (c) 1995, 1999 864 | * Berkeley Software Design, Inc. All rights reserved. 865 | * 866 | * Redistribution and use in source and binary forms, with or without 867 | * modification, are permitted provided that the following conditions 868 | * are met: 869 | * 1. Redistributions of source code must retain the above copyright 870 | * notice, this list of conditions and the following disclaimer. 871 | * 872 | * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND 873 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 874 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 875 | * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE 876 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 877 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 878 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 879 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 880 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 881 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 882 | * SUCH DAMAGE. 883 | * 884 | * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp 885 | */ 886 | ========================================= 887 | END OF libuv NOTICES AND INFORMATION 888 | 889 | %% node-pty NOTICES AND INFORMATION BEGIN HERE 890 | ========================================= 891 | Copyright (c) 2012-2015, Christopher Jeffrey (https://github.com/chjj/) 892 | 893 | Permission is hereby granted, free of charge, to any person obtaining a copy 894 | of this software and associated documentation files (the "Software"), to deal 895 | in the Software without restriction, including without limitation the rights 896 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 897 | copies of the Software, and to permit persons to whom the Software is 898 | furnished to do so, subject to the following conditions: 899 | 900 | The above copyright notice and this permission notice shall be included in 901 | all copies or substantial portions of the Software. 902 | 903 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 904 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 905 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 906 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 907 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 908 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 909 | THE SOFTWARE. 910 | 911 | 912 | 913 | The MIT License (MIT) 914 | 915 | Copyright (c) 2016, Daniel Imms (http://www.growingwiththeweb.com) 916 | 917 | Permission is hereby granted, free of charge, to any person obtaining a copy 918 | of this software and associated documentation files (the "Software"), to deal 919 | in the Software without restriction, including without limitation the rights 920 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 921 | copies of the Software, and to permit persons to whom the Software is 922 | furnished to do so, subject to the following conditions: 923 | 924 | The above copyright notice and this permission notice shall be included in all 925 | copies or substantial portions of the Software. 926 | 927 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 928 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 929 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 930 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 931 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 932 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 933 | SOFTWARE. 934 | 935 | 936 | 937 | MIT License 938 | 939 | Copyright (c) 2018 - present Microsoft Corporation 940 | 941 | All rights reserved. 942 | 943 | Permission is hereby granted, free of charge, to any person obtaining a copy 944 | of this software and associated documentation files (the "Software"), to deal 945 | in the Software without restriction, including without limitation the rights 946 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 947 | copies of the Software, and to permit persons to whom the Software is 948 | furnished to do so, subject to the following conditions: 949 | 950 | The above copyright notice and this permission notice shall be included in all 951 | copies or substantial portions of the Software. 952 | 953 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 954 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 955 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 956 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 957 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 958 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 959 | SOFTWARE. 960 | ========================================= 961 | END OF node-pty NOTICES AND INFORMATION 962 | 963 | %% tmux NOTICES AND INFORMATION BEGIN HERE 964 | ========================================= 965 | Copyright (c) 2009 Nicholas Marriott 966 | Copyright (c) 2009 Joshua Elsasser 967 | Copyright (c) 2009 Todd Carson 968 | 969 | Permission to use, copy, modify, and distribute this software for any 970 | purpose with or without fee is hereby granted, provided that the above 971 | copyright notice and this permission notice appear in all copies. 972 | 973 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 974 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 975 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 976 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 977 | WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER 978 | IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 979 | OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 980 | ========================================= 981 | END OF tmux NOTICES AND INFORMATION 982 | 983 | %% wcwidth NOTICES AND INFORMATION BEGIN HERE 984 | ========================================= 985 | This project is licensed for use as follows: 986 | 987 | """ 988 | The MIT License (MIT) 989 | 990 | Copyright (c) 2016 Fredrik Fornwall 991 | 992 | Permission is hereby granted, free of charge, to any person obtaining a copy 993 | of this software and associated documentation files (the "Software"), to deal 994 | in the Software without restriction, including without limitation the rights 995 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 996 | copies of the Software, and to permit persons to whom the Software is 997 | furnished to do so, subject to the following conditions: 998 | 999 | The above copyright notice and this permission notice shall be included in all 1000 | copies or substantial portions of the Software. 1001 | 1002 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1003 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1004 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1005 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1006 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1007 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1008 | SOFTWARE. 1009 | """ 1010 | 1011 | This license applies to parts originating from the 1012 | https://github.com/jquast/wcwidth repository: 1013 | 1014 | """ 1015 | The MIT License (MIT) 1016 | 1017 | Copyright (c) 2014 Jeff Quast 1018 | 1019 | Permission is hereby granted, free of charge, to any person obtaining a copy 1020 | of this software and associated documentation files (the "Software"), to deal 1021 | in the Software without restriction, including without limitation the rights 1022 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1023 | copies of the Software, and to permit persons to whom the Software is 1024 | furnished to do so, subject to the following conditions: 1025 | 1026 | The above copyright notice and this permission notice shall be included in all 1027 | copies or substantial portions of the Software. 1028 | 1029 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1030 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1031 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1032 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1033 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1034 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1035 | SOFTWARE. 1036 | """ 1037 | ========================================= 1038 | END OF wcwidth NOTICES AND INFORMATION 1039 | --------------------------------------------------------------------------------