DEV Community 👩‍💻👨‍💻

Luke Barnard
Luke Barnard

Posted on

Emulating Xmonad in JavaScript - Part 3

a GIF showing bash and terminal focussing

a GIF showing terminal swapping

a GIF showing less working quite well in shmonad

Look! I made more progress!

This week has mostly been bug-fixing and reverse-engineering the functionality of certain control sequences.

One method I've found very useful is opening Terminal.app and running

 $ printf '\e#8'   # fill the terminal screen with "E" (no really)
 $ printf '\e[XXX'

to see what happens!

I'm slowly starting to realise (a) how complicated terminals are, (b) how tricky ANSI control sequences are as an API and (c) that I'm trying to write an ASNI-compliant terminal in Node.js...

This week's post is a short one, and I'll make sure to post another one ASAP.

Fin

Please feel free to leave a comment and share your thoughts and if you're keen for more posts like this, follow me! :)

See you next time folks, thanks for reading.

Top comments (0)

This post blew up on DEV in 2020:

js visualized

🚀⚙️ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! 🥳

Happy coding!