Ghostling
31–40 of 72 posts
Re: Ghostling
#32Standard "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 together. Then I can create a new nested workspace in there and later zoom out when I’m done.Maybe this could be done arbitrarily deep?
Re: Ghostling
#33The 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.
These can be used in the application through external declarations; and you include the object file in the linking step, like any other object file.
Re: Ghostling
#34The 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.
$ echo 'Hello, world!' > hello-world.txt
$ objcopy --input-target=binary --output-target=elf64-x86-64 \
hello-world.txt hello-world.o
$ cat embed.c
#include
#include
#define EMBED(NAME) \
extern const uint8_t _binary_##NAME##_start[]; \
extern const uint8_t _binary_##NAME##_size[];
#define DATA(NAME) _binary_##NAME##_start
#define SIZE(NAME) (size_t)_binary_##NAME##_size
int main() {
EMBED(hello_world_txt);
printf("%.*s", (int)SIZE(hello_world_txt), DATA(hello_world_txt));
}
EOF
$ gcc hello-world.o embed.c -o hello-world
$ ./hello-world
Hello, world!Re: Ghostling
#35This 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…
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!
Re: Ghostling
#36I use libghostty for Trolley[0], which packages TUIs as desktop apps, like Electron does for web apps. It really is quite an amazing piece of software. I just wrapped it in a useful GUI and a bundle/package CLI and it just works. Even on Windows. Kudos to the Ghostty developers. [0] https://github.com/weedonandscott/trolley
You mention that Android/IOS support is possible. I hope that you can please add these support properly as your project matures.
Asking this because I would love to have a cli tool where I can just point to for example golang codebase from any device (mac/windows/linux) etc. and thanks to golang's cross compilation simplicity, have it be compiled for android (well linux arm fwiw) and then have it all be compiled into a single android apk.
And if you do that, I would love to have something like zenity but for android so as to abstract the cli behind a nice gui for mass-adoption.
This is almost a million dollar problem as there are so many good cli tools and its incredibly easy and versatile to make a gui even with scripts on top of that cli but Android/Ios usually don't have that versatility.
Re: Ghostling
#37Earlier quoted context omitted.
You can use `xxd` from the vim package to generate these. You'll find out pretty quickly that this is only suitable for small resources: gcc and clang blow up in both time and space on very large literal arrays. If you need to ship more than a few megabytes, find a different technique. I used this technique for awhile, but it was too problematic for my use case. Now, I use https://github.com/lief-project/LIEF -- amon…
Yeah xxd is the correct answer. If you don't want to install a dependency and have Lua installed, or if you're just feeling a little bit frisky, you can use my function which is Production Ready™. Xxd = function(name, input) if not name:find'^[_%a][_%w]*$' then error('bad name: '..tostring(name)) end local ans = { 'const unsigned int '..name..'_len = '..(#input)..';', 'const unsigned char '..name..'[] = {', } local t…
Yes, you'd want to gitignore it and exclude it from search etc. but you still have size issues etc. See gucci-on-fleek's comment on objcopy above for usage.
Re: Ghostling
#38I 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…
https://github.com/cyrus-and/zoom
I guess it's also the kind of thing where screen real-estate is a must otherwise when you're at the "top-level" it would look weird-ish.
Re: Ghostling
#39I 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…
Re: Ghostling
#40Earlier quoted context omitted.
I would love tabs for Spotify. I just discovered I can at least open new windows from the linux YouTube music client by middle clicking, a revelation !
Every application (or concept) can introduce “tabs”, but it means something wildly different for that particular application. Tabs (or instances) in an application immediately bumps into the concept of state (statefull vs stateless) in applications. Sometimes, it makes perfect sense. The reason tabs made sense for web browsers since 2004 is because each web page could be thought of as a “stateless” instance of an app…
Agreed, and this is why tabs need to work at the app level, not window manager/os level.
That said, for Spotify specifically, it can already tell what I'm playing on an entirely different device. I think they can handle tabs.