March Wayland update: ASCII Art rendering

Another busy month, another round of great features being worked on. March featured our Plasma 5.6 release which had lots of last minute (aka bug fixing) focus. We had our sprint at CERN. But of course also new code was added.

One of the features on my TODO list for Plasma 5.7 is the ASCII art output rendering. Mplayer supports that and while that is nice, it’s not really a good solution. It would be way more convenient to have the complete workspace rendered through ASCII art to not have to implement this feature in every application.

So without much further ado I’m happy to announce the caca platform for KWin:

Glxgears running in nested KWin on caca platform
Glxgears running in nested KWin on caca platform

Unfortunately it’s only supported by our QPainter based compositor. Thus to run it, you need to make sure to use KWIN_COMPOSE=Q to pick the QPainter backend (yeah we should improve that to have a better automatic selection). This is the first platform which support both nested and full mode. Thus you can run with –ascii in your normal X session which will open a window, just like our nested X11 platform plugin. The rendering is done through the great caca library.

Lock screen in KWin's caca platform
Lock screen in KWin’s caca platform

What I’m personally impressed about is how small this new platform plugin is. Less than 400 lines of code, great job by libcaca. But it also shows how easy it is to get KWin on a new platform.

17 Replies to “March Wayland update: ASCII Art rendering”

  1. And they said wayland doesn’t support remote rendering. Ha!
    ssh+kwin-wayland Best solution ever!

  2. I thought “Nice, another blog post from Martin”.
    Taking every word seriously and then the screenshot… thought something’s fishy here but didn’t think of April 1st, then I saw the “caca platform” under the screenshot and everything was clear 🙂

    1. Well, the other way around, “caca platform” then screenshot…

      Nice feature though 🙂

  3. Is it possible to detect text on the screen and have it output text in the terminal instead of treating it as an image?

    A way to find text on the screen and figure out where it is might be useful for blind people too. I dunno just thinking out loud

      1. Yeah that part does not belong to the prank. The library exists and the code review request is real and the code is working

  4. How about extremely lightweight remote desktop with that? Sending text instead of pictures. That would be kinda cool. That may have it’s use, who knows!

Comments are closed.