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

Small terminal icon in title when using -appIcon option #131

Closed
stopiccot opened this issue May 4, 2015 · 25 comments
Closed

Small terminal icon in title when using -appIcon option #131

stopiccot opened this issue May 4, 2015 · 25 comments

Comments

@stopiccot
Copy link

https://www.dropbox.com/s/v3syj6a0t3631f9/Screenshot%202015-05-04%2018.32.58.png?dl=0

Not sure if it's a bug or an OS X intended behaviour

@julienXX
Copy link
Owner

julienXX commented May 4, 2015

It's the intended behavior.

@julienXX julienXX closed this as completed May 4, 2015
@arkarkark
Copy link

Is there a way to suppress or change that little icon? It only seems to show up if I pass in -appIcon

@danielbayley
Copy link

@julienXX Can it be suppressed?

@julienXX
Copy link
Owner

Unfortunately I didn't found a way to suppress it so far. You still can make yourself a custom build with a transparent icon I guess.

@julienXX
Copy link
Owner

Also if you make a custom build with a new icon, you have to run:
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; to clear the cache.

@Max-108
Copy link

Max-108 commented Mar 16, 2016

I've replaced both Terminal.icns with transparent icon versions in both /Library/Ruby/Gems/2.0.0/gems/terminal-notifier-1.6.3/vendor/terminal-notifier/ and /Library/Ruby/Gems/2.0.0/gems/terminal-notifier-1.6.3/vendor/terminal-notifier/terminal-notifier.app/Contents/Resources/.

I even changed the app icon via the Finder info-window to a pasted blank one. I then ran the command above that correctly clears the Dock's icon cache and restarted, but yet the pesky little Terminal-Icon remains in the Title field - What have I missed?

@julienXX
Copy link
Owner

@Max-108 you have to download the source code update and re-compile it with your new icon.

@vitorgalvao
Copy link

Hope @julienXX doesn’t mind me referencing it (since I’m the author), but I’ve been using a custom-built script for this for quite a long time, with much success.

You simply run it with customise-terminal-notifier --icon <file> --bundle <bundle_id> and it’ll download the latest version of terminal-notifer to your Desktop and set your custom icon. You can then take that binary and use it as usual, without the need to set -appIcon and without having to recompile. To install the script, simply download it or do brew install vitorgalvao/tiny-scripts/customise-terminal-notifier (if you use Homebrew).

Keep in mind, though, the icon will be set permanently on that specific binary, but if you’re changing it to embed terminal-notifer in other apps, it’s often enough. If you’re distributing it, though, don’t forget to include terminal-notifier’s license. Also, in that case there may be (sometimes it happens, others it doesn’t) a one-time warning about the binary having been changed (only the icon is changed).

@julienXX
Copy link
Owner

Thanks @vitorgalvao! Do you mind if I reference your script in the README?

@vitorgalvao
Copy link

Do you mind if I reference your script in the README?

Don’t mind at all. Go for it.

@Max-108
Copy link

Max-108 commented Mar 16, 2016

Thank you for the PnP solution @vitorgalvao. (I'm new, so if thanks are considered extraneous here, sorry, and feel free to delete)

@julienXX
Copy link
Owner

@Max-108 thanks are always welcomed :)

@reubano
Copy link

reubano commented Apr 23, 2016

FYI, I figured out a way without recompiling

  • use automator to create an application (named myapp in this example)
  • change the icon (note, you can also drag and drop a icns file if you have it)
  • call terminal-notifier with -sender com.apple.automator.myapp

@julienXX
Copy link
Owner

@reubano Excellent, thanks!

@mikemcduffie
Copy link

julienXX,

Would it be possible to add a default notification when the binary is executed via vitorgalvao's customise-terminal-notifier? The issue is the notification generated when a user double-clicks/opens the customized app. A blank notification titled "Terminal" is generated.

@vitorgalvao
Copy link

