-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement scrollback #124
Comments
I would also love to see scrolling. I fully share your point of view regarding tabs and tiling (I use a tiling window manager, so no need for that). But scrollback is really something basic to me that shouldn't belong in a separate program. But of course, the classification into "basic" and "not basic" is quite subjective :) |
I'm not committing to adding this just yet, but I would like to mention something for those against this decision. If Alacritty were to add scrolling support, it would be as an opt-in feature. When not opting in, the code paths would be completely compiled out, and performance would not suffer. |
@jwilm how do you use your terminal without scrollback? 🤔 (curious) |
https://github.com/jwilm/alacritty#about
|
It is worth noting that while Alacritty is the fastest terminal emulator on systems without the Mesa bug, "Alacritty + tmux" is actually slower than some other terminals which provide scrollback without tmux. Therefore, if you are only using tmux to get scrollback and are not interested in its other features, Alacritty is not your fastest option anymore. |
Besides scrollback tmux handles window resizing with lines wrapping. I've tried many lightweight terminals - each one was buggy with this. So it was the main reason why I started using tmux. |
Alacritty could be the first one that gets it right :) |
@kurnevsky @dbrgn The 0.8.x releases of xfce4-terminal (released during the last 6 months) have been great at wrapping lines for me. XFCE is also known to be quite minimal and not requiring a lot of dependencies. If you're still looking for a good minimal terminal with scrollback and line wrap I suggest you try it. |
Perhaps I have a rather niche use case, but I find scrollback an extremely important feature. Instead of using PS: I know how annoying it can be for random users to whine about lacking features.. So I thought I could offer to try and implement this in my spare time. I have about a year of experience using Rust 'as a hobbyist' on weekends. The problem is, I have no experience with terminal emulators and it might take a while to get my head around this codebase. |
Thanks for the feedback @neon64!
This was actually a rather common sentiment in response to the initial Alacritty announcement. I've actually switched to using i3 and have relegated my own use of tmux to remote machines. As such, I'm now in a similar boat wishing for scrollback 😆.
Quite the contrary, actually! It's incredibly helpful to hear what users want. This is part of how features are prioritized.
I would be more than happy to help acquaint you with the codebase. I haven't (yet) put much thought into how scrollback should be implemented, but I do have a few initial thoughts:
|
a scheduled pre-build build, distributed by homebrew cask would cool 👍 |
Btw @neon64, if you want to ask questions about the code, I'd be more than happy to talk about it in our IRC channel. |
Thanks for the assistance @jwilm - I'll have a look myself over the next few days and see if I can do anything... |
A few specific use cases where tmux for scrolling can result in a pretty unstable experience:
|
@denten I have no such problems. I start tmux with this in my |
Thanks @algesten. Tmux has the potential to lock up the system when logging in without a display/login manager due to the way it attaches to x / screens. My .bashrc looked more or less the same as yours. Both Arch and Debian wikis discuss the problem and warn against starting tmux automatically with each bash session. I manged to fix it on my system with much effort (launch Arch from USB, mount drive, revert the .bashrc changes). My point is that starting tmux on each session just for scrollback is far from "simple" as the Readme suggests. It has pretty significant and non-obvious side effects which include affecting system login behavior and clipboard behavior. Sessions are another point of complexity. Tmux is not really made to be managed externally. Like many users, I launch and kill hundreds of terminal windows, where I do not want to attach to an existing session. This quickly results in a mountain of abandoned Tmux sessions. I am sure it is possible to figure a way out of it, or to change the way I use my window manager, but that is not really the point. I just want scrollback, not the added baggage of a complex and powerful tool like Tmux. I am adding these notes to help developers understand the effects of their design decision not to include a basic feature like scrollback. In my case, after losing about a day on battling w/ Alacritty, I went back to gnome-terminal (which by the way is pretty fast in its own right). |
@denten it seems the decision that scrollback will be accepted as an alacritty feature is done. |
@torpak that's right! |
re: starting tmux in bashrc, I simply maintain two shortcuts: This fixes both issues given:
This isn't an issue with tmux not being made to be managed externally, but rather not intended to be shoehorned into something that's meant to be initializing your shell - putting anything of that sort in there is bound to potentially cause similar problems. Mostly leaving this here for people that assume that adding some line to their rcs is the one-true-way:tm: to launch tmux, and are weary of the issues that are bound to come along if one does that. |
Would there be a possibility of integrating with tmux for this scrollback, similar to how iTerm2 does it, and also planned to be implemented by Terminator? |
@jwilm I've been trying to take your suggestion "Maybe the Grid should become a view into the scroll/line buffer?" on board, and see if it will work when the Grid is a view into a The other issue I've encountered, is that other terminals (eg: Gnome Terminal) store lines unwrapped (so that upon changing screen size the text can be rewrapped easily), whereas Alacritty doesn't. Its not really a dealbreaker for me, but I thought I'd just point it out because a fix could be part of this scrollback implementation. Final question, are we aiming for line-by-line or pixel-by-pixel scrolling?Of course pixel-by-pixel looks nicer, but would likely require a bit more work (including modifying the renderer to take a pixel offset, rather than just changing terminal grid impl). Edit: Personally I'm all for pixel because I love eye-candy |
Could the idea to integrate with tmux be discussed as well? It sounds really interesting to have one scrollback instead of two independent ones, but I see quite a few 👎 - what are the drawbacks of that approach? |
What needs integrating? Tmux can already provide scrollback to alacritty. Additional integration will do nothing to help people who don't use tmux. |
@zakora I second that. |
Is it possible this conflicts with the alacritty as a library branch? Thats the main thing I could think that would hold back this merge... |
Why would it be an issue for alacritty as a library? Can't the library functionality exists regardless of the scrolling feature? |
It was just speculation |
Gotcha, I thought there was an actual limitation there and, if it did, I'd like to know. |
Another +1 here for built-in scrollback. I don't mind whether it's an opt-in or not. Currently building @neon64's scrollback commit to see how that works for me. Will report back later. |
@zakora you read my mind; have already tried it :) (running it right now) and it works great, as far as the scrolling goes. For the record, Neon64's scrollback implementation also appeared to work well for me; I didn't do any performance testing or compare the two implementations, but given that (if I understand) the development is going in a direction NOT the Neon64 implementation, I'll continue to work with the jwilm scrollback branch for the time being. |
So how do I scroll? I'm confused. Mouse wheel does nothing. |
As long as this issue is still open, alacritty does not yet implement scrollback in the master branch. |
@sajattack If you take the time to read from the first comment in this issue it points to scrolling by using tmux. If you don't know what it is, look it up, it is a terminal multiplexer. |
Hopefully scrollback will be optional. I'm using Alacritty mostly because it doesn't have scrollback. |
@yegortimoshenko The scrollback history size is already completely up to the user to choose. So it's already possible to disable scrollback history, no worries! :) |
Would love the option. The faux scrollback in Vim works really natively, and its always a surprise when there's a stack trace to big for my window. Looking forward to trying this setup via #1147. |
Any idea when this will be merged? It's been open quite a while now 😄. Thanks! |
From a technical perspective I think most issues on scrollback are resolved. A longer testing period is always a good thing but as far as I know this branch already has a fair share of users. At this point it comes down to jwilm when scrollback is ready for merging. I'm not aware of anything that can be done to accelerate the process by anyone else. |
I've been using the scrollback branch for a few weeks and haven't had any problems at all! It might be difficult to get a sense of exactly how many people are using it, but I imagine the number is non-trivial. Perhaps people can add a reaction to this comment if you're already using the scrollback branch? |
Thanks for the feedback @shazow, it's always easier to see when things are broken than when things are working well. So feedback like this is much appreciated. |
I've just checked out the latest version of this branch, compiled and installed it with Having a few problems. I've noticed that holding down keys doesn't work. The window also has a strange decoration with red/yellow/green buttons in the top right. Additionally, |
@c-edw can you verify those problems are specific to the scrollback branch? |
@kpcyrd Nope, they're on master too, not sure why I thought it was restricted to scrollback. |
Hey, it seems that you're using Linux with Wayland (default on latest Gnome DE and some Linux distros). If that's the case, you should run Alacritty with Wayland-backend disabled as stated in the "Edit" of this reply: #97 (comment) ( |
@nirfse Thanks for the info. I remember having to do this a while ago. Unfortunately, I'm now getting |
@c-edw That was a build error due to one of our dependencies. It has already been resolved on both master and scrollback. |
@chrisduerr Great, works! Everything seems to be working for me then, I will continue to test the scrollback branch until it is merged. |
Hi all, |
for context #1147 added scrollback. This was the alacritty blocker for me, I can't wait to use it! Thanks for the hard work. |
Since you got so much pushback on the scrollback support, and mentioned possibly implementing it,
I'm opening this as a tracking issue.
(ps: I also really want scrollback w/o tmux).
The text was updated successfully, but these errors were encountered: