12 ms·
Are We Sixel Yet
- pimlottc 3y agoPlease, let's move away from red and green as "good"/"bad" colors. It's hard to tell the difference for colorblind folks, especially when the symbols used are quite similar.
- robertlagrant 3y agoIt's useful, though: Green: moral Red: immoral Red green colourblind: amoral
- noizejoy 3y agoThat makes me wonder, if it should be solved client side by translating server side colours to something different on the client, according to the user’s needs.
- mk_stjames 3y agoThere are absolutely solutions that do exactly that client side (just mapping the colors from the hard-to-tell-apart hues to other hues depending on which type of color blindness). For instance, in Mac OS, under Accessibility there are 'Color Filters' with a dropdown for presets for a few common types of colorblindness including red/green. It is a filter that is applied systemwide at the graphic output level. I think this is the proper approach (device-level color filtering) versus each app attempting to serve all, as that could lead to double-filtering.
- Am4TIfIsER0ppos 3y ago[flagged]
- smasher164 3y agoSorry about this. I assumed that checkmark/cross would compensate for this color combination, but I agree that better colors would make this more accessible for everyone. From what I'm reading online, Blue / Red is a better combination here?
- amluto 3y agoThis led to a rabbit hole. Here’s kitty’s competing protocol: https://sw.kovidgoyal.net/kitty/graphics-protocol/ https://sw.kovidgoyal.net/kitty/graphics-protocol/ Look at the “The transmission medium” section. I’m reasonably familiar with what can go wrong when messing with files you shouldn’t mess with on Linux, I’ve worked on the various security mechanisms that can help, and I would not want to implement this. If someone wanted me to consult on implementing this, my advice would be, first and foremost, not to. There isn’t even a “security considerations” section in the document!
- syncsynchalt 3y agoSince your comment is (was) topmost, I want to clarify that while kitty seems to have an overlarge attack surface, Sixel doesn't seem bad at all. There's an escape code to enter "sixel" mode, then base64-style data representing 1x6 pixel bitmaps, then an escape code to get back out. No vector graphics that might overdraw unexpectedly (security considerations!), no mechanism for out-of-band data (security considerations!), no unproven compression libraries (security considerations!), but also none of the extra magic that something like kitty would provide. I could live happily with Sixel being universally supported in my terminal emulators.
- amluto 3y ago> I could live happily with Sixel being universally supported in terminal emulators. Me too! If I want fast graphics from a local application, there are a couple of widely available ways to make it work. X11 and Wayland come to mind :)
- aumerle 3y agoFUD as usual. I am so sick of people waving around the security word. If you are scared of dealing with files on Linux, I suggest you throw your computer in the garbage and retire to a mountain fastness with no electricity. If you have a specific criticism of the kitty protocol make it, otherwise spare us the vague FUD.
- 3y ago
- __MatrixMan__ 3y agoI was sad to see that alacritty doesn't support it. I like their vim-selection-mode (even if it is missing a few movements). I'd like to play with terminal graphics in a an app I'm working on. Does anybody know if a terminal which supports: - wayland - sixel - copying substrings without a mouse I know I can just pipe to wl-copy, but sometimes the right chain of sed & awk is less convenient than the right chain of vim highlight movements.
- the_gipsy 3y agoI am using alacritty with a sixel patch. Sadly, the maintainers aren't interested in supporting sixel or kitty graphics.
- cycomanic 3y agoIIRC we term can do it. I was an alacritty/kitty user for quite a while, but have since moved to wezterm because it is just more pleasant to use. I did see some crashes for a while but they seem to be fixed now.
- busfahrer 3y agoFWIW, it might be worth mentioning in this context that iTerm 2 also has its own protocol for displaying pixels, so you can cat images in the terminal using an "imgcat" script that they offer for download: https://iterm2.com/documentation-images.html https://iterm2.com/documentation-images.html
- kps 3y agoThat is also supported by some other terminals; at least mlterm and Konsole handle it.
- smasher164 3y agoI was debating whether or not I should mention iTerm's image protocol, since iTerm already supports SIXEL.
- JdeBP 3y agoFor the record: My terminal emulator does not do sixel, and providing that or any other graphics mechanism is not a design goal, and not in keeping with the internal mechanics of storing the terminal display as an array of character code points. The terminal emulators that my terminal emulator is designed to supplant, the kernel built-in emulators of Linux, FreeBSD, OpenBSD, NetBSD, and indeed SCO Unix, don't do sixel graphics. This is not to say that I am against sixel. As someone who was doing graphics on terminals in the 1980s, sometimes by accident when I catted the wrong file, the idea that "terminals don't do graphics" seems blinkered and ahistoric to me. They do and did, in my direct experience. I'm simply not targetting that as a feature in a program that has the specific goal of matching specific kernel built-in emulators. You know where XTerm is if you want it. (-: On the gripping hand, my terminal emulator does Unicode (as do several of the kernel built-in ones, albeit with severe limitations), and so all of the things that one can do with Unicode pseudo-graphics are possible on it, from MouseText windows through progress bars using the 1/8th block glyph set to PC-style line drawing.
- Aerbil313 3y agoWhy do I smell another “just adding more capability…” thing turning into an OS? Maybe only for devs? Sure there’s a long way, but I see it coming. This time without DOM.
- schappim 3y agoToday I learned about Terminal Graphics Protocol (an alternative to Sixel): https://news.ycombinator.com/item?id=35940691 https://news.ycombinator.com/item?id=35940691
- RupertEisenhart 3y agoI just started using this! I'm making a tool called command-line-maps, its gonna be amazing. Echoing another comment here, it doesn't work in tmux though which is pretty heartbreaking. But viewing beautiful maps in the terminal is amazing, and works perfectly. (I'm using the alacritty branch that supports it, worked perfectly.)
- shmerl 3y agoAny example echo command to test it?
- rbanffy 3y agoLove the idea, but Sixels are a can of worms - it’s inefficient and it’s unclear how they should map to physical pixels - most do 1:1 but I’d prefer a more historically accurate mapping similar to the original terminals that supported them. It was originally designed for dot-matrix printing and later implemented in CRT terminals. Also, ReGIS and Tektronix (disclaimer: I proposed including Tek graphics in VTE) could also be very useful.
- aa-jv 3y ago>how they should map to physical pixels - most do 1:1 Isn't this can of worms inherent to the subject, anyway? This question has been asked - and answered - by pretty much every rendering/display system, ever. Seems to me, sixel adoption at this point is the pre-cursor to optimization ...
- kps 3y agoIs ReGIS support uncommon? I know the terminal I use on Linux (mlterm) does, as does plain ol' xterm of course. (As an aside, it's annoying how many terminals set TERM to `xterm-256color` without being xterm compatible.)
- rbanffy 3y agoI’m not sure - not many terminals advertise it. And yes - terminals lying on TERM is extremely annoying. Pretty much everything that has ever existed has a terminfo entry.
- koterpillar 3y agoDoes Sixel have a spec? I.e. how large are the pixels, whether there's a newline after the image (couldn't find how to turn that _off_)? Recently discovered Kitty's graphics protocol (https://sw.kovidgoyal.net/kitty/graphics-protocol/ https://sw.kovidgoyal.net/kitty/graphics-protocol/) which has more features or at least more documented ones :)
- mananaysiempre 3y ago> Does Sixel have a spec? DEC invented Sixels back in the ’80s, and they were serious about their docs, so the corresponding chapter of the VT3xx manual[1] is probably as good as it gets. > I.e. how large are the pixels [...]. Historical implementations likely assume the relation between pixels and character cells that’s implied by the geometry of the DEC fonts. I’ve seen a lot of arguing about adapting this to the modern world, but I don’t know if a consensus has emerged. [1] https://vt100.net/docs/vt3xx-gp/chapter14.html https://vt100.net/docs/vt3xx-gp/chapter14.html
- KirillPanov 3y agoNo, there is an escape code that queries the window size in pixels: "\x1b[14t" Combined with the escape code that queries the window size in character cells ("\x1b[18t"), you can calculate the number of pixels per character cell (the "pixel size").
- the_gipsy 3y agoAre these escape codes actually implemented in the average terminal? I recently tried to get e.g. alacritty to tell me this stuff but I don't even know how you're supposed to red back the response.
- kps 3y agoYes, every xterm-compatible should have them. You just send the particular query (e.g. ‘CSI 14 t’) and the terminal sends back a response in the defined form¹. Of course you'll want raw mode, echo off, etc. Normally a library like curses does this for you. If you want to see, https://gist.github.com/kpschoedel/6a87ec2157ce2140be69193d18e14e3e https://gist.github.com/kpschoedel/6a87ec2157ce2140be69193d1... (I just whipped this up to answer the question; don't expect production quality) ¹ https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_ https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-F...
- kmac_ 3y agoKitty term has it's own modern protocol which gets more traction.
- mananaysiempre 3y ago> Kitty [graphics protocol] gets more traction. I guess that may be true in some senses, but per Nick Black[1] (of Notcurses fame) the set of Kitty graphics protocol implementations consists of Kitty and Wezterm, that’s it. [1] https://github.com/alacritty/alacritty/issues/910#issuecomment-1546767886 https://github.com/alacritty/alacritty/issues/910#issuecomme...
- traverseda 3y agoAlso kde's konsole.
- mfeldheim 3y agoWhat’s the point? Why would I want images in my console?
- omoikane 3y agoShow images inline and have it scroll with other text. This is useful for working with programs that process images. For example, ImageMagick can render a PNG in the terminal like this: convert image.png six:- "six" means use Sixel format, and "-" tells it to write to stdout. Demo (running on cygwin's mintty): https://twitter.com/uguu_org/status/1631207051602042880 https://twitter.com/uguu_org/status/1631207051602042880
- daliusd 3y agoChecking snapshot diffs from git repo. I would love doing that in terminal instead of opening in external app. I have scripts that do diffing and opens results in external app, but I will replace this with in-terminal images when I will find out a way to do that.
- drdebug 3y agoDisplaying the result of a command as a graph (histograms, plots) can be more pleasant than a bunch of **** bars. An external graphic window works well too, but displaying in place can be convenient sometimes, no need to click or alt-tab.
- Aardwolf 3y agoMathematical plots, seeing the result of AI generated images, seeing the result of image compression algorithms, ... Having these intermixed between the regular scrollable textual output is quite powerful.
- TeddyDD 3y agoThis is good example why: https://nitter.it/thingskatedid/status/1316074032379248640#m https://nitter.it/thingskatedid/status/1316074032379248640#m
- quickthrower2 3y ago
- detrites 3y agoThis is great but presentation has lots of repeated text, and is hard to get a full picture. Probably work better if it was a comparison table, with ticks and crosses all in one column.
- smasher164 3y agoYeah, sorry about that. I threw this together with the first terminal-like Hugo theme I could find, since I wanted to focus on getting the info out there. I'd probably either have to create a custom theme, or just rewrite the site from scratch. Your point is noted though--others have brought this up.
- iforgotpassword 3y agoThis. At least add the check/cross to the table at the beginning, so you can get an idea how widespread support is. Having to scroll down is really annoying.
- Aardwolf 3y agoSixels are cool. There's one thing I wish konsole would do better: if you draw a sixel image, and then zoom in/out, the image should also zoom in/out. It should scale the sixel graphics and the regular text the same way. And the kitty protocol also supported by konsole has the exact same issue last time I tried, doesn't zoom in.
- csdvrx 3y agoWorks in mintty on Windows: just install msys2 and try it. It's a simple feature, considering mintty was built on top of putty
- RustyRussell 3y agoFor those who like me had no idea what a sixel was: https://en.m.wikipedia.org/wiki/Sixel https://en.m.wikipedia.org/wiki/Sixel
- TeddyDD 3y agoSee also rant[1] of sixel-tmux author. > It's 2021, and we should be able to do litterate programming in the console, with full graphical support. Yeah. We are stuck cosplaying computers from the sixties. What's even funnier, even if you find a modern terminal emulator that supports features like ligatures, graphics, emoji etc. you still will be blocked by tmux. Sure - not everyone needs tmux. If you never work on remote machines, you can live without it. But I work on remote machines all the time. I also use Kakoune text editor that defers window management to external tools (WM or tmux, but to be honest, tmux is much better). Zellij is more of r/unixporn bait than usable tool for now. So I'm stuck with text only interface. [1]: https://github.com/csdvrx/sixel-tmux/blob/main/RANTS.md https://github.com/csdvrx/sixel-tmux/blob/main/RANTS.md
- Per_Bothner 3y agoI think DomTerm (in addition handling sixels and extended emoji) does multi-plexing and remoting quite well. Remote access (https://domterm.org/Remoting-over-ssh.html https://domterm.org/Remoting-over-ssh.html) is done with a simple wrapper over ssh. Mosh-style predictive echo. No special priviliges needed: Just drop a domterm executable somewhere on the remote machine. Multiplexing with tabs and tiles that can be dragged between windows. Builtin attach/detach.
- opan 3y ago>Sure - not everyone needs tmux. If you never work on remote machines, you can live without it. I'd rather not live without it even on local stuff. It's way too good. Yes, I already use a tiling wm, and no it's not the same.
- 3np 3y agohttps://github.com/topcat001/tmux/tree/sixel https://github.com/topcat001/tmux/tree/sixel This is a more promising and updated sixel branch of tmux, which is slowly getting updates propagated to mainline.
- sgt 3y agoNever got into tmux, still using screen after all these years. Is tmux still claimed to be superior?
- jackhalford 3y agoThis would be amazing to implement a jupyter kernel natively in the terminal!! can’t wait
- anonacct37 3y agoI'm excited to tell you it already exists with kitty and euporie https://github.com/joouha/euporie https://github.com/joouha/euporie
- snvzz 3y agoOP should have linked the page as-is, without the #terminalapp part of the URL. Do not assume my terminal!
- sundarurfriend 3y agoProbably unintentional. People often click into subsections of the page and then submit their current URL as it is, without realizing they're linking to a subsection of the page.
- pohl 3y agoI think it's fair to call Terminal.app out especially, though. It's in sore need of an uplift in many ways — with True Color support being another annoying example. In a few weeks at WWDC we'll find out if they've ignored it again for another year.
- QuadrupleA 3y agoShouldn't you just use a web browser or a GUI at some point, if you're trying to do graphics? Adding bitmaps seems like feature creep, muddying the whole purpose and appeal of the terminal. Next you'll want accessibility, alt text for blind readers, DPI awareness, responsive scaling on different screens, etc.
- IshKebab 3y agoI don't think so. There are plenty of terminal based programs that would clearly benefit from proper graphics. And doing it in the terminal means you don't have to set up a second connection, e.g. when you're using SSH. That said it's disappointing that the best we can do is Sixel, a hilariously inefficient and ancient format.
- JdeBP 3y agoIf this is feature creep at all, this is very old feature creep. It happened in 1981, when the ability to do graphics, actually available on some specialized terminals from the decade before, became mainstream in the world of character mode terminals, when DEC put Sixel and ReGIS into its VT range. It has been in XTerm since the 20th century, and terminal emulators for MS/PC/DR-DOS like Reflection gained Sixel support somewhere around 1989. Don't be fooled into thinking that "the terminal" is what one can do on the kernel virtual terminals of Linux, FreeBSD, or SCO Xenix. The reality is that the massive reinvention wave of the 1990s and 2000s has actually lost you functionality that was in real, hardware, terminals and contemporary terminal emulation programs of the 1980s, and given those who never lived it a very blinkered idea of terminal functionality based upon 1960s TeleType terminals that was a little outdated even when Unix itself was invented.
- gary_0 3y agoI agree we should tread carefully regarding feature creep, but it's already very common to display graphical data in the terminal with ASCII art or Unicode. Adding basic bitmaps would remove the need for those hacks. Convenient terminal tools already exist for viewing formatted text like Markdown or HTML, or viewing binary data like ELF files, or showing live dashboards like htop... but images still require launching a separate application. And this is all data that you might produce while working solely within the terminal--only to have to visit GUI land to see what's in a PNG file. It's a pretty obvious gap.
- ok123456 3y agoMissing mlterm
- kps 3y agoThere are two of us! https://news.ycombinator.com/item?id=34373035 https://news.ycombinator.com/item?id=34373035 It's there: https://www.arewesixelyet.com/#mlterm https://www.arewesixelyet.com/#mlterm