3

When I type a command inside Visual Studio Code's terminal the system brings out a notification that this command is complete. This is happening since I updated to Juno, when I was in Loki this was not happening. How can I disable this?

1
  • Still a problem on fresh install of v5.1 Hera and VS Code v1.55
    – Stetzon
    Commented Apr 19, 2021 at 14:39

2 Answers 2

1

You can manage notifications here

io.elementary.switchboard settings://notifications

io.elementary.switchboard settings://notifications

, if you can't change it/disable it there then you should ask their support channel directly.

ref: https://code.visualstudio.com/community

1
  • 1
    The problem is within the Juno notification system somewhere. It normally has these "task finished" notifications that are suppressed from foreground (focused) terminals, but the suppression doesn't work for vs code. Probably because the suppression logic doesn't account for embedded terminals. If you run a command from the terminal app no notification is generated while it is focused. But the same command in vscode's embedded terminal generates a notification. illustration: imgur.com/a/kadzHgG
    – Segfault
    Commented Feb 20, 2020 at 15:39
0

If you're using Bash, then the trigger that fires off this notification comes from the PROMPT_COMMAND variable in your shell. There is a different implementation for each shell. You can easily disable the notifications for one session by running unset PROMPT_COMMAND in the embedded terminal after it launches. Unfortunately this turns off whatever else you have configured in that variable, it is frequently used for dynamic prompts (like a git prompt). If you can identify those parts of PROMPT_COMMAND that you want to keep, you can edit the variable to remove the elementaryOs additions.

To make this persistent in vscode, you can use the terminal.integrated.env.linux preference to set PROMPT_COMMAND how you like it.

The elementary OS task finished notification specific part of the PROMPT_COMMAND is dbus-send --type=method_call --session --dest=io.elementary.terminal /io/elementary/terminal io.elementary.terminal.ProcessFinished string:$PANTHEON_TERMINAL_ID string:"$(history 1 | cut -c 8-)" int32:$__bp_last_ret_value >/dev/null 2>&1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.