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 · 20 comments
Closed

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

stopiccot opened this issue May 4, 2015 · 20 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

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

9 participants