←back to thread

1080 points mmulet | 2 comments | | HN request time: 0s | source

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.

Show context
nick__m ◴[] No.45200895[source]
That's awesomely useless, it straddles the line between programming and art.

I am sure it was a great and fun learning experience.

Well done !

replies(3): >>45201051 #>>45203027 #>>45204865 #
actsasbuffoon ◴[] No.45201051[source]
Yeah, I can’t explain why this project makes me so happy because I struggle to think of any time where I’d need this, but it puts a big, dumb grin on my face.
replies(4): >>45201232 #>>45201507 #>>45202762 #>>45204989 #
snozolli ◴[] No.45201507[source]
It reminds me a bit of chindōgu, the Japanese art (?) of useless inventions. There's a particular delight to ingenious, but absurd or useless creations.
replies(3): >>45201992 #>>45203361 #>>45203688 #
anthk ◴[] No.45203361[source]
Emacs it's full of chindogus. Also, there's geekcode, xroach, megahal/hailo, xneko, aatv and mplayer rendering videos over aalib, aaquake, eforth running in the subleq virtual machine...
replies(2): >>45203831 #>>45203832 #
DiggyJohnson ◴[] No.45203831[source]
I’m a fan of `xeyes`
replies(1): >>45204254 #
1. watersb ◴[] No.45204254{3}[source]
xeyes can be Actually Useful; two eyes always looking at the cursor...

your animal brain hardwired to discern the direction of gaze of the eyes facing you (citations appreciated)...

Helps me find the mouse cursor on a big screen if I lose track, even with small parallax angle.

On macOS, I just wiggle the mouse back and forth, and the cursor gets really big, it pops out at you.

I generally don't keep `xeyes` running. But it's a righteous, venerable hack.

replies(1): >>45232929 #
2. vrighter ◴[] No.45232929[source]
you can also do the mouse wiggle thing on kde. And unlike macs, the cursor never stops growing until you stop shaking. You can literally get it to cover the whole screen. So funny for me