mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-06 20:54:09 +01:00
* MIT-Lizenz; Terminal-Verlauf kompakt, schnellerer Bildlauf, Manager mit vielen Verbindungen schneller - LICENSE (MIT), winget/Homebrew/apt-Metadaten, README, Webseite, --version - termemu: Verlauf mit 8 statt 112 Byte pro Zeichen, Ringpuffer - third_party/vt: angepasste Kopie (rotateLines, SetScrollbackHook) - Store: Connections() zwischengespeichert; Manager: buildRows ohne Teillisten, Fußzeile misst Breiten einmal - Benchmarks: make bench Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUjBAAPCAZVnGzCZxdS * Testprogramm aus dem Commit entfernt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUjBAAPCAZVnGzCZxdS * Testprogramm entfernt, *.test ignorieren Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUjBAAPCAZVnGzCZxdS * TestSerialSession: auf stehenden Prompt warten statt auf das erste # Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUjBAAPCAZVnGzCZxdS --------- Co-authored-by: Claude <noreply@anthropic.com>
64 lines
2.0 KiB
Go
64 lines
2.0 KiB
Go
package vt
|
|
|
|
import (
|
|
"image/color"
|
|
|
|
uv "github.com/charmbracelet/ultraviolet"
|
|
"github.com/charmbracelet/x/ansi"
|
|
)
|
|
|
|
// Callbacks represents a set of callbacks for a terminal.
|
|
type Callbacks struct {
|
|
// Bell callback. When set, this function is called when a bell character is
|
|
// received.
|
|
Bell func()
|
|
|
|
// Title callback. When set, this function is called when the terminal title
|
|
// changes.
|
|
Title func(string)
|
|
|
|
// IconName callback. When set, this function is called when the terminal
|
|
// icon name changes.
|
|
IconName func(string)
|
|
|
|
// AltScreen callback. When set, this function is called when the alternate
|
|
// screen is activated or deactivated.
|
|
AltScreen func(bool)
|
|
|
|
// CursorPosition callback. When set, this function is called when the cursor
|
|
// position changes.
|
|
CursorPosition func(old, new uv.Position) //nolint:predeclared,revive
|
|
|
|
// CursorVisibility callback. When set, this function is called when the
|
|
// cursor visibility changes.
|
|
CursorVisibility func(visible bool)
|
|
|
|
// CursorStyle callback. When set, this function is called when the cursor
|
|
// style changes.
|
|
CursorStyle func(style CursorStyle, blink bool)
|
|
|
|
// CursorColor callback. When set, this function is called when the cursor
|
|
// color changes. Nil indicates the default terminal color.
|
|
CursorColor func(color color.Color)
|
|
|
|
// BackgroundColor callback. When set, this function is called when the
|
|
// background color changes. Nil indicates the default terminal color.
|
|
BackgroundColor func(color color.Color)
|
|
|
|
// ForegroundColor callback. When set, this function is called when the
|
|
// foreground color changes. Nil indicates the default terminal color.
|
|
ForegroundColor func(color color.Color)
|
|
|
|
// WorkingDirectory callback. When set, this function is called when the
|
|
// current working directory changes.
|
|
WorkingDirectory func(string)
|
|
|
|
// EnableMode callback. When set, this function is called when a mode is
|
|
// enabled.
|
|
EnableMode func(mode ansi.Mode)
|
|
|
|
// DisableMode callback. When set, this function is called when a mode is
|
|
// disabled.
|
|
DisableMode func(mode ansi.Mode)
|
|
}
|