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

SFX Command Binding #6041

Closed
timmkrause opened this issue May 20, 2020 · 3 comments
Closed

SFX Command Binding #6041

timmkrause opened this issue May 20, 2020 · 3 comments
Labels
Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Resolution-Won't-Fix We're just really obstinate about this. There's probably a good reason.

Comments

@timmkrause
Copy link

timmkrause commented May 20, 2020

Description of the new feature/enhancement

To improve gamification and making the use of (the) terminal(s) even more engaging, I'd like to propose a "SFX Command Binding" feature.

For me, it started with this tweet: https://twitter.com/timmkrause/status/1263009434231549952

A colleague wrote "Wait, I still need to push it." and I wrote back "You should play https://www.youtube.com/watch?v=vCadcBR95oU while pushing." and while writing I just thought how cool would it be, to let a small piece of audio be played when git push is being executed.

This should be configurable in a dynamic manner of course.

Maybe something like this:

{
    "profiles": [
      {
        "guid": "{guid}",
        "name": "PowerShell Core",
        "source": "Windows.Terminal.PowershellCore",
        "fontFace": "Cascadia Code PL",
        "sfxCommandBindings": [
            { "command": "git push", "soundEffect": "ms-appdata:///roaming/salt-n-pepa-push-it-short.mp3" }
        ]
      }
    ]
}

What do you think?? :)

@timmkrause timmkrause added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label May 20, 2020
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 20, 2020
@carlos-zamora
Copy link
Member

Architecturally, the actual text/command that is being run is the shell's job, not the terminal. So, we wouldn't be able to introduce something like "command": "git push".

That said, a workaround we've been thinking of is #3799. You can think of this like "paste X text" and define X in the keybinding for the settings.

This could be an extension to that, and I do love the thought of audio clips when I do a git push haha.

@carlos-zamora carlos-zamora added Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Product-Terminal The new Windows Terminal. labels May 20, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 20, 2020
@carlos-zamora carlos-zamora added this to the Terminal Backlog milestone May 20, 2020
@DHowett
Copy link
Member

DHowett commented Jun 10, 2020

Thanks for the request!

Thinking about this more... I believe it would be best if the CLI application itself handled playing sounds. Here's why!

First, the terminal can't actually tell that you've run a command. When you type in "git push", all the terminal sees is g i t space p u s h coming off the keyboard. Now, that might be enough to conclusively identify that you're doing a git push, but you could also be using vim and running g (go to, nowhere), i (insert), t push ... Only the shell knows what those characters mean!

Second, if you write a script that runs git push and then plays a sound, you get a lot more control! Imagine you wanted to play a different sound if the push failed. Terminal has no way of knowing 😄 but your script absolutely does.

@DHowett DHowett closed this as completed Jun 10, 2020
@DHowett DHowett added the Resolution-Won't-Fix We're just really obstinate about this. There's probably a good reason. label Jun 10, 2020
@timmkrause
Copy link
Author

Sounds reasonable. Do you know a „global hook“ for PS Core to realize this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Resolution-Won't-Fix We're just really obstinate about this. There's probably a good reason.
Projects
None yet
Development

No branches or pull requests

3 participants