mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-06 04:34:08 +01:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUhyZeAnaXMQzGXmQU3
29 lines
806 B
Go
29 lines
806 B
Go
package gui
|
|
|
|
import (
|
|
"image"
|
|
|
|
tea "charm.land/bubbletea/v2"
|
|
)
|
|
|
|
// Options für Run.
|
|
type Options struct {
|
|
Title string // Fenstertitel (Standard „sshTermy“)
|
|
FontSize float64 // Schriftgröße in logischen Pixeln (Standard 14)
|
|
Icon []image.Image // Fenstersymbol in mehreren Größen (Windows/Linux)
|
|
// CloseMsg geht an das Programm, wenn jemand das Fenster schließt, damit
|
|
// es Sitzungen und Protokolle sauber beendet. nil = sofort beenden.
|
|
CloseMsg tea.Msg
|
|
|
|
attach bool // zweites Fenster eines abgetrennten Tabs
|
|
}
|
|
|
|
// scriptEnv: Steuerskript für Bildschirmfotos; das zweite Fenster hat ein
|
|
// eigenes, sonst liefe dasselbe Skript in beiden.
|
|
func (o Options) scriptEnv() string {
|
|
if o.attach {
|
|
return "SSHTERMY_GUI_SCRIPT_ATTACH"
|
|
}
|
|
return "SSHTERMY_GUI_SCRIPT"
|
|
}
|