home.social

#xterm — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #xterm, aggregated by home.social.

  1. I've started prototyping a playwright-like test framework for integration testing CLIs and TUIs github.com/myobie/pty/blob/mai #node #pty #tui #xterm #vitest

  2. #ruler #terminal #tmux #ded

    I've had this idea of having a ruler in the terminal. Such a ruler would allow me to see how far across the terminal a character or word is.

    Why? Not sure yet, I just liked the idea of it. You know, this is one of those solutions looking for a problem. ;). Still, it was fun.

    What I came up was this:

    (ruler1.png)

    This is achieved using tmux, where it's possible to create a split where the output is taken from stdin (rather than spawning a shell):

    % ruler | tmux splitw -dI -l2 -b &

    Here, this creates a split window two lines high (-l2), puts on the top (-b), and puts the output from the`ruler` command in the window.

    Then I can use text using whatever against the ruler to see where on the screen it is.

    We can take this a step further though and make use of tmux's `popup-display` command to have a ruler floating on the screen:

    (ruler2.png)

    ... and even make it borderless:

    (ruler3.png)

    This can be moved using the mouse, by holding Alt down and dragging with mouse-1.

    It turns out that using a ruler in an application isn't new.

    Thomas Dickey (of #xterm fame) wrote #ded (invisible-island.net/ded/ded.h) which has a ruler on it:

    (ruler4.png)

    #ded is an interesting program of itself and I had to tweak it slightly to make ot use ncursesw to display nicely in tmux (ACS fallback for drawing the ruler), which I might discuss in a separate thread on here.

    I'll have to email Thomas to find out what the "workspace ruler" (as it's called) does, and what it's useful for.

    As for my ruler, well, I think I have the measure of it now, so I think I'll re-write the quick shell script into something with bells-and-whistles.

    Maybe I'll give it conversion options to display inches, feet, cubits, etc... ;)

  3. Funny and interesting talk. Sure as hell i was waiting whether the most loathed, scoffed at, tutted at („No gpu acceleration? How antiquated!“) terminal emulator was among those who can be tricked into executing arbitrary remote commands using #ansi escape code fuckery.

    yes #xterm and no, apparently it can not. #terminal #shell #security #Defcon31 #defcon

    youtube.com/watch?v=3T2Al3jdY3
    yewtu.be/watch?v=3T2Al3jdY38