Skip to content

Command-line to toggle visibility #13276

Open

Description

@gapf2010

Description of the new feature/enhancement

I'm proposing a command-line option to toggle the visibility of the terminal window. It should do exactly that: if I run (for instance) "wt --toggle" it should create a new window with default profile and show it (if no window exists) or show the current window (if one already exists). If the window is currently being displayed, running "wt --toggle" should hide the window and focus the previously selected application. This can be complemented with an option to make it that if "wt --toggle" creates the window, then it won't make it visible (useful on startup of terminal). A second run of "wt --toggle" will make the window visible.

Proposed technical implementation details (optional)

Not sure about how to do this. Maybe a switch that will run the same "toggle visibility" internal command of terminal, or something? however that does not seem to be exactly what I described above.

Activity

  1. added
    Issue-Feature
    on Jun 11, 2022
  2. ghost added
    Needs-Triage
    on Jun 11, 2022
  3. ghost added
    Needs-Tag-Fix
    on Jun 11, 2022
  4. zadjii-msft commented on Jun 13, 2022

    @zadjii-msft
    Member

    This kinda sounds like the globalSummon action to me, but with more steps. Not saying that it's invalid, but I suppose I'm curious - is there a reason globalSummon doesn't work for your use case/?

    Presumably, it wouldn't be too hard to just plumb through wt summon as a globalSummon action, if you really needed this on the commandline for some reason.

  5. ghost added
    Needs-Author-Feedback
    on Jun 13, 2022
  6. gapf2010 commented on Jun 14, 2022

    @gapf2010
    Author

    This kinda sounds like the globalSummon action to me, but with more steps. Not saying that it's invalid, but I suppose I'm curious - is there a reason globalSummon doesn't work for your use case/?

    Presumably, it wouldn't be too hard to just plumb through wt summon as a globalSummon action, if you really needed this on the commandline for some reason.

    Hi. Well, for me gobalSummons does not work, because it seems I cannot bind F12 to summon the terminal. F12 works on Linux and OSX, but for some reason it does not work on Windows for me. However, I found my Lenovo PC has a way to run a custom command when pressing F12, and that's what I'd like to use with this option I'm proposing.

    Thanks.

  7. ghost added
    Needs-Attention
    on Jun 14, 2022
  8. ghost removed
    Needs-Author-Feedback
    on Jun 14, 2022
  9. zadjii-msft commented on Jun 14, 2022

    @zadjii-msft
    Member

    I found my Lenovo PC has a way to run a custom command when pressing F12

    Ah, well, that might explain why you can't bind F12 in the Terminal - I suppose the PC has already stolen that keybinding away from us 😄

  10. gapf2010 commented on Jun 14, 2022

    @gapf2010
    Author

    I found my Lenovo PC has a way to run a custom command when pressing F12

    Ah, well, that might explain why you can't bind F12 in the Terminal - I suppose the PC has already stolen that keybinding away from us 😄

    I thought the same, but then I noticed that the Lenovo software actually does not bind to F12, but to Fn+F12 and even then, it's not currently enabled. F12 is not bound to anything AFAIK, because pressing it on a software that uses it (like Edge or Chrome) does what it's supposed to do on that software, so no other app uses F12 exclusively. If you can configure your terminal to open with F12 and could share the config here, I'd appreciate it. Anyway, I still think my original request would be useful.

  11. added
    Product-Terminal
    Issue-Task
    Area-Commandline
    and removed
    Issue-Feature
    Needs-Attention
    on Aug 10, 2022
  12. ghost removed
    Needs-Tag-Fix
    on Aug 10, 2022
  13. zadjii-msft commented on Aug 10, 2022

    @zadjii-msft
    Member

    Note: this is as described in #12135.

    I'll use this for the summon subcommand, and then leave the other issue for --profile

  14. added
    Area-Remoting
    and removed
    Needs-Triage
    on Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-CommandlineArea-RemotingIssue-TaskProduct-Terminal

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions