Repository navigation
Conversation
d5a1c08 to
f11ce16
Compare
This sounds like it might have a significant performance impact. Have you actually tested the performance of this PR?
That sounds extremely hacky, which I am not a fan of. This will likely just cause an endless heap of issues with things like selection, so it's not something we can just throw in and forget about.
This seems to just pile on a heap of code to support a bunch of image protocols. I don't like the idea of adding thousands of lines to Alacritty for something with so little use. If we support any protocol it should be the simplest one without any performance impact. I see no benefit in supporting multiple formats.
What about support for devices below OpenGL 3.3? This is something we would like to look into for the future so adding more code that requires at least OpenGL 3.3+ does not seem ideal.
I see little reason for adding memoffset/lazy_static usually, but I haven't looked at the code yet. |
Same |
I launched vtebench three times, in the current Running $ base64 ./target/release/alacritty > /tmp/data
$ wc -l /tmp/data
635257 /tmp/data
# graphics branch
$ perf stat -e cycles,instructions,branches,branch-misses ./target/release/alacritty -e cat /tmp/data
Performance counter stats for './target/release/alacritty -e cat /tmp/data':
4,590,935,968 cycles
10,125,002,121 instructions # 2.21 insn per cycle
2,038,270,623 branches
4,651,069 branch-misses # 0.23% of all branches
0.854657772 seconds time elapsed
0.774462000 seconds user
0.466697000 seconds sys
# master branch
$ perf stat -e cycles,instructions,branches,branch-misses ./target/release/alacritty -e cat /tmp/data
Performance counter stats for './target/release/alacritty -e cat /tmp/data':
4,692,460,970 cycles
10,053,624,431 instructions # 2.14 insn per cycle
2,035,973,894 branches
4,795,961 branch-misses # 0.24% of all branches
0.855561156 seconds time elapsed
0.762745000 seconds user
0.493408000 seconds sys
I changed the NBSP character with a
Without comments and tests, the support for the iTerm2 protocol is less than 100 lines of code.
The only performance impact of this protocol is an extra branch in the
The fallback uses |
This issue is now fixed. |
That doesn't justify adding it. If Alacritty supports any graphics protocol, there should be one and it should be the simplest one available. |
|
I'm also getting the following error:
|
What is the output of |
|
96 or something like that iirc. |
|
I uploaded a fix in 387a224 to check if this fixes the problem. If this works, we may need to generate the code of the fragment shader dynamically, in order to use the 32 units if they are available in the hardware. |
|
@ayosec did you test the iTerm2 protocol with ranger? previewed images are kept on screen and not cleared, so new images are overlayed on top of the old ones, and images are kept in the background when text is rendered in the preview pane. Another issue is that the iterm2 graphics is working with tmux as long as the image file is small, but with large files, it looks like I'm hitting this, which is not an Alacritty issue but Alaciritty is spamming with warning messages like this:
You should be able replicate with:
Note that this issue doesn't happen when running ranger directly without going through a tmux session, and not when running in an ssh session. |
Ranger relies on overwriting images with spaces. The discussion in #910 rejected my first approach to be able to have this functionality. However, if we can change the implementation in this patch to use As a work-around, images can be replaced with the █ character (reversed with
This error happens because the base64 stream is incomplete. Did you use iTerm2 imgcat? It seems that tmux requires specific sequences to send images. Anyways, since iTerm2 will not be accepted, maybe it's not worth it to spend time debugging the issue. |
I can replicate the issue with the linked imgcat script and an image. I won't attach the image here because I'm not sure about its license but I can send it via email.
That's unfortunate, it would have been nice to have it. |
|
I guess it's better to wait for sixel to support 24-bit colors? |
|
Sixel isn't likely to change. |
|
I have updated the patch with the following changes:
|
|
Can your implementation of sixel convert 24bit colors into 256 colors and display a video efficiently? |
18fd66e to
0a41635
Compare
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
|
Because there's real resistance to both the specs that implement graphics and the entire desire for the feature altogether. There's a fork which is generally pretty well maintain for those who want it, but at least personally, I'm just as happy not having this or thinking about it. A terminal really shouldn't be rendering images or videos. |
This comment was marked as spam.
This comment was marked as spam.
|
Goodbye everyone! I switched to foot finally. It uses 20MiB only. I will miss you guys 🖤 |
Actually there is. For the user. Maintaining package off of the main package tree system exposes his system to inferior quality experience. The package doesn't upgrade automatically with the system, and the user is left with the responsibility to maintain the version himself and all the drawbacks that this creates. Please, consider merging this PR as an opt-in feature. This would be the most sensible thing to do as this is what the user-base wants. This PR (and the related issue) is by far the most commented one on this repo. |
unless the fork gets packaged |
I’ll just chime in to remind everyone that while there is certainly a userbase that wants this feature included, the number of comments on a Github issue is not a good metric to guide us here. If anything it just tells us the feature is controversial. A truly popular feature would have been included with little to no discussion. |
|
A trully popular feature that maintainers do not plan to merge would have a big amount of comments from people that want it. |
|
not even as a compile time flag? |
As an experienced software developer I strongly recommend avoiding all such options. Whether it’s a run time option or a compile time flag, any option you add effectively doubles your testing requirements. From then on you must run all your tests with the option on as well as off because otherwise the risk of breaking something is unacceptably high. One option is not too bad, but adding more just causes a combinatorial explosion. It’s bad enough that Alacritty already supports multiple platforms (Windows, OSX, Linux w/ X11, Linux w/ Wayland, etc). Doubling the maintenance costs yet again would be unreasonable. |
But so would a truly unpopular feature. Sheer number of comments is not a useful metric. |
|
I would vote to close this issue. I'm using alacritty fork with sixel, coz I like sixel. And I'm very thankful to ayosec for maintaining it. Alacritty author dont want sixel, he stated multiple times he would not add sixel to his project, so how about use fork, and move on with your life. |
While I agree with most of your points, and would also like to have this feature, I think your leave one important point out: whatever the size and wish of the userbase, in the end volunteer maintainers don't owe us anything. And while it seems like an easy choice to accept a contribution like this one, at the end of the day if the author can't guarantee maintaining this part of the codebase it ultimately falls upon maintainer(s) to take care of it as a result of bringing it to the codebase. It'd be the same for a feature flag too btw, I'd add that to @db48x's message as it becomes an additional burden to maintainers.
I'd agree even if I'd like it too. Close and maybe pin or add a word in the |
An explicit "non goals" or similar section might be the place to put it (as well as any other non-goals). |
The Alacritty author has said that he wants to keep this PR open.
Does GitHub allow author / org member to turn off comments? Maybe that's the best alternative to closing the PR. As long as the PR author is still able to add commits and comments. |
Sounds like a distribution issue more than a software issue. (Yes I know most distributions make it hard to use "foreign" packages. And yet some distributions make it easy (iirc Nix, Gentoo, Arch, ...)
Depending on the distribution you're using, you might just need to ask them to add the package in their build system.
Even if the author maintains this part of the codebase, it means additional work and longer time before each update.
What's the default state of the flag? Will distribution maintainers keep the default state or override it ? In any case, what can users do when they want to install the package with the flag in the opposite state? |
I believe solution of this problem is plugin-like system. So devs could make support for some graphics protocols and alacritty team could manage just their part. In downsides:
This idea kinda extreme and may be very painful to do. I really would like to see more things which brings features like this in alacritty. |
Merge ayosec graphics while retaining local tabs, sessions, and budget. Add a scoped terminfo name for Codex pets. Refs alacritty#4763
|
I've been using @ayosec's "alacritty-graphics" fork for over a year, and I genuinely love Alacritty. It's fast, lightweight, GPU-accelerated, and honestly one of the best terminals I've ever used. But at this point, I'm seriously considering moving on to Foot, and it's frustrating that the lack of native SIXEL support is what's finally pushing me away. @chrisduerr, this feature has been requested since 2017, and this PR has been open since 2021. We're approaching a decade of discussion over terminal graphics support, and I find it incredibly disappointing that something so useful still hasn't made it upstream. I use Yazi extensively, and image previews completely transform the experience, especially when navigating images and PDFs. I've been using SIXEL through the Alacritty graphics fork for over a year, and the terminal remains incredibly fast. From my experience, this isn't some obscure gimmick that adds nothing to the terminal. It's a genuinely useful feature that makes terminal-based workflows significantly better. I understand the concerns about performance, complexity, and long-term maintenance. But after all these years, I'm struggling to understand why there still isn't an acceptable path toward implementing this feature. Even an optional, experimental, disabled-by-default configuration would be preferable to having absolutely no upstream support. Yes, maintaining an optional feature involves additional work, but I don't think that automatically makes it an unreasonable compromise. And frankly, I disagree with the suggestion that Alacritty needs an entirely new plugin system just to make graphics support possible. That seems like an unnecessarily complicated solution to something that other lightweight terminals have already managed to implement. What bothers me most is that this increasingly feels like a lack of willingness to support the feature rather than an engineering problem that anyone is seriously interested in resolving. Whether that's the intention or not, the message I'm getting as a long-term user is that this functionality simply isn't important enough to the maintainers to ever become part of Alacritty. I genuinely appreciate what @ayosec has done with the graphics fork, but I also don't think maintaining a separate fork indefinitely should be the expected answer for users who want image rendering. It's frustrating having to rely on an alternative build of an otherwise excellent terminal just to get something I consider essential to my workflow. And that's ultimately why I'm working on moving to Foot. Not because I dislike Alacritty, but because I'm tired of waiting for functionality that I already know works extremely well in practice. @chrisduerr, I really hope you reconsider this position someday. I respect that it's your project and that you determine its direction, but that doesn't mean users can't be deeply disappointed by those decisions. After nearly a decade of discussion, it's hard not to feel like the requests from people who genuinely love using Alacritty are falling on deaf ears. I shouldn't have to abandon what I consider an almost perfect terminal just to get native image rendering. But here we are. It's a damn shame, because I really don't want to leave Alacritty. I just don't see a reason to keep waiting anymore. |
|
I tried foot just yesterday. I returned back to ayosec fork because lack of
mouse click to follow links.
I agree with you, today a terminal needs image support.
El mar, 13 oct 2026, 14:43, dillacorn ***@***.***> escribió:
… *dillacorn* left a comment (alacritty/alacritty#4763)
<#4763 (comment)>
I've been using @ayosec <https://github.com/ayosec>'s
"alacritty-graphics" fork for over a year, and I genuinely love Alacritty.
It's fast, lightweight, GPU-accelerated, and honestly one of the best
terminals I've ever used. But at this point, I'm seriously considering
moving on to Foot, and it's frustrating that the lack of native SIXEL
support is what's finally pushing me away.
@chrisduerr <https://github.com/chrisduerr>, this feature has been
requested since 2017, and this PR has been open since 2021. We're
approaching a decade of discussion over terminal graphics support, and I
find it incredibly disappointing that something so useful still hasn't made
it upstream.
I use Yazi extensively, and image previews completely transform the
experience, especially when navigating images and PDFs. I've been using
SIXEL through the Alacritty graphics fork for over a year, and the terminal
remains incredibly fast. From my experience, this isn't some obscure
gimmick that adds nothing to the terminal. It's a genuinely useful feature
that makes terminal-based workflows significantly better.
I understand the concerns about performance, complexity, and long-term
maintenance. But after all these years, I'm struggling to understand why
there still isn't an acceptable path toward implementing this feature. Even
an optional, experimental, disabled-by-default configuration would be
preferable to having absolutely no upstream support. Yes, maintaining an
optional feature involves additional work, but I don't think that
automatically makes it an unreasonable compromise.
And frankly, I disagree with the suggestion that Alacritty needs an
entirely new plugin system just to make graphics support possible. That
seems like an unnecessarily complicated solution to something that other
lightweight terminals have already managed to implement.
What bothers me most is that this increasingly feels like a lack of
willingness to support the feature rather than an engineering problem that
anyone is seriously interested in resolving. Whether that's the intention
or not, the message I'm getting as a long-term user is that this
functionality simply isn't important enough to the maintainers to ever
become part of Alacritty.
I genuinely appreciate what @ayosec <https://github.com/ayosec> has done
with the graphics fork, but I also don't think maintaining a separate fork
indefinitely should be the expected answer for users who want image
rendering. It's frustrating having to rely on an alternative build of an
otherwise excellent terminal just to get something I consider essential to
my workflow.
And that's ultimately why I'm working on moving to Foot. Not because I
dislike Alacritty, but because I'm tired of waiting for functionality that
I already know works extremely well in practice.
@chrisduerr <https://github.com/chrisduerr>, I really hope you reconsider
this position someday. I respect that it's your project and that you
determine its direction, but that doesn't mean users can't be deeply
disappointed by those decisions. After nearly a decade of discussion, it's
hard not to feel like the requests from people who genuinely love using
Alacritty are falling on deaf ears.
I shouldn't have to abandon what I consider an almost perfect terminal
just to get native image rendering. But here we are.
It's a damn shame, because I really don't want to leave Alacritty. I just
don't see a reason to keep waiting anymore.
—
Reply to this email directly, view it on GitHub
<#4763?email_source=notifications&email_token=AV2IZZEVG3YALJNO4MVGAAL5TYPQJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMJUGU4DAMJQG422M4TFMFZW63VGNVQW45LBNSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-6145801075>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV2IZZF3CYE2S2WJ7HISE635TYPQJAVCNFSNUABDKJSXA33TNF2G64TZHM2TCOJYGA2DKNJ3JFZXG5LFHM4DAMJXGQ2TANRYUF3AE>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AV2IZZF7PC3LYLYLY6MW5Z35TYPQJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMJUGU4DAMJQG422M4TFMFZW63VGNVQW45LBNSSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/AV2IZZFSPJOGKI3MBTOB5TT5TYPQJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMMJUGU4DAMJQG422M4TFMFZW63VGNVQW45LBNSSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
FWIW, alternatives and history of the decision is here: https://codeberg.org/dnkl/foot/issues/1028 |
|
Just a little reply to @dillacorn's comment, since it seems like some time went into it. Ultimately I don't think anything of this is going to be news:
This is my sentiment too. A plugin system is complicated and exists mostly to ship subpar work. We don't need to introduce complexity just to allow subpar work.
I think ultimately this is what it boils down to and it's a fair assessment of the situation. While the size of this PR relative to Alacritty itself is big, it's not really what is blocking this. The main reason this is likely not going to be merged is that none of the maintainers are interested in images in their terminal and I've had several encounters with users in the past that asked for this feature specifically to turn terminals into GUIs. Generally I can somewhat understand the benefit of a quick, cat-like image preview, but that's not usually why people are requesting this feature in my experience.
I do agree that ayosec's support for this PR has been exceptional and not something that should be expected. That said, considering this fork exists, I think it's not that bad for people to build and use this. |
I'd argue that people using the fork could even simply download ayosec's builds without having to build it themselves. If it's a question of getting updates directly from a package manager, just ask your distribution's people if they would kindly make the fork available as an alternative package. I'd be surprised if they refuse, but I'd be interested in their arguments if they do. If it's a question of allowing the graphics functionality to survive in the event ayosec decides to stop maintaining the fork, it's only displacing the hypothetical problem of finding a new maintainer while adding code and recurring workloads (which have been previously discussed) To all people asking for the functionality to be merged upstream, what are you actually losing by using the fork ? (That isn't already covered by the two options above) |
I want to again speak out against this type of entitlement. You should not be bothered that the author or maintainer has expressed their personal preferences and chosen not to implement a feature you want. They’re the author, and you are not. It’s their personal opinions that matter, not yours. Your opinion only matters when it comes to choosing which software you personally use. There are hundreds of terminal emulators to choose from. I myself use WezTerm. I think it’s pretty good. It supports Sixels and even lets you click on links (although I mention that only because someone just brought it up; it’s not a feature I personally care much about).
It also doesn’t matter at all how long the PR has existed, or how long people have been discussing the feature. That’s just not relevant at all.
Quite frankly I don’t think you do respect him. If you did you wouldn’t have made this argument. Especially since he made his opinion clear early on that he didn’t want to support images at all. The discussion cannot have fallen on deaf ears if the author considered the matter and then said no. |
I understand your perspective. Looking back, I can see how my frustration came across stronger than intended. But I don't think expressing disappointment is entitlement. I respect @chrisduerr's decisions, and my suggestion for optional, disabled-by-default SIXEL support, if feasible to maintain, isn't a demand.
I disagree. I think user feedback matters too, even when maintainers choose not to act on it.
I understand that time doesn't create an obligation. It simply explains my frustration after years of enjoying Alacritty.
I honestly never expected @chrisduerr to respond, especially since I haven't contributed to the project. The fact that he took the time to engage with me actually increased my respect for him. I appreciate that.
Fair point. He's heard the feedback and made his decision. I'm disappointed with the outcome, not suggesting he hasn't listened. I've enjoyed @ayosec's graphics fork, but rebuilding and installing updates adds maintenance overhead when distributing a desktop environment to other users. I've since switched to Foot and I'm happy with it. Alacritty is still an excellent terminal, and it's perfectly fine if SIXEL is never supported natively. I just wanted to share why I was disappointed to leave. Anyway, I'll leave it there to avoid cluttering the PR with further discussion. Thanks for hearing me out. |
|
I like alacritty because it is conservative. Gives me security. But also: I need to view images in the terminal now and then. Thus, this fork is an OK solution. Also, with modern LLMs it is trivial to hard fork and patch/update the codebase yourself. But that is wasteful in comparison with a concentrated effort. Now that this discussion has been rejuvenated: what about supporting the kitty graphics protocol in the ayosec fork? It has gained a lot of traction, but the spec has many features, most of which I personally do not need. AFAIK there has not been any breaking changes to the basic protocol, and perhaps just a subset of it could be implemented. Thoughts? |
isnt this better as an issue directly on his fork |
True. Actually one issue with the fork is that only a few people actively follow it on Github (66k vs 226 likes etc), this is perhaps due to its unofficial status. One suggestion is that it could be semi-legitimised by advertising it on the front page README for people that want Sixels. For example, I have been using the fork for many years now, and I do not follow it in any other way than this PR :) But sure, let's stop with the notification spam now. |


This patch adds support for graphics in the terminal. Graphics can be sent as Sixel images.
New features
Sixel parser
The Sixel parser is based on the SIXEL GRAPHICS EXTENSION chapter in a DEC manual.
The support is complete except for the pixel aspect ratio parameters. According to the manual, a Sixel image can specify that it expects a specific shape for the pixels in the device, but in none of terminals that I checked these parameters had any effect: they always assume a 1:1 ratio. Also, I didn't find any Sixel generator that emits a different ratio. To avoid extra complexity in the parser, it always assume 1:1 when the image is built.
There are two new terminal modes:
SixelScrolling(80)If enabled, new graphics are inserted at the cursor position, and they can scroll the grid.
If disabled, new graphics are inserted at top-left, and they are limited by the height of the window.
SixelPrivateColorRegisters(1070)If enabled, every Sixel parser has its own color palette.
If disabled, Sixel images can share a color palette.
Initially I didn't plan to support this mode, since it seems to be specific to xterm, but when I was testing applications using Sixel I found that mpv uses it to reuse a palette between video frames. Since mpv is based on libsixel, I guess that this feature could be used by more applications.
Both modes are enabled by default.
The function to convert HLS colors to RGB is a direct port of the implementation of the same function in xterm. I verified that the function emits the same results in all combinations of values 0, 30, 60, 90, and 100 in every color component. Only a few of these combinations were left in the tests to reduce the noise in the code.
To test the parser there are Sixel images generated with 3 different applications. For each one, there is a
.rgbafile in the same directory with the expected RGBA values. The commands to produce these files are inalacritty_terminal/tests/sixel/README.md.Byte
90as DCSSixel images using byte
90as DCS are not supported. DCS can be eitherESC Por90, but thevtecrate only recognizesESC P. I guess that this is because90can be a continuation byte in a UTF-8 sequence (two most significant bits are10), so it can be a valid input from users.Xterm has the same limitation. I don't expect that many applications depends on it.
ppmtosixelis an exception. It uses90to start the Sixel data, and it has to be replaced if we want to see an image generated by it.It is still interesting to test
ppmtosixelbecause it was written in 1991, long before Sixel was added to most (if not all) terminal emulators.