mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-05 04:34:23 +02:00
Terminal panel updates
- Add TerminalSettings resource. - Init/load terminal settings from terminal panel. - Add terminal context menu (i.e. right-click PopupMenu). - Add shortcut to open a new terminal Ctrl+Shift+T and make terminal panel visible.
This commit is contained in:
parent
04e077694f
commit
ebb527cb8b
9 changed files with 169 additions and 0 deletions
|
@ -0,0 +1,3 @@
|
|||
[gd_resource type="ShortCut" format=2]
|
||||
|
||||
[resource]
|
|
@ -0,0 +1,11 @@
|
|||
[gd_resource type="ShortCut" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="InputEventKey" id=1]
|
||||
shift = true
|
||||
control = true
|
||||
command = true
|
||||
pressed = true
|
||||
scancode = 84
|
||||
|
||||
[resource]
|
||||
shortcut = SubResource( 1 )
|
|
@ -0,0 +1,3 @@
|
|||
[gd_resource type="ShortCut" format=2]
|
||||
|
||||
[resource]
|
|
@ -0,0 +1,59 @@
|
|||
extends Resource
|
||||
|
||||
enum FileType {
|
||||
USE_SHELL_ENV,
|
||||
CUSTOM_FILE,
|
||||
}
|
||||
|
||||
enum CWDType {
|
||||
USE_PROJECT_DIRECTORY,
|
||||
CUSTOM_CWD,
|
||||
}
|
||||
|
||||
### Shortcuts ###
|
||||
|
||||
export (ShortCut) var new_terminal_shortcut = preload("./default_new_terminal_shortcut.tres")
|
||||
export (ShortCut) var copy_shortcut = preload("./default_copy_shortcut.tres")
|
||||
export (ShortCut) var paste_shortcut = preload("./default_paste_shortcut.tres")
|
||||
|
||||
### Scroll settings ###
|
||||
|
||||
# The maximum amount of lines the terminal keeps in its buffer.
|
||||
export var scrollback_buffer_lines := 1000
|
||||
# If true, mouse wheel up and down can be used to scroll the terminal.
|
||||
export var mouse_wheel_scroll := true
|
||||
# Whether or not to display scroll bar.
|
||||
export var show_scroll_bar := true
|
||||
|
||||
# Copy/paste settings.
|
||||
export var copy_on_selection := false
|
||||
|
||||
# Font settings.
|
||||
export var font_size: int = 14
|
||||
export var letter_spacing: int = 0
|
||||
export var line_height: float = 1.2
|
||||
export var ctrl_scroll_to_resize_font := true
|
||||
|
||||
# Bell settings.
|
||||
export var visual_bell := true
|
||||
export var audio_bell := true
|
||||
export var bell_sound: AudioStream = preload("../../../themes/audio/bell.wav")
|
||||
|
||||
# Exec args.
|
||||
export (FileType) var file_type := FileType.USE_SHELL_ENV
|
||||
export var custom_file := "/bin/sh"
|
||||
|
||||
export (CWDType) var cwd_type := CWDType.USE_PROJECT_DIRECTORY
|
||||
export var custom_cwd := ""
|
||||
|
||||
export var args := PoolStringArray()
|
||||
|
||||
export var use_os_env := true
|
||||
export var extra_env := {
|
||||
TERM = "xterm-256color",
|
||||
COLORTERM = "truecolor",
|
||||
}
|
||||
|
||||
|
||||
func _init(p_copy_on_selection := false):
|
||||
copy_on_selection = p_copy_on_selection
|
Loading…
Add table
Add a link
Reference in a new issue