julienXX / terminal-notifier

Send User Notifications on macOS from the command-line.
Other
6.37k stars 330 forks source link

notification does not appear on the screen with -sender com.apple.Terminal #216

Closed nhooyr closed 6 years ago

nhooyr commented 7 years ago

Please check everything that applies to your issue:

To help us debug your issue please include:

$ terminal-notifier -sender com.apple.Terminal -message foobar

The notification will not popup on the side of the screen, but if you swipe to the Notification Center, you will see it.

If you add the -activate flag, you will see the notification:

$ terminal-notifier -sender com.apple.Terminal -activate com.apple.Terminal -message foobar
julienXX commented 7 years ago

Thanks for the report, I'll investigate.

julienXX commented 7 years ago

What's weird is that if you use Safari or Finder for sender the notification shows up.

luckman212 commented 6 years ago

I have the exact same issue, except with "Preview.app" (bundle ID=com.apple.Preview)

This is w/ version 2.0.0

franciscolourenco commented 6 years ago

I have the same, but only when attached to tmux with -sender com.googlecode.iterm2. Also 2.0.0

joeynotjoe commented 6 years ago

I am having a very similar issue. I'm attempting to call terminal-notifier as a subprocess in a lua script, it shows up in the sidebar, but doesn't pop up on the screen. If I run the same code in terminal, it does pop up on the screen (and show up in the sidebar, of course). I'm on terminal-notifier 2.0.0, macOS 10.13.4.

terminal-notifier -title iina -subtitle subtitle_contents -message message_contents -sender com.colliderli.iina

If I change the bundle to com.apple.Finder, it shows up properly, even when being called as a subprocess.

nhooyr commented 6 years ago

I can't reproduce this anymore. I get the notification now. On latest macOS stable.

nhooyr commented 6 years ago

Ah it only shows up if you aren't focused on the terminal. E.g. if you run sleep 2; terminal-notifier ... and focus safari for example in between, the notification will arrive.

nthapaliya commented 4 years ago

This is still an issue. When the -sender is the same as the active window, the notification goes to the sidebar but doesn't pop up on screen.

julienXX commented 4 years ago

@nthapaliya I'm afraid I can't fix that, I don't see anything in the Apple API that would allow me to change that.

Feuermurmel commented 2 years ago

@nthapaliya I'm afraid I can't fix that, I don't see anything in the Apple API that would allow me to change that.

This totally makes sense. I see two options (non-exclusive):

Otherwise totally great software, thanks! <3