Live data from Hacker News

Ghostling

github.com

41–50 of 72 posts

Re: Ghostling

#41
post #6

The C file is small enough to read (over a few minutes.) I got to about line 5 and realized: I’ve never seen quite that technique for embedding a font via an autogenerated header before. I’m more used to Windows resources; this seems to generate a byte array in CMake code. I’m somewhere between horrified and impressed, in that I feel we’ve finally discovered a cross platform binary resource embedding solution.

Here's the build script that uses: https://github.com/ghostty-org/ghostling/blob/main/bin2heade... I ran it against a 1x1 pixel GIF: cmake -DINPUT=pixel.gif -DOUTPUT=pixel.h -DARRAY_NAME=pixel_gif -P bin2header.cmake And got this: // Auto-generated from /private/tmp/exp/pixel.gif — do not edit. static const unsigned char pixel_gif[] = { 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80, 0x00, 0x00, 0xf…

Interestingly, cmake 4.3 just added a builtin command 'bin2c':

https://cmake.org/cmake/help/v4.3/manual/cmake.1.html#cmdopt...

...it will probably take a decade or two until Debian-based Linux distros will get cmake 4.3 though ;)

Re: Ghostling

#42
I’m seriously interested in this. I wonder if i can use this along some decent gui library and an llm to vibe-code a SecureCRT replacement.

SecureCRT is awesome but it’s crazy expensive :(

Re: Ghostling

#43
I really hope libghostty succeeds at setting a new baseline for what terminal emulation should be. Seems to be on a right track.

Re: Ghostling

#44

The C file is small enough to read (over a few minutes.) I got to about line 5 and realized: I’ve never seen quite that technique for embedding a font via an autogenerated header before. I’m more used to Windows resources; this seems to generate a byte array in CMake code. I’m somewhere between horrified and impressed, in that I feel we’ve finally discovered a cross platform binary resource embedding solution.

Well, I originally used C23's #embed directive ( https://en.cppreference.com/w/c/preprocessor/embed ) but GCC in Nixpkgs doesn't support C23 (or I'm holding it wrong) so I dropped back to this. The better long term solution is #embed.

I've definitely used C23 via Nixpkgs long ago at this point, did you use the `gcc` package and `-std=c23`? Both unstable and 25.11 should support it on all currently packaged GCC versions.

Re: Ghostling

#45

I have an idea of a terminal emulator where you could maximize panes but using a nested structure, does anyone know of one? Standard "Zoom" features in tmux or iTerm2 only maximize the single active pane to the full window, hiding everything else. If I have a layout like this: _____________________ | | B | | A |---------| | | C | |_________|_________| And I expand B, I want A to hide, while B and C remain visible tog…

Wouldn't you want a hide option rather than a fullscreen option? so hide A?

When I use zellij, i just move A to a new tab temporarily

Re: Ghostling

#46

Earlier quoted context omitted.

It's comical how much time I've spent convincing people that tabs are a window manager feature not an application feature. People in the Alacritty issue on the subject were pissed!

I've heard this a lot on HN over the years but it doesn't make much sense to me. Some thoughts: 1. App tabs improves UX for 99.999% of users who aren't using a WM with a good tab solution (if one even exists). 2. WM tabs means launching a new app instance for every tab you might want vs having lightweight app tabs. 3. App tabs can do all sorts of app-level things and UX polish that dumb WM tabs can't do because they…

Agree on all the points, except 4. There are even people out there who use lynx as their primary browser :)

Although while I usually like tabs for most apps, I don't use tabs for terminal and rely either on window manager or tmux. I guess the difference is that I often want a mix of tabs and having multiple terminals side by side, whereas I don't really need that for a browser (or very seldom)

Re: Ghostling

#47
I used ghostty for the shell in my agent-manager tool (think something like https://air.dev/ but in SwiftUI. One architectural detail i'm still going back and forth on is: who should own the PTY?

If embedded Ghostty owns it, now i have to have some kind of workaround to instrument what's happening inside the terminal - signals, stdout/stderr events, return code etc.

If my parent agent-manager app owns it, now i don't have the nice clean small interface to ghostty (i'm a fan of John Ousterhout style narrow but deep interfaces, pulling complexity down rather than pushing up to parent).

Not sure if any other ghostty embedders might have advice. It's on my todo list to task a an agent to "gh repo clone" a few ghostty using shells and report on their arch.

Re: Ghostling

#48

I used ghostty for the shell in my agent-manager tool (think something like https://air.dev/ but in SwiftUI. One architectural detail i'm still going back and forth on is: who should own the PTY? If embedded Ghostty owns it, now i have to have some kind of workaround to instrument what's happening inside the terminal - signals, stdout/stderr events, return code etc. If my parent agent-manager app owns it, now i don't…

Sounds like you need to multiplex a terminal with a terminal multiplexer.

terminal multiplexer

term mux

tmux

Re: Ghostling

#49
post #29
post #9

This looks interesting. I don't need my terminal emulator to support tabs, windows, or session management. My WM manages tabs and windows, and I use tmux for sessions, which also gives me a scrollback buffer, selection, clipboard, search, etc. This combination allows me to use any simple terminal emulator, such as urxvt, st, and now foot, without issues. Ghostty didn't appeal to me, but I might give this a try. It's…

Interesting you mention tmux because it itself resembles a terminal emulator. It has its own terminal feature matrix that controls what your parent emulator can render. It sounds like you aren’t using tabs and splits in tmux but it does include them. It sounds like you could get away with using a tool like https://zmx.sh which only handles session persistence (attach/detach). It also uses libghostty but only for stat…

A poor man's version of session persistence can even be managed with tmux plugins like tmux-resurrect and tmux-continuum.
Post reply on HN