A terminal emulator for Cutefish.
The terminal's state, its parsing, scrollback, selection, search and input
encoding come from libghostty-vt
(MIT). The pty, the drawing on cutefish-toolkit and the windows are this
repository's own. Terminal::promptClickInput in lib/terminal.cpp ports
the click-to-move logic of Ghostty's Screen.promptClickLine and
Surface.maybePromptClick to libghostty-vt's C API.
Terminal is built on cutefish-toolkit
and libghostty-vt 1.0, linked statically; install both first. libghostty-vt
is found as the pkg-config module cutefish-ghostty-vt, which the Cutefish
package cutefish-ghostty-vt-dev provides.
Debian/Ubuntu Dependencies:
sudo apt install cmake pkg-config libpcre2-dev libxkbcommon-devmkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
make
sudo make installlib/colorschemes.cpp holds the published palettes of these themes, their
values taken over unchanged: Catppuccin
(MIT), Dracula (MIT),
Gruvbox (MIT), Nord
(MIT, copyright 2016-present Sven Greb), Atom One Dark and One Light as
iTerm2-Color-Schemes gives them (MIT),
Solarized (MIT, copyright 2011 Ethan Schoonover),
Tokyo Night (Apache-2.0, copyright Folke Lemaitre)
and Tomorrow Night (MIT, copyright 2011 Chris Kempson).
The view's pointer, selection, paste, link, focus and cursor blink behaviour
(lib/terminalview.cpp, lib/terminalviewinput.cpp, lib/terminalviewpaint.cpp)
follows Ghostty's src/Surface.zig
and its default configuration as of v1.4.0 (MIT): Shift+click extending the
selection, a double click taking a whole link, typing letting the selection
go, the wheel and alternate scroll mode under a program taking the mouse,
links shown with Control, focus reports with the held key released on focus
loss. The behaviour was reimplemented; the 600 ms cursor blink interval was
taken over unchanged.
lib/links.cpp matches links with Ghostty's default URL and path pattern
(src/config/url.zig, v1.4.0, MIT), taken over with one lookbehind
restructured for PCRE2; tests/logic/links_test.cpp runs that file's test
cases unchanged.
The shell integration in shell-integration/ starts shells the way
Ghostty's (v1.4.0) does: bash in POSIX mode reading the script through
ENV, zsh through ZDOTDIR, fish through XDG_DATA_DIRS. The fish script
is adapted from Ghostty's src/shell-integration/fish (MIT, copyright 2024
Mitchell Hashimoto, Ghostty contributors); the bash and zsh scripts are this
repository's own.
MIT; see LICENSE.