For a bit more context on @mikemcduffie’s comment, see vitorgalvao/tiny-scripts#24.

To be clear, @mikemcduffie, customise-terminal-notifier has nothing to do with it. If you download an unmodified terminal-notifier it’ll behave exactly as you describe.

Issue is you’re not just supposed to open terminal-notifier while telling it nothing. You’re expected to give it the parameters you want it to run with.

@mikemcduffie
Copy link

mikemcduffie commented Jun 19, 2016

@vitorgalvao,

Yes, I understand that. The issue I'm trying to work around is an uninformed user opening the helper app and being confused. I know it's the regular behavior of the CLI binary.

I moved the discussion here since it would require terminal-notifier to change to improve the bundled version.

@mikemcduffie
Copy link

I think I see why @vitorgalvao and I are talking past each other. I had forgotten that terminal-notifier is an app bundle in it's standard deployment. It's been so long since I installed it that I misremembered and thought it was a CLI binary only and customise-terminal-notifier was unique in bundling it. My bad.

Homebrew buries the app bundle so deep, it's not an issue for uninformed users. I had wanted to distribute the customized app with an Automator service in order to get a unique icon with the -open option. That and making it easier for novice users to install via drag and drop.

I still believe that user notification on app bundle launch is still desirable given the customized versions and request @julienXX consider it as an enhancement.

Any way, thanks again to both of you for your efforts.

@vitorgalvao
Copy link

vitorgalvao commented Jun 19, 2016

@mikemcduffie I see your point. Perhaps the default message could be a note to the user they shouldn’t be double-clicking on it, since it should be required by other apps.

emsk added a commit to emsk/redmine-notifier that referenced this issue Feb 16, 2017
Change the icon using customise-terminal-notifier.

executed command: `customise-terminal-notifier -i ./app/images/redmine_icon_color_64.png -b com.emsk.redmine-notifier`

mikaelbr/node-notifier#71
julienXX/terminal-notifier#131
https://github.com/vitorgalvao/tiny-scripts/blob/master/customise-terminal-notifier
@laxmikanta415
Copy link

laxmikanta415 commented Jun 13, 2018

This solved my problem :

run this command in terminal after downloading :customise-terminal-notifier

** path/customise-terminal-notifier-master/customise-terminal-notifier -i path/Terminal.icns -b com.bundle.identifier

@jlippold
Copy link

https://github.com/vitorgalvao/tiny-scripts/blob/master/customise-terminal-notifier is 404 and the tap is dead. @vitorgalvao is this source code available still?

@vitorgalvao
Copy link

@jlippold It is still available, through the power of git. Note that specifically gets terminal-notifier 1.7.2 because later versions made the technique incompatible.

You’re weIcome to modify and use that as you see fit. I no longer offer support for it (but it should still work) since I have changed to my own custom solution many years ago and am no longer familiar with the inner workings of terminal-notifier. I have since also narrowed down my solution to work specifically with Alfred workflows, since that’s what I (and the users of my tool) always used it for anyway, so that wouldn’t be a drop-in replacement for you if you need a generic use case. It could be readapted for it (the change was made about two years ago) but I don’t offer support for that either.

Hope that clarified everything. Have a nice Sunday.

@jlippold
Copy link

It's too bad your new notificator script can't be called from terminal without Alfred. Anyways, I'll try to compile your legacy script. Thanks!

@jlippold
Copy link

The resulting app that your script makes probably needs to be signed. This is too much work for an app icon :P

image

@vitorgalvao
Copy link

It's too bad your new notificator script can't be called from terminal without Alfred.

It can. But you have to preset the variables and the icon in the right structure beforehand. A major point of the changes is not having to do so manually or needing to build the app beforehand. It’s a much nicer experience: run the script and get the notification.

The resulting app that your script makes probably needs to be signed.

Because you’re using the old unsupported version. The new one doesn’t have that issue as it builds the notification app on demand. But as I said, I don’t offer support for alternate uses of that script now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants