How to disable Notification for Terminal app?

Solution 1:

Whilst it's not ideal, if it's that bad you could disable the app bounce notification completely for all apps:

defaults write com.apple.dock no-bouncing -bool TRUE && killall -HUP Dock

To revert, replace TRUE with FALSE.

You can provide feedback to Apple regarding this at the following page:

  • http://www.apple.com/feedback/macosx.html

Solution 2:

I am running the Terminal version 2.9.1 and macOS Mojave 10.14.3 and I could just do this in the preference setting of the Terminal App:

Terminal > Preferences > Profiles tab > Advanced tab > Uncheck everything under the Bell section

Unchecking 'Bounce app icon when in background' option would prevent jumping of the terminal icon.

Here's a screenshot after unchecking the notification options.

Solution 3:

Running your commands in gnu screen can solve your problem.

Steps to replicate bad behavior:

  1. $ sleep 5; tout bel
  2. Command-Tab away from Terminal
  3. Wait

Observed behavior: Terminal icon gets badge and bounces

Desired behavior: No badge or bounce

Solution:

  1. $ screen
  2. Control+A, c # create a new screen window
  3. $ sleep 5; tput bel
  4. Control+A, Control+A # switch to screen 0
  5. Command-Tab away from Terminal

New observed behavior: No badge or bounce

Note that you'll still get badge + bounce if the screen window is the active one. I'm sure you can refine this further.

Solution 4:

If you're just issuing one long-running command that occasionally pops a bell, you could run the command with the output piped to less. This seems to have done the trick for me:

annoyingcmd | less -R

(The -R flag allows for colors to be displayed)