Closed calvinbui closed 2 years ago
I'm not sure "toggle" really makes sense in x-terminal. In Terminus there was only one terminal open at a time and it was in it's own panel.
X-Terminal is meant to be in a dock with other items and there can be multiple each open at the same time in different docks or even multiple open in the same dock. What does it mean to "toggle" x-terminal when it is in a doc? should it close the dock? should it activate a different item in the dock?
There is already a "focus" and "unfocus" command as well as commands to open and close docks. I think it is better for users to use the specific command that works for them.
The idea was there would be a key to both open and also close the terminal as needed.
Toggling on Terminus worked similar to all the other toggles Atom provided, like the Git tab or Tree view.
There already is a command for Window: Toggle Bottom Dock
.
What would the "toggle" command do for a user with a setup like:
That is why we need the more specific commands that we already have.
I'm not sure "toggle" really makes sense in x-terminal. In Terminus there was only one terminal open at a time and it was in it's own panel.
You still can have multiple terminals just fine with terminus, You didnt have any other way to open the terminal in a specific position besides dragging it there or onto the bottom/left/righ docks but you can indeed have multiple terminals just fine. Its not as sophisticated obviously.
x-terminal you still cant map terminals to files or folders which was one of the most useful features which made more sense when toggling imo.
@the-j0k3r so what would toggle do in the situation you are describing with multiple terminals open?
Wait, sorry I confused toggle with prev/next.
However, when you have a specific terminal open you may want to hide it, terminus just created a terminal if none existed on first toggle, there after it either hid or showed the respective terminal in focus, x-terminal just keeps creating new terminals on toggle.
I would say this could be a either or option on x-terminal, where e.g. Toggle Behavior > Create a terminal if none exists then show/hide focused terminal (terminus behaivior) Create a new terminal (x-terminal behavior)
Which terminal should be focused or hidden on "toggle" in your image?
In that image none were focused if you notice the position of the cursor on the git portion of the commit message, But pick any.
Seems like a command that is toggles a random terminal wouldn't be very useful. I would rather have the user use commands that already exist to toggle the one that they want.
Not a random terminal, the one which has current focus. Thats the point. You dont need yet another command terminus used Ctrl+` for both jobs, if the term is focused the hides, if not shows the one focusedd last.
There are already commands for that. "focus" and "unfocus" are already commands that can be mapped to the same key because they are scoped to whether or not a terminal is focused.
If someone wants to work on this and come up with solutions to every possible meaning for the word "toggle" I will happily accept a PR. But I don't see how that is going to work with a single command.
P.S. I just tested "toggle" in terminus with multiple terminals open and it only toggles the one in the original pane. So if you want toggle to work the same as terminus you can just use the "Window: Toggle Bottom Dock" command.
i'm going back to Terminus
Describe the feature you'd like
The ability to toggle (open/close) the terminal. This was a feature in terminus.
Additional context
Default on Mac was
ctrl-`
: https://github.com/bus-stop/terminus/blob/master/keymaps/terminus.cson#L16