Documentation
¶
Overview ¶
Package terminal is a terminal for MyGo's native UI: a view that runs a shell, or any program, in a pseudo-terminal, with the terminal emulator of Ghostty, libghostty-vt, and draws it with package ui.
term, err := terminal.New(terminal.Options{})
...
mygo.NewWindow(mygo.WindowOptions{Title: "Terminal", Content: ui.View(func(c ui.Frame) {
terminal.View(c, term).Fill()
})})
It does what terminals do: colors, styles and Unicode (wide characters, emoji, grapheme clusters), the scrollback with reflow on resize, the alternate screen of full-screen programs, the keyboard as legacy sequences or the Kitty keyboard protocol, mouse reporting, bracketed paste, focus reports, synchronized output, hyperlinks (OSC 8), titles, the working directory (OSC 7) and the clipboard (OSC 52, OSC 5522), which programs write through by default and read as Options.ClipboardRead allows. Selecting with the pointer copies as Ghostty does: a drag selects cells, a double click words and a triple click lines; Option (macOS) or Alt drags a rectangle.
libghostty-vt is a native library loaded at run time, with no cgo: `mygo build` and `mygo dev` put the build this package binds into the app, and programs run without them, as with `go run` and `go test`, download it once into the user's cache. See LibraryPath.
Index ¶
- func GhosttyThemes() []string
- func LibraryPath() (string, error)
- func Load() error
- func View(c *ui.Context, t *Terminal) ui.Element
- type Action
- type ClipboardAccess
- type ClipboardRequest
- type CopyOnSelect
- type CursorStyle
- type Font
- type Keybind
- type Options
- type PasteProgress
- type PasteStatus
- type RightClickAction
- type Terminal
- func (t *Terminal) Close() error
- func (t *Terminal) Dir() string
- func (t *Terminal) Done() <-chan struct{}
- func (t *Terminal) ExitCode() int
- func (t *Terminal) Feed(data []byte)
- func (t *Terminal) Paste(text string)
- func (t *Terminal) PasteData(d transfer.Data)
- func (t *Terminal) Resize(cols, rows int)
- func (t *Terminal) Send(data []byte)
- func (t *Terminal) SetCopyOnSelect(c CopyOnSelect)
- func (t *Terminal) SetFont(f Font)
- func (t *Terminal) SetTheme(theme, dark *Theme)
- func (t *Terminal) Size() (cols, rows int)
- func (t *Terminal) Snapshot() []byte
- func (t *Terminal) Text() string
- func (t *Terminal) Title() string
- type Theme
- type Zoom
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GhosttyThemes ¶
func GhosttyThemes() []string
GhosttyThemes returns the names GhosttyTheme takes, sorted: those of the user's theme files and of the themes Ghostty ships.
func LibraryPath ¶
LibraryPath returns the libghostty-vt the terminal loads, the first of:
- the file $MYGO_GHOSTTY_VT names;
- the one among the app's resources (mygo.PathResources), where `mygo build` and `mygo dev` put it, signed with the app on macOS;
- the one next to the executable;
- the one in the user's cache, where the CLI downloads it (<cache>/mygo/natives/<sha256>/), which programs that are not packaged apps, as under `go run` and `go test`, download there when it is missing, checking its SHA-256.
Packaged apps never download it: build them with the CLI.
func Load ¶
func Load() error
Load loads libghostty-vt, once, from LibraryPath. New calls it; call it earlier to report a missing library before showing a terminal.
func View ¶
View shows the terminal in a window of native UI, and takes its keyboard input once it has the focus, which a click gives it. Size it like any element, as with Fill or Grow; its size sets the terminal's, in cells of the font. A terminal shows in one view at a time.
A key goes, in order, to a shortcut of the window or an element around the view (and on macOS to the menus' key equivalents), to Options.OnKey, to the terminal's keybinds (Options.Keybinds, over DefaultKeybinds: Command+C and Command+V copy and paste on macOS, as do Control+Shift+C and Control+Shift+V elsewhere), and to the program. Other Command keys on macOS never reach the program, and go to the app's shortcuts. The Edit menu's roles copy, paste and select all too. The wheel scrolls the scrollback unless the program takes the mouse, and zooms with Control held (Command on macOS; Options.OnZoom). Hold Shift to select while a program takes the mouse, and Command (Control elsewhere) to open a link on click: a hyperlink (OSC 8), a URL printed as text, or a file path with Options.OpenLink.
Types ¶
type Action ¶ added in v0.5.0
type Action int
Action is what a key bound to it does (Keybind), as an action of Ghostty's keybind option.
const ( // ActionNone unbinds a key, which then goes to the program, as // Ghostty's unbind. ActionNone Action = iota // ActionIgnore takes the key and does nothing, as Ghostty's ignore. ActionIgnore // ActionCopy copies the selection, as copy_to_clipboard. It does // something only with a selection, and when Performable it also lets // go of it, so that the key's next press reaches the program, as // Windows Terminal's Control+C. ActionCopy // ActionPaste pastes the clipboard, as paste_from_clipboard: as the // view's Paste does (see Options.OnPaste). It does something only when // the clipboard holds something. ActionPaste // ActionSelectAll selects the scrollback and the screen, as // select_all. ActionSelectAll // ActionClearScreen clears the scrollback and the screen above the // cursor's line, which moves to the top, as clear_screen (and Kitty's // clear_terminal to_cursor). It does nothing on a full-screen // program's screen (the alternate screen), which it would break. ActionClearScreen // ActionIncreaseFontSize, ActionDecreaseFontSize and // ActionResetFontSize zoom a step in or out, or back to the font's // size, as increase_font_size:1, decrease_font_size:1 and // reset_font_size (see Options.OnZoom). ActionIncreaseFontSize ActionDecreaseFontSize ActionResetFontSize // ActionScrollPageUp, ActionScrollPageDown, ActionScrollToTop and // ActionScrollToBottom scroll the scrollback, as scroll_page_up, // scroll_page_down, scroll_to_top and scroll_to_bottom. They do // nothing on a full-screen program's screen, which has none. ActionScrollPageUp ActionScrollPageDown ActionScrollToTop ActionScrollToBottom )
type ClipboardAccess ¶ added in v0.5.0
type ClipboardAccess int
ClipboardAccess is what programs get when they read the clipboard (Options.ClipboardRead).
const ( // ClipboardDeny refuses a read: an empty clipboard for OSC 52, an // EPERM status for the Kitty protocol's OSC 5522. It is the zero // value, so reads stay refused until an app opts in. ClipboardDeny ClipboardAccess = iota // ClipboardAllow answers a read with what the clipboard holds. ClipboardAllow // ClipboardAsk asks the app first: Options.OnClipboardRequest when // set, else the terminal's own prompt in the view. ClipboardAsk )
type ClipboardRequest ¶ added in v0.5.0
type ClipboardRequest struct {
// Mimes are the MIME types the program asked for, in order of
// preference; empty when it asked only for what is available.
Mimes []string
// List tells that it asked for the types available (the Kitty
// protocol's targets listing), which is answered without asking.
List bool
// Primary is the selection clipboard of X11 (OSC 52's "s"/"p").
Primary bool
// Text is what the clipboard held as text when the request was seen,
// for a prompt about it.
Text string
// contains filtered or unexported fields
}
ClipboardRequest is a program's read of the clipboard that the app is asked about (Options.OnClipboardRequest).
func (*ClipboardRequest) Allow ¶ added in v0.5.0
func (r *ClipboardRequest) Allow()
Allow answers the request with what the clipboard holds.
func (*ClipboardRequest) Deny ¶ added in v0.5.0
func (r *ClipboardRequest) Deny()
Deny refuses the request.
type CopyOnSelect ¶ added in v0.5.0
type CopyOnSelect int
CopyOnSelect is where a selection is copied as it ends (Options.CopyOnSelect).
const ( // CopyOnSelectNone copies nothing, as Ghostty's none. CopyOnSelectNone CopyOnSelect = iota // CopyOnSelectClipboard copies to the clipboard, as Ghostty's // clipboard. CopyOnSelectClipboard )
type CursorStyle ¶
type CursorStyle int
CursorStyle is the shape of the cursor.
const ( CursorBlock CursorStyle = iota CursorBar CursorUnderline )
type Font ¶
type Font struct {
// Family is the font family, a comma-separated list as
// ui.Element.Font takes it, to which ui.RegisterFont adds the app's
// own fonts: "monospace", the system's, when empty.
Family string
// Size is the size in DIPs: 13 when zero.
Size float32
// Weight is how heavy text is, from 100 (thin) to 900 (black), of the
// weights the family has: 400 when zero. Bold text is 300 heavier, and
// at least 700.
Weight int
// Features turn OpenType features of the font on and off by tag, as
// Ghostty's font-feature: "ss01" or "+ss01" turns one on, "calt=0" or
// "-calt" off, and "cv05=2" picks an alternate. Coding fonts make
// most of their ligatures with calt, and the others with liga.
Features []string
// LineHeight is the height of rows, as a multiple of the font's own
// line height: 1 when zero, and 1.2 rows 20% taller, as Ghostty's
// adjust-cell-height = 20%. Text is centered in its row.
LineHeight float32
// Thicken draws text with a thicker stroke, as Ghostty's font-thicken:
// on macOS, with Core Text's font smoothing at its strongest, whatever
// the text's color and the system's setting. It changes nothing on
// Linux and Windows.
Thicken bool
}
Font is the font of a terminal's text, with what Ghostty's font options set.
type Keybind ¶ added in v0.5.0
Keybind binds a key, with exactly Mods held, to an action, as a line of Ghostty's keybind option: the view does the action instead of sending the key to the program. Key follows the keyboard layout, as ui.Key does.
Performable, as Ghostty's performable: prefix, takes the key only when the action does something: Control+C copies a selection, and without one goes on to the program, which it interrupts. A key the action leaves goes on as if unbound.
func DefaultKeybinds ¶ added in v0.5.0
func DefaultKeybinds() []Keybind
DefaultKeybinds returns the keys a terminal binds unless Options.NoDefaultKeybinds, which are Ghostty's of the platform:
- on macOS, Command+C copies and Command+V pastes, Command+A selects all, Command+K clears the screen, Command+= (and +) and Command+- zoom, and Command+0 zooms back; Command+Home, End, Page Up and Page Down scroll, as do Shift+Page Up and Page Down;
- elsewhere, Control+Shift+C and Control+Insert copy, Control+Shift+V and Shift+Insert paste, Control+Shift+A selects all, Control+= (and +), Control+- and Control+0 zoom, and Shift+Page Up and Page Down scroll, as do Shift+Home and End on Linux;
- on Windows, also Windows Terminal's: Control+C copies when there is a selection (performable), Control+V pastes when the clipboard holds something (performable), Control+Shift+K clears the screen, and Control+Shift+Home, End, Page Up and Page Down scroll.
The keys that clear the screen and scroll are performable: a full-screen program, as an editor, gets them.
type Options ¶
type Options struct {
// Command is the program the terminal runs and its arguments. Empty
// runs the user's shell as a login shell, as terminal apps do: $SHELL,
// else /bin/zsh on macOS and /bin/sh elsewhere; PowerShell on Windows.
Command []string
// Dir is the working directory of the program: the user's home
// directory when empty.
Dir string
// Env adds to the environment of the program, as "KEY=value". The
// terminal sets TERM=xterm-256color and COLORTERM=truecolor, and LANG
// to a UTF-8 locale when no locale is set, as when the app starts from
// the Finder.
Env []string
// Conn connects the terminal to something other than a program, such
// as a remote shell: what the terminal reads from it shows, and what
// is typed is written to it. Command, Dir and Env are then ignored. A
// Conn with a method Resize(cols, rows int) error is told the size.
Conn io.ReadWriteCloser
// Font is the font of the text: the system's monospaced font at 13
// DIPs when zero.
Font Font
// Theme sets the colors, and DarkTheme those in dark windows when set,
// as Ghostty's theme = light:…,dark:… does (GhosttyTheme returns
// Ghostty's themes). Without either, the terminal follows the window's
// light or dark appearance, with LightTheme and DarkTheme.
Theme, DarkTheme *Theme
// Cursor is the shape of the cursor, which programs may change, and
// NoBlink keeps it from blinking unless a program asks it to.
Cursor CursorStyle
NoBlink bool
// Scrollback is about how many bytes of output the terminal keeps above
// the screen: 10 MB when zero, none when negative.
Scrollback int
// OptionAsAlt makes Option on macOS the Alt key of programs (Meta),
// rather than the key that types accented letters and symbols.
OptionAsAlt bool
// CopyOnSelect copies what the pointer selects as the selection
// ends, and what Select All selects: CopyOnSelectClipboard to the
// clipboard, as Ghostty's copy-on-select = clipboard. Ghostty's
// primary, the selection clipboard of Linux, is not there: ui has
// none. SetCopyOnSelect changes it.
CopyOnSelect CopyOnSelect
// Keybinds bind keys to actions over DefaultKeybinds, as Ghostty's
// keybind option: a binding replaces the defaults of its key and
// modifiers, and one to ActionNone unbinds them, so that the program
// gets the key. NoDefaultKeybinds starts from none, as Ghostty's
// keybind = clear. OnKey sees keys first; see View.
Keybinds []Keybind
NoDefaultKeybinds bool
// RightClick is what a secondary click does, as Ghostty's
// right-click-action: show the context menu when zero. A program that
// takes the mouse gets the click instead, unless Shift is held.
RightClick RightClickAction
// NoClipboardWrite keeps programs from writing to the clipboard (OSC
// 52, OSC 5522), as Ghostty's clipboard-write = deny. Writes go
// through unless it is set; reads are governed by ClipboardRead.
NoClipboardWrite bool
// ClipboardRead is what programs get when they read the clipboard
// (OSC 52 with "?", OSC 5522): ClipboardDeny by default, so reads
// stay refused — refused with EPERM for OSC 5522 — until an app opts
// in, where Ghostty asks by default: a terminal that can ask needs a
// view, and one nobody shows leaves reads pending. What a paste
// offered a program is answered whatever the policy (see PasteData).
ClipboardRead ClipboardAccess
// Transparent leaves the terminal's background undrawn, so that what
// is under the view shows through, as the window's material or an
// element's translucent background, as Ghostty's background-opacity
// does: cells with a background color of their own still draw it.
// Give the theme the background the view shows on, which the text
// under a block cursor takes.
Transparent bool
// OnTitle, OnExit, OnBell and OnNotify run on a goroutine of the
// terminal when a program sets the title, when the program (or Conn)
// ends, when it rings the bell, and when it asks for a desktop
// notification (OSC 9, OSC 777). Calls to the terminal are safe in
// them.
OnTitle func(title string)
OnExit func(code int)
OnBell func()
OnNotify func(title, body string)
// OnPasteStatus tells how a paste goes that a program reads itself
// (mode 5522, see PasteData), on a goroutine of the terminal: offered,
// then sending as the program reads, then sent; or not taken when the
// program has not read it 5 seconds after the offer was written, as a
// program that does not read pastes, or one far away over a slow link.
// A paste of no text to a program that reads neither the clipboard nor
// bracketed pastes, which pastes nothing, tells PasteNoText. An app
// shows a large image's progress, or why nothing pasted, this way.
OnPasteStatus func(p PasteProgress)
// OnClipboardRequest asks the app before a program reads the
// clipboard, when ClipboardRead is ClipboardAsk; without it the
// terminal draws its own prompt in the view. It runs on the main
// thread, with what the program asked for; Allow or Deny answers the
// request, in the hook or later and from any goroutine, and the first
// of them wins. A request the hook leaves unanswered stays pending,
// as does a read of a terminal no view shows.
OnClipboardRequest func(req ClipboardRequest)
// OpenLink takes what a Command+click (Control+click elsewhere)
// opens: a hyperlink (OSC 8), a URL printed as text, or, only with
// OpenLink set, a file path printed as text (absolute, ~/, ./ or ../,
// one with a slash, or a file name with a :line), as printed, a
// :line:col suffix included; a relative one is the program's, as of
// Dir. It runs on the main thread and reports whether it opened the
// link; a hyperlink or a URL it leaves, or every one when it is nil,
// opens with the system (Context.OpenURL), and a path it leaves does
// nothing.
OpenLink func(link string) bool
// OnPaste sees a paste of the clipboard (ActionPaste's keys, a Paste
// menu item, a secondary click with RightClickPaste) before the
// program gets it, on the main thread, with every format the
// clipboard holds, read as the paste starts. It reports whether it
// took the paste; a paste taken sends nothing, as when an app uploads
// the clipboard's files or image (d.Files, transfer.PNG) for a remote
// program, then pastes their paths with Paste.
OnPaste func(d transfer.Data) bool
// OnKey sees a key press before Keybinds and before the terminal
// encodes it, on the main thread, and reports whether it took the key;
// a key taken sends nothing, neither the text it types nor its
// release. Unlike a shortcut of an element around the view, which runs
// with the next frame, it keeps its place among the keys typed after
// it, as does what it sends with Send. A key that only types text may
// come as its text alone, as on Linux, which OnKey does not see.
OnKey func(mods ui.Modifiers, key ui.Key) bool
// OnScroll sees the wheel scroll the view by whole rows, negative up,
// before the terminal scrolls its scrollback, on the main thread, and
// reports whether it took the scroll; a scroll taken moves nothing. It
// is not asked while a program takes the wheel: as the mouse, unless
// Shift is held, or, on a full-screen program's screen, as arrow keys
// (alternate scroll, which "\x1b[?1007l" turns off). It suits a Conn
// whose history lives at the other end, as a remote multiplexer
// streaming only its screen.
OnScroll func(rows int) bool
// OnZoom sees a zoom, on the main thread: the wheel with Control held
// (Command on macOS), before OnScroll and a program that takes the
// mouse, or a key bound to a font size action. It reports whether it
// took the zoom, as an app that sizes all its text at once does; a
// zoom it leaves, or every one without it, changes the terminal's font
// size, a DIP a step, as Ghostty's increase_font_size:1 does, and back
// to Font's size on a reset. Returning true from every zoom turns
// zooming off.
OnZoom func(z Zoom) bool
}
Options configure a terminal.
type PasteProgress ¶ added in v0.5.0
type PasteProgress struct {
Status PasteStatus
// Sent and Total count the bytes of the reply written to the program,
// encoded as the protocol sends them (base64 and its packets), for
// PasteSending and PasteSent: Total is known once the program reads.
Sent, Total int64
}
PasteProgress is how a paste a program reads itself goes (OnPasteStatus).
type PasteStatus ¶ added in v0.5.0
type PasteStatus int
PasteStatus is how a paste a program reads itself goes (OnPasteStatus).
const ( // PasteOffered: the program was told what the paste holds. PasteOffered PasteStatus = iota // PasteSending: the program reads it, and Sent of Total went so far. PasteSending // PasteSent: all of it went. PasteSent // PasteNotTaken: the program has not read it 5 seconds after it was // offered. It may still, as long as no other paste comes. PasteNotTaken // PasteNoText: the paste had no text, as only an image, and the // program reads neither the clipboard nor bracketed pastes (mode // 2004), so nothing was pasted. A program that takes bracketed // pastes gets an empty one. PasteNoText )
type RightClickAction ¶ added in v0.5.0
type RightClickAction int
RightClickAction is what a secondary click does (Options.RightClick), as Ghostty's right-click-action.
const ( // RightClickContextMenu shows the context menu: Copy, Paste, Select // All and Clear Scrollback. RightClickContextMenu RightClickAction = iota // RightClickPaste lets go of the selection and pastes. RightClickPaste // RightClickCopy copies the selection and lets go of it. RightClickCopy // RightClickCopyOrPaste copies the selection and lets go of it, or // pastes when there is none, as Windows Terminal's secondary click. RightClickCopyOrPaste // RightClickIgnore does nothing. RightClickIgnore )
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
Terminal is a terminal emulator and the program it runs. Its methods are safe from any goroutine.
func New ¶
New makes a terminal running opts.Command, or connected to opts.Conn. The program starts once a view shows the terminal, at the size of the view, or half a second later at 80×24 when none does.
func (*Terminal) Close ¶
Close closes the terminal: the program is hung up (SIGHUP), or Conn closed, and the terminal frees its memory. A view of it then shows nothing.
func (*Terminal) Dir ¶
Dir returns the working directory the shell reported (OSC 7, which the shells of macOS report), or "".
func (*Terminal) Done ¶
func (t *Terminal) Done() <-chan struct{}
Done is closed once the program exited (or Conn ended).
func (*Terminal) ExitCode ¶
ExitCode returns the exit code of the program once it exited: 128 plus the signal's number for a program a signal killed, -1 for one that could not start.
func (*Terminal) Paste ¶
Paste pastes text, as PasteData does: bracketed when the program asks (mode 2004), so that it does not run as commands as it would typed, or offered to a program that reads the clipboard itself (mode 5522), which reads it as text/plain.
func (*Terminal) PasteData ¶ added in v0.5.0
PasteData pastes data, as the paste keys paste the clipboard. A program that reads the clipboard itself (mode 5522, the Kitty clipboard protocol, as programs that take images do) is offered d's formats as MIME types (a file list as text/uri-list) and reads those it wants, even over SSH; any other gets d's text (transfer.Text), bracketed when it asks (mode 2004). With no text but other formats, as only an image, a program that asks for bracketed pastes gets an empty one, as VS Code's terminal sends, and any other nothing.
The terminal keeps a snapshot of d until the program reads it or another paste comes, and answers only that read: other terminals showing the same program, as other windows on a session, stay silent. A representation made with transfer.Lazy is read only when the program asks for it, on a goroutine of the terminal while it processes the program's output: its provider must not call the terminal nor wait on the main thread.
func (*Terminal) Resize ¶ added in v0.2.11
Resize sets the size of the screen in cells, for a terminal no view shows, as one a server keeps for a session while no window does: a view sets the size of the terminal it shows.
func (*Terminal) SetCopyOnSelect ¶ added in v0.5.2
func (t *Terminal) SetCopyOnSelect(c CopyOnSelect)
SetCopyOnSelect changes where a selection is copied as it ends, as Options.CopyOnSelect, as when the user changes a setting.
func (*Terminal) SetFont ¶
SetFont changes the font, as Options.Font, and the size a reset zooms back to; the font takes its size, as zooming did not happen.
func (*Terminal) Snapshot ¶ added in v0.2.11
Snapshot returns what the terminal shows as escape sequences: its scrollback and screen with their styles, the cursor and the modes programs set. Fed to a new terminal of the same size, it shows the same, as a terminal attaching again to a session a server keeps.
type Theme ¶
type Theme struct {
Foreground, Background ui.Color
// Cursor colors the cursor: the foreground when zero. CursorText
// colors the text under a block cursor: the background when zero.
Cursor, CursorText ui.Color
// Selection highlights the selected text: the foreground, a third
// opaque, when zero. SelectionText colors the selected text: its own
// colors when zero.
Selection, SelectionText ui.Color
// Palette holds the 16 colors of programs: black, red, green, yellow,
// blue, magenta, cyan and white, then their bright kinds.
Palette [16]ui.Color
}
Theme is the colors of a terminal, which programs may change (OSC 4, 10, 11, 12) until the terminal resets. GhosttyTheme returns Ghostty's themes.
func DarkTheme ¶
func DarkTheme() *Theme
DarkTheme returns the colors of terminals in dark windows: the window's background and text, with Visual Studio Code's palette.
func GhosttyTheme ¶
GhosttyTheme returns a theme of Ghostty's by its name, as Ghostty's theme option takes it ("Catppuccin Mocha", "Dracula", "Rose Pine Dawn"…): a theme file of the user's in Ghostty's themes directory ($XDG_CONFIG_HOME/ghostty/themes, ~/.config/ghostty/themes by default), else one of the themes Ghostty ships, which the plugin carries, of any case; or the theme file a path names. Each call returns a new Theme.
func LightTheme ¶
func LightTheme() *Theme
LightTheme returns the colors of terminals in light windows: the window's background and text, with Visual Studio Code's palette.
func ParseGhosttyTheme ¶
ParseGhosttyTheme reads a theme in Ghostty's format, Ghostty's configuration's lines that set colors:
palette = 0=#45475a … palette = 15=#a6adc8 background = #1e1e2e foreground = #cdd6f4 cursor-color = #f5e0dc cursor-text = #1e1e2e selection-background = #f5e0dc selection-foreground = #1e1e2e
Colors are in hex (#rgb, #rrggbb, rrggbb…). Other lines of Ghostty's configuration are ignored, as are the palette's colors past the 16th, and the colors set to cell-foreground or cell-background, which the terminal then picks itself (see Theme). The colors a theme leaves out are those of DarkTheme, or LightTheme when its background is light.
type Zoom ¶ added in v0.5.0
type Zoom struct {
// Steps is how many steps, larger positive: a notch of the wheel
// rolled up, or a press of a key bound to ActionIncreaseFontSize, is
// 1. A trackpad's moves add up to notches.
Steps int
// Reset asks for the size of Font back (ActionResetFontSize).
Reset bool
}
Zoom is a change of the font's size the user asks for (Options.OnZoom).
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
libbuild
command
Libbuild builds libghostty-vt for every platform MyGo supports from Ghostty's sources at a commit, with Zig (the version Ghostty asks for), and writes mygo-plugin.json, which names the files and their SHA-256 for the CLI and the terminal package, and ghostty_themes.go, the themes that Ghostty ships:
|
Libbuild builds libghostty-vt for every platform MyGo supports from Ghostty's sources at a commit, with Zig (the version Ghostty asks for), and writes mygo-plugin.json, which names the files and their SHA-256 for the CLI and the terminal package, and ghostty_themes.go, the themes that Ghostty ships: |
|
library
Package library finds libghostty-vt for the terminal plugin: next to the app, in the user's cache, or downloaded there, as mygo-plugin.json names it.
|
Package library finds libghostty-vt for the terminal plugin: next to the app, in the user's cache, or downloaded there, as mygo-plugin.json names it. |
|
pty
Package pty runs processes in pseudo-terminals, in pure Go: /dev/ptmx on macOS and Linux, ConPTY on Windows.
|
Package pty runs processes in pseudo-terminals, in pure Go: /dev/ptmx on macOS and Linux, ConPTY on Windows. |
|
vt
Package vt binds libghostty-vt, the terminal emulator of Ghostty, which it loads at run time through purego: no cgo.
|
Package vt binds libghostty-vt, the terminal emulator of Ghostty, which it loads at run time through purego: no cgo. |