Lurker News
I made a built-from scratch Wayland Compositor to display any GUI app* in the terminal! I think there is a lot of unexplored potential in custom Wayland compositors, a lot of really cool things you can embed existing applications into! So, I started with embedding apps into the terminal because that is the easiest input/output (output is just utf-8 and I use the great `chafa` library for that, and I just read from stdin for the input).

If you have any other ideas for cool Wayland compositors, let me know. I purposedly wrote 80% the app in Typescript to appeal to the most developers and attract cool contributions (I do all drawing with the familiar Canvas2D api, so if there is interest, I can also fork this out into a cool Terminal canvas, let me know!)
I have a blog post here about how I did it, but it’s pretty high level and non technical, so please ask if you have any questions.
[How I Did It](<https://github.com/mmulet/term.everything/blob/main/resource...>)
*technically only Wayland apps and x11 apps with Xwayland. But on Linux that’s mostly everything.

Comments (144) 64 threads

Earlier comments
patcon1 reply#
I truly appreciate the relational thinking and pointing out other projects that might interest ppl who are excited about this :) Having said that, term.everything seems to be much larger in scope than a browser, unless I'm mistaken
mmulet#
That’s right. These other projects are awesome, but they’re attempting something different. It’s apples to oranges.
roughly1 reply#
This is the exact kind of unhinged that belongs on HN. Naturally, it's written in typescript.
taviso1 reply#
It's fun, but reminds me of a trick using Xvfb.

For example...

    $ Xvfb :7 &
    [1] 21688
    $ xeyes -display :7 &
    [2] 21697
    $ xwd -display :7 -name xeyes -out /dev/stdout | convert xwd:- sixel:-

It looks like this: https://imgur.com/a/Eq2ToVO

Obviously no input though, you would have to use xdotool! The main benefit is that you probably already have all these tools installed :)

FortuneIIIPick1 reply#
Looks like you're on Windows? You can run X apps with XMing, I used to do it years ago. You can run the actual X app and use it, not just get a screenshot.
taviso#
The point is to view it in a terminal (e.g. XTerm, Konsole, etc), of course you can just run it in an X server.
SJC_Hacker#
This could be useful for testing UI elements of apps ...

Modern UI applications are way too tightly coupled for my liking, and difficult to test especially if you don't practice "separation of concerns", e.g. decoupling the app logic from its presentation.
Haven't looked at the full thing but something like this might allow you to write tests for UI apps without actually having the UI backend...

Load more comments