randy3k / Terminus

Bring a real terminal to Sublime Text
https://packagecontrol.io/packages/Terminus
MIT License
1.39k stars 81 forks source link

only show panel #175

Open Nightwingg opened 4 years ago

Nightwingg commented 4 years ago

Hi, first of all thank you very much for the terminal, it works great.

I wanted to ask if it's possible to just show the panel, because when I show it the pointer goes to the terminal.

For example, for only hide i use

// Only hide terminus panel
 { "keys": ["ctrl+j"], "command": "hide_panel", "args":{"panel": "terminus"},
     "context": {"key": "terminus_view.exec_panel_visible", "operand": false}
   },

But just to show I would think it would have to be

 { "keys": ["ctrl+j"], "command": "show_panel", "args":{"panel": "terminus"},
     "context": {"key": "terminus_view.exec_panel_visible", "operand": true}
   },

But it doesn't work.

Greetings and thank you.

randy3k commented 4 years ago

Do you want to show a regular terminal panel or the "Terminus Build Results" panel?

Nightwingg commented 4 years ago

only regular terminal

randy3k commented 4 years ago

You should not use the context key terminus_view.exec_panel_visible. This key is used to determine if the "Terminus Build Results" panel is visible. Instead, you could use

    {
        "keys": ["ctrl+j"], "command": "show_panel",
        "args": {"panel": "output.Terminus"},
        "context": [ { "key": "panel_visible", "operand": false } ]
    },

However, there is a catch, it only works for the first terminal panel. For the second (and later) panel(s), you will need {"panel": "output.Terminus #"} where # is the number of the terminal panel.

Nightwingg commented 4 years ago

Great, it works like a charm. Thanks...