-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Extract into library/widget #450
Comments
This would enable a lot of really cool use cases, like a quake-style drop-down terminal. |
I created #635 without seeing this ticket, but this one very relevant to the issue I created so I'll close mine. I'm interested in creating a terminal multiplexer in Rust, particularly if it'd be possible to make one which was in the realm of the performance of alacritty as tmux has trouble keeping up with it on my machine. I think that thinking about how abstracting a library out in the context of creating virtual terminals might be an interesting thought experiment. |
It would be nice to just have a toggle for a Quake style drop down. Though, I guess a simple bash script would work for most desktops / wms. |
I spent some time researching how to implement #168 and #686 and I came to the conclusion that this issue would be a better way to approach it. For each of these platform-specific issues, winit would have to expose some platform specific api, especially considering issues like #161, where the interface to configure these settings can't really be abstracted across platforms. https://github.com/google/xi-editor is a good example of the approach of implementing a core, platform-agnostic "backend", with separate platform-specific "frontend" applications that consume the backend as a dependency.
I think winit is valuable for applications that want to be consistent across platforms, but I think alacritty is more compelling as a more native experience. I think this would also make it easier for more people to contribute to these platform-specific UI issues. I believe this would also address #585. |
This is a great idea. You could conceivably even embed it in views in framebuffers for games and things like that. |
I'm all for this but I'd appreciate if we could wait until #28 is done as it's likely to touch a lot of the same code. |
I have no idea how much work has gone into the windows support yet, but it might make more sense to do this before adding windows support. |
@nixpulvis I've already done a large part of the work in event_loop.rs and tty.rs which are the main files that this would extract. I think I'll probably be done in a couple of weeks. |
My use case would be a shell for an interpreter embedded in my application. It would be nice to have say, IPython work properly, for example. |
I've done a bit of work on this and pushed it at #1023 |
I want to use alacritty to create animated gifs of terminal playback rather than embed an interactive terminal. I've used the WIP and have been able to render a static image using a glutin There are some issues when doing this though, which I will post in the PR. I believe this can be useful for rendering reftests in the project as well. |
@LegNeato This is really neat!
I've wanted this feature for such a long time! |
I was able to solve most of my problems without needing any changes to the WIP PR. This is an animated gif created by replaying a saved terminal session in an (click through to see animation if it looks static) This is slightly different from the previous image in that I am pumping saved output to alacritty to display rather than pumping commands for the terminal to run and then display. For example, in this one the date is constant and in the other one it changes every time the binary is run (as it is really running I'll do a write up on some stuff tomorrow. |
What needs to be done to push this through? |
Get #1023 merged :) |
Just need the quake-style drop-down terminal in macOS, that's the only reason I still stick with iTerm2 ... |
What's the current status? I see the #2312 is merged. |
#2312 has made significant advancements and #2438 has brought up even more separation. I think we've already come very far and all The biggest question is always about usecases, so if someone is interested to build something awesome with the library, that will likely drive things forward. If there's no interest, Alacritty just mantains the separation as an abstraction and separation of concerns. |
I think that warrants closing this issue, and in case a binary author discovers something missing, they'd open a separate issue for that specific thing. |
That is a good point and I do think that using Alacritty without winit should be significantly easier now. The renderer is still in alacritty_terminal, but completely optional iirc so it shouldn't significantly impact people trying to use things. So I think you're right that this can be closed, at least until someone finds specific problems that still require work in this area. So if someone has any problems with this, I'd recommend opening a separate issue unless it's about very broad work that still needs to be done to support this, in that case please let me know and I'll re-open. |
Hi all, Could you guys please help me and point me in the direction of documentation of Thanks. |
The |
Do you mean that I should just look at the source code of Alacritty and figure it out myself? If yes, its completly acceptable answer. I just wanted to make sure its the currently
I did not understood it. Can you please explain again using different words? |
Yes, it should be fairly simple. There's fundamentally not much to the |
This is amazing, thank you for taking the time to separate them. Very helpful. |
Alacritty's stated intention to not support tabs and split panes for simplicity reasons is understandable, but also makes the terminal useless for many people who rely on these features (no, I'm not switching to tmux to get a poor text-mode approximation of what my window manager does so much better graphically). It would be a pity if such a promising terminal were limited to the i3/tmux niche.
A solution could be to extract the actual terminal (which is the hard part to get right for any emulator) to a library or widget in the spirit of GNOME's VTE. VTE has been very successful and is used by more than a dozen emulators, some of them minimal, others specialized (e.g. dropdown terminals), and yet others full-featured with all bells and whistles.
The current Alacritty application would be a thin wrapper around the terminal widget and construct a configuration object by just deserializing a YML file, which is about as minimal as it gets and should satisfy the soul of any purist. But another emulator based on the same widget could offer tabs and splits, and a graphical configuration dialog. It could also use platform-specific UI, e.g. header bars in GNOME, and feel more like a native application that way.
The text was updated successfully, but these errors were encountered: