Skip to content
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

Feature request: Tiling #178

Closed
hastebrot opened this issue Jan 7, 2017 · 17 comments
Closed

Feature request: Tiling #178

hastebrot opened this issue Jan 7, 2017 · 17 comments

Comments

@hastebrot
Copy link

Layout terminals in any fashion by splitting them horizontally or vertically.

This feature is supported in some terminals, e.g. Terminology and Terminix.

I know according to the blog Alacritty strives for simplicity and tmux could be used, but this is really a useful feature to have directly in the terminal.

Example key-bindings (taken from Terminology):

  • Ctrl+PgUp — switch focus to previous terminal inside a window
  • Ctrl+PgDn — switch focus to next terminal inside a window
  • Ctrl+Shift+PgUp — split terminal horizontally (1 term above the other)
  • Ctrl+Shift+PgDn — split terminal vertically (1 term to the left of the other)
@hastebrot
Copy link
Author

hastebrot commented Jan 7, 2017

Also: If this feature is considered to much bloat, at least a paragraph how to use tmux for simple tiling could be added to the README.md.

The default key-bindings in tmux for the basic tiling operations are (via: https://gist.github.com/andreyvit/2921703#managing-split-panes):

C-a "          split vertically (top/bottom)
C-a %          split horizontally (left/right)

C-a o          go to the next pane (cycle through all of them)
C-a ;          go to the ‘last’ (previously used) pane

(After setting C-b to C-a.)

@Gonzih
Copy link

Gonzih commented Jan 7, 2017

Just use tmux. Tiling is not a feautre that belongs in terminal emalutaor.

@ton
Copy link

ton commented Jan 7, 2017

Why not use a tiling WM if you want this sort of functionality?

@hastebrot
Copy link
Author

hastebrot commented Jan 7, 2017

@Gonzih @ton

tiling window manager

What if I want to use Unity on Linux or I want to use macOS/Windows?

tmux

What if I don't want to learn/configure/install tmux? Sometimes tmux could be consided as a "hack"; vim/nvim behave differently.

Tiling is not a feautre that belongs in terminal emalutaor.

At least GNOME Terminal, Terminology, and Terminix have some sort of functionality to manage sub-terminals (using tabs or tiles/panes). We could also say, managing sub-terminals is a feature that doesn't belong in console programs.

@topaxi
Copy link

topaxi commented Jan 7, 2017

vim / nvim behave differently.

vim has native tiling builtin, nvim even supports starting a terminal in vim-windows.

I personally avoid terminals with too much functionality builtin, especially if its already solved in several different ways.

@lukaslueg
Copy link
Contributor

I hope not. Tiling and scrolling are in fact done much better within the terminal than by the terminal.

@Gonzih
Copy link

Gonzih commented Jan 7, 2017

@hasterbrot problem tha you are describing is being solved by tmux, vim, terminator, awesome, xmonad and etc. I don't think there is also need to solve this proble in every possible terminal emulator. Unnecessary feature for sure.

@hastebrot
Copy link
Author

hastebrot commented Jan 7, 2017

Tiling and scrolling are in fact done much better within the terminal than by the terminal.

@lukaslueg Maybe I configured tmux not correct, but selecting text and changing panes with the mouse does not work good enough.

I don't think there is also need to solve this proble in every possible terminal emulator.

@Gonzih That's a good argument.

@hastebrot
Copy link
Author

hastebrot commented Jan 7, 2017

So, as initially mentioned, something like tiling probably doesn't fit into the idea of simplicity for this project. I'll close this issue, if there is no big interest.

My arguments are, that there are use-cases, where someone doesn't want to use tiling window managers or terminal multiplexers. Having basic functionality like horizonal/vertical split panes and switching to next/previous pane could be easy to implement.

If someone wants to implement this feature in a separate feature fork (or as an opt-in feature), questions like

  • How to start/stop multiple terminal/shell sessions?
  • How to restrict one shell to a certain window area?
  • How to add the key-bindings into a configuration file (no settings dialog needed)?

need to be answered.

@jwilm
Copy link
Contributor

jwilm commented Jan 7, 2017

I appreciate your thoughtful comments here, but there's no way such a feature is making it into Alacritty.

As you pointed out yourself, there are plenty of terminal emulators to choose from that offer this feature.

@jwilm jwilm closed this as completed Jan 7, 2017
@freshtonic
Copy link

I became interested in Alacritty because it's fast. However, tmux on a mac is not fast. It even says so in the Alacritty FAQ. So until either Alacritty provides native tabs & panes or a wrapper app is written around the core of Alacritty that provides native tabs/panes I'm pretty much alienated.

@chrisduerr
Copy link
Member

@freshtonic Pretty much everything you've mentioned is definitely planned. There's #1544 for tabs on macOS, which might need a bit of work, but doesn't require any additional rendering complexity.

The #1023 PR also lays the initial foundations for extracting Alacritty's core into a library to allow others to extend it.

These changes will probably take some time until they land, but hopefully they'll make Alacritty available to a broader audience without sacrificing any of its goals.

@freshtonic
Copy link

@chrisduerr that's fantastic news. Thanks for the update!

@hgkamath
Copy link

hgkamath commented Nov 3, 2019

Just penning a '2 cents'.
I was searching for a cross platform terminal that does cross-platform tiling, for uniform experience reasons.
My understanding is limited, you folks know more, please disregard if not relevant.
I am also new to trying out alacritty and other terminals
This seems like a way to abstract out

  • "tiling/split window/split pane/resizing events",
  • "terminal multiplexing/tty sharing (GNU-screen/tmux/et etc) ",
  • and "re-connection, session maintenance by server with a logged-in/tty with shell open"

https://github.com/MisterTea/hyper-htm
A javascript plugin for another terminal app hyper.js, which talks over the network to the 'et'

https://github.com/MisterTea/EternalTerminal
et: eternal-terminal Re-Connectable secure remote shell
The et opens a local-tty and maintains the connection with the terminal app via the tiling plugin.

It seems like an attempt at making a standard protocol to negotiate tiling

( terminal-app -> tiling-plugin ) --n/w-> ( terminal-session-manager => tty-by-OS )

So when the tile boundaries are changed even a remote terminal can also adapt to it.

This bug is closed, but didn't know where to note this. So referencing
[] tmux doesn't recognize alacritty (#2487)
[] Support multiple windows (#607)
[] Default to ConPTY instead of WinPTY #2890
[] Feature request: Tiling (#178)
[] Add support for the new native ConPTY API in Windows 10 (#1661)

@alexherbo2
Copy link

For tabs, there is tab. It does not provide multiplexing, but provides facilities to switch between contexts. The sole shortcut is Ctrl-t.

There is also Pueue which can be nice when you don’t need a terminal.

@s-at-ik
Copy link

s-at-ik commented Jan 11, 2024

PR #1023, mentioned by @chrisduerr, has been abandoned. Is there still an ongoing effort to "librify" allacritty? And if so is there anywhere one can follow the general progress?

I believe there are arguments to be made in favor of tiling support directly in the terminal emulator (I guess I wouldn't stumble upon a 7 years old issue otherwise 😛 ):

  • window manager tiling is not cross-platform (this is especially relevant to Alacritty as many other terminal emulators are tailored to a specific OS/environment any way)
  • window manager tiling can be cumbersome (e.g. switching between tiles, or alternating between tiles and full screen application)
  • window manager tiling is overkill when you only need tiling for the terminal
  • tmux tiling offers abysmal performances in comparison to any higher level tiling I've used

@kchibisov
Copy link
Member

you can use alacritty_terminal crate, it's already used by some editors written in rust to provide a terminal, and also there's a terminal based on alacritty called rio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests