Open Eclipsow opened 2 years ago
You already can do this by first setting up the complete tab and panes manually (create a separate profile for each startup command you need and then use these profiles to set up the split tab the way you want it) and then saving it as a layout.
The individual profiles can then be deleted - the saved layout also saves full settings of its panes.
Hi, thank you for your answer. Ok I tried what you said, and here is my feedback:
First time, I somehow managed to do it using 5 profiles of type "SSH Connection", then started a blank terminal and configured the layout as I wanted, then I set each pane as one of these profile I created before (with hotkey CTRL + ALT + T). Once done with all 5, I saved it as a new profile layout. It kinda worked, but when I start the last layout profile I saved (the one with all the panes and configured to use a different profile for each) I'm asked 5 times for the password while I would like to broadcast it. That's probably because I was using the "SSH connection" type, which has a UI popup for typing the password.
Then I tried to do it with 5 other profiles based on the built-in CMD and using the following command line (providing in case some people are interested): cmd.exe /c 'ssh eclipso@apacheprod01.custom.be'
(and adapting the remote for each profile).
Then again used a blank terminal to configure the layout and assigned a profile to each pane.
It works, but I will have to create ton of profiles (I have around 35 Prod Apaches servers in Belgium. To these I can add the Dev servers. Then repeast the process for the Servers of websites in France which I sometime work on as well)
For people reading and interested, I also managed to do it with WSL, using this command line for each profile:
C:\\WINDOWS\\system32\\wsl.exe bash -c 'ssh eclipso@apacheprod01.custom.be'
But it does not add any benefits, it was purely for testing purpose (and also learning WSL commands)
So, I still think it's a lot of work to set-up this kind of terminal environment when you have more than ~10 servers to manage. Because, in the end, it's "simply" translated into the config file for the layout to use, and the actual profile is no more needed after (I've checked it and you are obviously right, everything is saved in the layout).
In my opinion, it could be a nice improvement to have a setting window just as Terminator does (it's actually incredibly similar): For each pane of a custom layout, you could assign either an existing profile, or set a custom command line... which is essentially what we are doing through the use of temporary profiles actually, but at least it would be easier to extend your layout later and also easier to configure through the UI and bypassing the need of creating a lot of temporary profiles.
By the way, the setting window actually already exist: When we edit a Saved layout there is a setting window that opens up, but right now we can only edit the layout's name, group, icon and tab color.
I really think that adding a way to edit each pane behaviour on the right side of that window, just like Terminator does, would be the best place and a very nice feature to have in the UI (If I could do it, I would actually, but I'm not that good of a dev ^^") To illustrate what I have in mind, I made a quick Proof Of Concept design, mixing Tabby's profile idea with Terminator's pane settings display: (In my POC, when "Copy config from profile" is ticked, the 2 other fields should be greyed out. I also added a new toggle to set focus on all panes when this layout is started)
I hope you will find my feedback useful and will take it into consideration. Thank you again for your answer, it helped me a lot :)
Thanks a lot for the writeup! Adding a full blown profile customizer will probably take a while - so I'm thinking about possible "simpler" workarounds:
user@host
into the profile selector when switching the pane profile - it works the same way as when opening a new tab.ssh
command.I am going to add to this as I was also using terminator and moving from a linux to MAC box its been a bit of an issue. In the linux world I had an alias that I would type called gators and it would launch terminator and with 4 split windows connect to each individual box using my keys. Something like this would be awesome in Tabby.
It would be great to see some of these examples working and in action. So I am going to +1 up as a vote for the feature as well that @Eclipsow is talking about :)
Thanks a lot for the writeup! Adding a full blown profile customizer will probably take a while - so I'm thinking about possible "simpler" workarounds:
- Do you need to use OpenSSH instead of the built-in SSH client? If not, you can skip profile creation and directly type in
user@host
into the profile selector when switching the pane profile - it works the same way as when opening a new tab.- If you do, maybe adding a "switch to command" counterpart to "switch to profile" (and "open tab with command" to "open tab with profile") would allow quickly replacing a pane with an
ssh
command.
Hi @Eugeny, First, thank you for your answer and the time you take to follow this thread :)
The first solution you mention is not working for me: When I use a Layout that has been initialized with Panes using the built-in SSH client, I have a popup that asks fort the password for each connection, which means a popup for each pane. (And sadly I can't use Authorized keys on any of the servers to bypass the password prompt, internal policy)
The second solution might do the trick if I did understand it correctly : You mean that, instead of assigning a Profile to a Pane (that's what I did with the hotkey CTRL + ALT + T), we could assign a specific Command ?
It could work I think, but isn't that the same "work" being done behind the scene ?
This idea (again, if I understood it correctly) is about manipulating the Panes through the opened Layout, while the feature I'm talking about is actually manipulating them through a Settings window instead... But in the end, it has the same effects in the Tabby config.yaml
file: Assigning either a Profile (either built-in or custom) or a custom Command to each Pane of a Layout. Only the entry point is different, right ?
In such case I would still vote for the UI feature too, as it is less cumbersome to simply edit it from a dedicated window, IMHO. However, that idea might also be a cool addition to that feature request, as it would allow to create a new Profile with everything all set in each panes without the need of temporay profile to "hold" the custom command! The hotkey would be useful when "creating" the Layout, while the UI would allow to "edit it later". Or, an other use-case, when duplicating a profile to have exactly the same layout, but for a new set of servers. --> What I try to say is that the combination of that Settings window + this idea of a new hotkey for assigning a custom Command to a Pane instead of a Profile, would cover most, if not all, use-cases of that functionality I'm sure :) (I sometimes have some trouble to explain myself clearly in English as it is not my mothertongue ^^")
Also, I'd like to clarify that the UI I designed earlier has no intention of being/becoming a "full blown profile customizer". By that I mean that this Settings window should not be able to create panes nor edit panes positions for example (which would be really hard, if not impossible). It only allows to change the profile/command assigned to each pane + a new fancy option to Focus all the Panes on startup by default, because that's what I was used to with Terminator groups.. :P
Also, thank you @Montanadude for your input :) Wish a good day to both of you.
PS: Also, I wanted to say that I tend to make long and detailed answers to try to be as clear as possible, do not see anything negative in this, obviously ^^
Hello @Eugeny
You already can do this by first setting up the complete tab and panes manually (create a separate profile for each startup command you need and then use these profiles to set up the split tab the way you want it) and then saving it as a layout. The individual profiles can then be deleted - the saved layout also saves the full settings of its panes.
Is it possible to come back and edit the profiles assigned to a layout later? It would be lovely to get to save "layout" referencing profiles instead of copying them. Like you save a "layout" (how the tab is split) with each split referencing a profile.
Then you can manage your "layout" and your "profiles" separately.
@oom- it's not possible through the UI yet, but you can edit a specific pane's command through Settings -> Config file.
Is your feature request related to a problem? Please describe. This feature request is not related to any problem and is a small enhancement / QOL suggestion.
Describe the solution you'd like I would like to be able to configure a specific command to run at startup, for each pane of a custom display I created.
For example, I created a custom display with 5 panes in a single tab, which I use to connect to 5 Apache servers and use the broadcasting input feature to send the same command on each server. (I do that a lot, with a lot of different servers for different big News websites I manage here in Belgium) I would like that, when I start my custom display "Apache PROD", the SSH command to connect to each 5 servers runs at startup in each pane, so that I only have to enter the password using the broadcasting feature and I'm directly connected on all 5 servers.
Actually I was used to do this with Terminator on Linux (which I even made some aliased to start Terminator directly with a specific layout) but now that I'm using Windows, it's much harder to find a tool that allows to customize a Startup command for each pane of a single layout. The only one I came accross was Cmder, but I don't quite like it, it looks overly complicated in my opinion. It does not need to be complex (you'll see in Terminator screenshot below that it's a pretty shallow level of settings). I guess that, as the custom display is saved somewhere, it must have the panes layout information saved as well, so it might be nice to be able to customize a "startup command" for each of these pane of that layout through another settings windows for example.
Describe alternatives you've considered I came accross this issue as well: https://github.com/Eugeny/tabby/issues/5764 But I did not quite understand the answer. I tried to connect to my servers, then once connected through SSH Save the layout as Profile, but when I started it later it did not try to connect to the servers. It might also be possible to edit the config file manually to add "args" to the terminal and use that, but I did not manage to do it, but a new UI to make that setting would still be better anyway Other alternatives would be to create a custom plugin to do this, I guess
Additional context Here are some screenshots of how it is done in Terminator (which is the best way to do it in my opinion as it is simple and easy to understand/use):
I can also provide Cmder screenshots if needed, but I really feel that the Terminator way is the best and easiest UI for that feature as it is straightforward.
Once again, thank you for your work, this tool is truly amazing. I really hope that feedback / feature request will find some love :) Have a good day !