Live data from Hacker News

Black Screen: A modern terminal emulator based on Electron

github.com

61–70 of 97 posts

Re: Black Screen: A modern terminal emulator based on Electron

#62

Earlier quoted context omitted.

The problem seems to be that they come at things from the wrong direction - you can't run vim without being backwards compatible with at minimum terminfo pages, very likely vim also makes an assumption also that the terminal communicates over a tty, and possibly you may just need to support actual ANSI Escape Codes. You can't run anything else without that either. Running vim should be the first thing this terminal c…

It does indeed support ANSI codes. Not fully compatible with VT100 yet, but that's where I'm moving. Vim is functioning, but there are a lot of bugs. https://dl.dropboxusercontent.com/spa/dlqheu39w0arg9q/xxy316... The problem with terminfo is that not every tool relies on it. I've seen many examples (hello, exa), when the codes are hard-coded to operate with xterm-256. So, I decided to pretend to be an xterm.

Hey thanks for replying & I hope my comments didn't seem snooty. I've thought a lot about how to solve this problem and was disappointed by the way some past attempts have just ignored the infrastructure that ensconses current terminals. And its a real shame that so many tools just hard-emit ANSI escape codes - there are even some TUI frameworks that do it.

The problem I see is that you seem to have the terminal doing things like fuzzy matching input against PATH executables. But that's the shell's domain. The terminal should just expose commands for adding text items to a drop down under the cursor, and the shell should send the matches to the terminal. And capabilities like this should be clearly defined in a terminfo page (which you should definitely have, even if for non-custom capabilities it uses the same definitions as xterm), so that well-written apps can send this information if and only if those capabilities are defined.

Of course this is a huge challenge, because if you do it this way your terminal doesn't do anything new until someone writes a program to run in it using its extended capabilities. So this creates a chicken and egg problem. But you can't come up with nearly as many interesting things for your terminal to do with cursor dropdowns as everyone in the world can if you're just exposing that in the same way the character grid is exposed.

Re: Black Screen: A modern terminal emulator based on Electron

#63
post #44
post #37

Earlier quoted context omitted.

urxvt also supports viewing images (or at least I know that because that's the emulator I use, maybe other emulators also support it) Like I know ranger has an option for it, but iirc there's also a way to just run a command ala `cat`ing a text file. If you'd like, I can look into it more if you can't already find out how to do it by searching. Also, people are mentioning feh, I'd like to plug in sxiv (not my program…

Wow, how? I use urxvt and dindn't know that.

Sorry for the late reply. I found it, I got the method from this blog post [1] initally. Also see [2].

However, I'm sad to say that when I tried this again rn, it didn't work anymore. (I know for a fact it used to work great because I used to use it.)

The funny thing is, ranger's image preview still works for me (same terminal and everything), so I guess one could start going through the ranger source code to see how they wrap w3mimagedisplay if they really wanted to.

I don't really have the motivation for that though because, although I'm a heavy terminal user (and it would be nice), recently switching to emacs means a lot of my file management can be done with dired (an emacs package). And dired can do image previews quite nicely already [3] (I'm assuming provided you're using GUI emacs^). ^^

^Emacs can fire up terminals inside it anyway, so using GUI emacs is not a problem for me, even though I'm heavily terminal orientated.

^^Although I think I prefer sxiv's thumbnail mode for browsing directories full of images (as opposed to a few here and there).

[1]: http://blog.z3bra.org/2014/01/images-in-terminal.html

[2]: https://github.com/hut/ranger/wiki/Image-Previews

[3]: https://github.com/ralesi/ranger#screencast

Re: Black Screen: A modern terminal emulator based on Electron

#65
post #37
post #9

Earlier quoted context omitted.

I would really love it if one of these web-based terminals managed to stick around. Just being able to view images in a terminal would be amazing. The trouble with building on web technologies seems to be that the overhead is just too high (eg. Atom) considering how many terminals the average developer has open at a time. I guess at least since it's based on Electron, it might have more longevity than something built…

urxvt also supports viewing images (or at least I know that because that's the emulator I use, maybe other emulators also support it) Like I know ranger has an option for it, but iirc there's also a way to just run a command ala `cat`ing a text file. If you'd like, I can look into it more if you can't already find out how to do it by searching. Also, people are mentioning feh, I'd like to plug in sxiv (not my program…

xterm supports tektronix vector graphics... And sixel (and regis). You can cat the graphics, and it will display (may have to build xterm from source -- Fedora enables tek, but not sixel, for example). GNU plot supports sixel.

Re: Black Screen: A modern terminal emulator based on Electron

#66

Earlier quoted context omitted.

Just being able to view images in a terminal would be amazing What are the advantages of that over using a dedicated image viewer program?

Focus and context. You don't have to switch to another application and, presumably, displayed image will stay in terminal output. It would be great for printing out inline performance graphs, or even sparklines.

sxiv .

Combine it with dwm :)

Re: Black Screen: A modern terminal emulator based on Electron

#67

Earlier quoted context omitted.

Feh is usually good enough for me. There's always catimg too if you really really want it in the terminal and don't care that it'll look terrible.

+1 on feh, although it doesn't work with gifs, and the author isn't planning to implement that support.

SVG is also not supported.

Re: Black Screen: A modern terminal emulator based on Electron

#69

Hello. I'm the author of Black Screen, and I'm upset this post has appeared on Hacker News. The terminal is at a very early stage; I don't even use it by myself. Although, it's nice to see that people show some interest.

I feel really sorry for the inconvenience, I just wanted to share your awesome project.

Re: Black Screen: A modern terminal emulator based on Electron

#70

Hello. I'm the author of Black Screen, and I'm upset this post has appeared on Hacker News. The terminal is at a very early stage; I don't even use it by myself. Although, it's nice to see that people show some interest.

Can you use another npm namespace?

. npm install black-screen

is far better t'han "install-all" for many reasons: better npm search, no namespace pollution, more semantic than such a generic name.

Please consider to change it.

Post reply on HN