julienXX / terminal-notifier

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

Add to homebrew-cask #197

Closed ecbrodie closed 7 years ago

ecbrodie commented 7 years ago

I have terminal-notifier installed via Homebrew installation.

terminal-notifier has a .app file component and that has been historically installed to my system's main list of applications (the /Applications directory) via the brew linkapps command.

However, there is a change to how Homebrew is having their forumulas install GUI apps. The preferred method is to install the app via brew cask install instead of using linkapps. See here: https://github.com/caskroom/homebrew-cask/issues/13201

As such, can we have terminal-notifier please support a brew cask install command?

julienXX commented 7 years ago

Hi @ecbrodie sure I'll try to do it.

vitorgalvao commented 7 years ago

@ecbrodie Make a request for it and someone will probably submit it within a day (I’m a maintainer and see it happen constantly).

However, for us to accept it in HBC it’ll also have to be removed from HB (we try to not have duplicates between the projects).

julienXX commented 7 years ago

@ecbrodie the upcoming version won't be packaged as an app any longer and just as a command line tool so I'm not sure it will be needed.

julienXX commented 7 years ago

1.8.0 is no longer a .app so I'll close this issue.

vitorgalvao commented 7 years ago

@julienXX But this means we now lost the ability to set a custom icon on the app bundle. Since -sender is insufficient (it still leaves a small terminal icon in the title of the notification) what do you suggest now?

julienXX commented 7 years ago

@vitorgalvao Since it's a command line app, the small terminal icon is no longer here when using sender.

vitorgalvao commented 7 years ago

@julienXX My mistake, I didn’t mean -sender (that one didn’t show the little terminal icon), I meant -appIcon.

julienXX commented 7 years ago

@vitorgalvao changing the icon on the binary with command+i as you would for any file seems to work well.

vitorgalvao commented 7 years ago

@julienXX Oh, that’s even more convenient! That method is really useful. It should be part of the README.

vitorgalvao commented 7 years ago

Actually, I take it back. It is indeed convenient, but since macOS will then cache the icon, it isn’t reliable if you want to do it multiple times.

julienXX commented 7 years ago

@vitorgalvao yes it seems to work only once and then OSX caches the icon forever it seems.

julienXX commented 7 years ago

@vitorgalvao found a way to refresh the icon: rm $(getconf DARWIN_USER_DIR)com.apple.notificationcenter/db/* then restart Notification Center via the Activity Monitor. If it works for you too, I'll add it to the README.

vitorgalvao commented 7 years ago

@julienXX That will not solve embedding terminal-notifier in other applications, which is what I used to do, and the main point of changing its icon.

That solution will take care of the icon once, but as soon as you have two different terminal-notifier binaries on the system, both with different icons, it will no longer work. This makes changing the icon of the binary an insufficient solution for sharing apps with an embedded terminal-notifier. -sender is still the best option, which is fine.