Giter VIP home page Giter VIP logo

terminal-notifier's Issues

Add support for NSUserNotification.subtitle

Hi,

Great tool! I'd love to see support for specifying a subtitle for the NSUserNotification object, though. I'd add it myself and do a pull request, but I have no way of testing the code due to the whole bundle-signing issue...

Modify the icon

Hi,

thanks for that very useful tool. Do you think it's possible to change the icon in the notification?

Cheers!

Pv

Change group title used in Notification Center

Is it possible to change the group title used for notifications from terminal-notifier to Terminal Notifier? This is shown both as the group heading in Notification Center and in the Notifications system preferences pane. Even better would be the ability to set this via a command line switch. I have no motivation for this change other than that terminal-notifier is just so ugly.

I skimmed through the project but can’t immediately see where it’s coming from. Is there a limitation that this string simply comes from the name of the binary sending the notifications?

Other than that this gem is awesome.

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

Project crashes on load in OS X Mavericks 10.9

When I try to load up the project file in OS X Mavericks DP6 (Xcode 5 DP6) It crashes Xcode. I have a bug report in with Apple about the crash, but I thought I would add one here as well to make you aware of the problem.

BTW, this also crashes when doing a brew install of terminal-notifier 1.5.0

brew upgrade
==> Upgrading 1 outdated package, with result:
terminal-notifier 1.5.0
==> Upgrading terminal-notifier
==> Downloading https://github.com/alloy/terminal-notifier/archive/1.5.0.tar.gz

################################################################## 100.0%

==> xcodebuild -project Terminal Notifier.xcodeproj -target terminal-notifier SYMROOT=build -verbose
29 0x0000000105b1cdb6 -[Xcode3CommandLineBuildTool _resolveInputOptionsWithTimingSection:](in Xcode3Core)
30 0x0000000105b29340 -[Xcode3CommandLineBuildTool run](in Xcode3Core)
31 0x0000000104ed39b0 (in xcodebuild)
32 0x00007fff82bfb5fd start (in libdyld.dylib)
33 0x0000000000000007

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

Properly support -h and --help for printing usage information

Currently (1.4.2), usage information is only printed when an invalid set of parameters is encountered.

It would be nice if the application properly supported a mechanism specifically for invoking usage information: either -h or --help by convention.

The exit code should be set to zero in that event.

Messages beginning with non-alphanumeric fail

Hi!

First of all, thanks for the great tool! However, I've discovered a small bug. When you pass in a message that doesn't start with an alphanumeric character, the message becomes null and the app doesn't deliver the notification:

wouter@mini-me:~$ terminal-notifier -title irssi -message '[foo]'
terminal-notifier (1.3.0) is a command-line tool to send OS X User Notifications.
...

I've tested this with a bunch of chars and it seems something is wrong in the Objective-C code. The ruby part seems to pass things on nicely, but I have no clue how to fix this on the objective-c side :)

Keep up the good work!!

Wouter

Removing Notification

Hey, it would be great if we could have a method of removing a notification we've sent earlier, possibly using the group id to disambiguate which notification we're talking about.

Is this something that is possible/easy to do?

Make notifications 'sticky'

I don't know if apples API's allow for it, and I didn't see anyone else ask yet, but it would be great if an option was added to make the notification 'sticky' like the Reminders.app can do. I assume it would be based on the group id, but that group id would stay on screen until the user dismissed it. Is this possible?

Font-Awesome Icons

Font-Awesome has ttf/svg icons that are freely available.

I have no idea, which is why I'm asking, is it possible to integrate the font-awesome subset, and present it via a -fontawesome icon-uparrow or some variant?

Unable to use as root

For example, I have a LaunchDaemon that calls a script. The script runs as root. When the script completes, I would like to have it post a notification. However, calling terminal-notifier from this script appears to fail.

Exploring further, I switched to root (sudo su -) and tried running terminal-notifier directly; it simply hung, and never returned to the command prompt.

Then, still as root, I tried calling terminal-notifier via sudo (sudo -u the_current_user terminal-notifier), but got the same result.

Is this a mistake on my part, an issue in terminal-notifier, or a restriction in Notification Center?

Humanise the terminal-notifier name in Notification Center

Was going to not even report an 'issue' on this but would be nice to see the name terminal-notifier adhere to the other notification center applications naming convention and send through Terminal Notifier

Notification Center

Tiny in the grand scheme of things....

Running inside of a subshell gives strange results

I'm not sure if this is a bug or not, but I figured you guys might be able to help me figure out why this is happening.

I have bash hooks setup to notify me when long-running commands finish. (E.g. if a bash command takes longer than 30 seconds, it pops up a notification when it finishes) Clearly, these notifications can clutter up my notification center, so I have all these notifications set to have a group id of "$$", that is, the process id of the bash shell they're started from. Then, when that bash shell exits, it clears all the notifications.

Now I'm seeing some interesting behavior from a very specific method of calling terminal-notifier -remove. If I call:

$ terminal-notifier -remove "$$" &

Everything works as it should. The notification is cleared (I background the task so that my work in the shell is impacted minimally). If instead, I call:

$ ( terminal-notifier -remove "$$" & )

The notification is removed, however immediately after that I get another notification with the title set to "Terminal" and no message. This happens even if I don't have a notification to remove. Any ideas why launching this command in a subshell would have an effect?

Bugs in parameter handling: if arguments START WITH certain characters, invocation breaks

Option arguments that start with certain characters currently (1.4.2) break invocation of terminal-notifier:

  • For instance, message text that begins with "-" is apparently misinterpreted as an option, causing the command-line help to be printed; e.g.:
    terminal-notifier -message "-hello, world"
  • Similarly, an argument that starts with any of the following characters breaks: (, '<', '{', '[' (possibly others); e.g.:
    terminal-notifier -message "(hello, world)"
    terminal-notifier -message "<hello, world>"
    terminal-notifier -message "{hello, world}"
    terminal-notifier -message "[hello, world]"

Open URL containing spaces

Hi,

I use the open option to open a URL after clicking on the notification. The URL I've specified should do a search eg. via amazon with the notification title eg. a movie name. I found that if the search string consists of several words seperated by spaces the URL is not opened. As the search string is provided by another application I'm not able to replace the spaces by %20.

Example:
/Applications/Utilities/terminal-notifier.app/Contents/MacOS/terminal-notifier -message "a test" -open "http://www.amazon.com/s?ie=UTF8&field-keywords=a test"

Fails with message:
18.08.12 10:04:56,545 terminal-notifier[3567]: open: http://www.amazon.com/s?ie=UTF8&field-keywords=a test
18.08.12 10:04:56,546 com.apple.launchd.peruser.501[225]: ([0x0-0x3bf3bf].nl.superalloy.oss.terminal-notifier[3567]) Exited with code: 1

I tried 'a test' but got the same result, tried "a test" but then only the "a" was searched.

Edit: I managed to get the search string UTF8 encoded, so the space is replaced by +, the result is still the same.
18.08.12 11:06:36,591 terminal-notifier[480]: open: www.amazon.com/s?ie=UTF8&field-keywords=a+test
18.08.12 11:06:36,592 com.apple.launchd.peruser.501[233]: ([0x0-0x43043].nl.superalloy.oss.terminal-notifier[480]) Exited with code: 1

Thanks in advance for any help.

Allow custom UUID for Notifications

Currently the Notifications are delivered using a UUID generated on notification.

I'd like it to use a UUID generated/given to the notification from whatever script called the notification.

The reason being, that you could then script the Notification's behaviour.

The idea would be to add a -UUID flag.

MORE INFO:

The users Notification Center DB is held here: ~/Library/Application Support/NotificationCenter/.db.. This is an SQLite DB.. If you dig around you can find the app_id associated by the users notification center for terminal notifier.. with that you can run something like the below, to show the notification as an Alert (therefore staying on screen).

sqlite> INSERT OR REPLACE INTO notifications VALUES ( '<row_number>', '<notification_UUID', '<app_id>' , 'bplist00?23X$versionX$objectsY$archiverT$top' );

The bplist00?23 value changes the notification type & if it's shown in notification centre.

On 10.8.5: -sender and -activate don't maximize the app if minimized

For example, if the -sender is com.apple.iTunes, iTunes will be given focus (become frontmost), but it won't be maximized if iTunes is minimized.

terminal-notifier -message "test" -sender com.apple.iTunes
terminal-notifier -message "test" -activate com.apple.iTunes

Current outcome:
On clicking the notification, the sender is left minimized, though it gains focus

Expected outcome:
On clicking the notification, the sender is maximized if minimized

Add ability to set where the notification is coming from.

Currently, all notifications will show up under "terminal-notifier", it would be nice to be able to set where the notification is coming from. For example, if I set it up with geektool, it would be nice to have it say "Geektool" instead of terminal-notifier. This would make it easier to distinguish between notifications in notification centre.

-open URL

Could you share a quick example of how to format open URL — I think my syntax is not correct?

For example:

# ./terminal-notifier.app/Contents/MacOS/terminal-notifier -message "Hello" -open "https://github.com/alloy/"

shows a dialog with an error "You can't open the application terminal-notifier" because it may be damaged or incomplete."

*It shows the notification just fine; the error happens when I click the notification. thanks!

Latest OS X update broke -open

I recently updated to OS X 10.8.4 and the -open flag broke. Running this command:

./terminal-notifier.app/Contents/MacOS/terminal-notifier -message test -open test

and clicking on the notification now gives me this error message:

You can’t open the application “terminal-notifier.app” because it may be damaged or incomplete.

This is both with the prebuilt binary and with the binary I built myself.

Parameter allowing custom icon

An optional parameter for passing a notification specific icon would allow scripts/apps to better customize their notification's appearance.

10.9: activate option doesn't work

My command is:
terminal-notifier -message 'Some text' -title 'Some title' -sender com.apple.iTunes -activate com.apple.iTunes

Notification is shown but clicking it does nothing and notifications doesn't disappear.

Console.app shows:
15/10/13 18:31:59,865 usernoted[189]: Cannot find originating application to launch for event action. file:///Applications/iTunes.app/ is not the same app as the one that sent the original notification.
15/10/13 18:31:59,865 usernoted[189]: Error finding application com.apple.iTunes.

Custom Icon Build

Hi. This is more of a XCode question. I cloned your repo and try to build with a custom icon, and got

Code Sign error: The identity 'Developer ID Application: Fingertips B.V.' doesn't
match any valid, non-expired certificate/private key pair in your keychains

Do I really have to pay the $99 for developer program just to build an app locally?

Networked notifications

Wouldn't it be conceivable to listen notifications from network ?

Maybe it could be another project such as terminal-notifier-daemon, but in order to completely remove Growl that would be great if terminal-notifier could handle external notifications such as system alerts or build statuses, etc...

I can imagine it's not trivial, security is important, finding the good port is crucial, dealing with floods, etc...
But hey, let's say it's a feature request ;)

Suggestion: Allow multiple notifications to show simultaneously.

Currently (1.4.2), if you send a notification while another one (also sent by terminal-notifier) is still showing, the latter replaces the former.

This behavior seems to be independent of whether different group IDs are used or not.

It would be nice to have the option to have multiple notifications show simultaneously (issued in short sequence), as in Growl.

Thanks for a great tool, btw.

Does appear to be working under 10.9

I've installed this under OS X 10.9 Developer Preview 7.

When I attempt to send notifications nothing seems to appear.

I've checked in console and cannot see any errors.

Please let me know where I might be able to see debug information to improve reporting of this issue.

Check if message of specific group exists

Hi,

your tool is amazing and the progress is stunning! You already replaced growlnotify for me and with the -activate key, I have build some nice recursive messages ;-)

Now to the question:
is it technically possible to check or probe, if a notification of a given group is currently displayed?
The -remove switch can remove a group. If posting multiple messages to one group, the old one gets discarded and some info is printed ("...which was delivered on: 2012-07-31 18:12:59 +0000").

Is a "-check" option possible that just outputs something like " Yep, message of that group is currently being displayed. Since 2012-07-31 18:12:59)." That would come in really handy for some scripts that only post messages to a group if the old message is older than x minutes. Or I could -remove messages that are older than y minutes.

Keep up the great work!

brackets break titles or message

terminal-notifier -title "#channel" -subtitle "<+username>" -message "my message"

will show as:

channel

my message

on the command line if i escape the < it works... but over an ssh not working.
Anyway to use <> in the fields and not break?

Options notification center

Hi, just emailed eloy this morning, in order to ask him if terminal-notifier would have the new Mavericks options in a notification as close, view, delete, etc...

well, he told me to post in github, so excuse me if it is not the right place for it, i don't really know how to use it correctly.

thanks.

Coloring the title/message

I'm wondering if it is somehow possible to color the title or message?

Since we don't get a custom icon easily this could be an option for guard users to color passing and failing tests.

Mavericks icon/image support?

Hi,

It seems like Mavericks notification support custom icon/image per notification, is it possible to add that to terminal-notifier? Would be great for guard-rspec success/fail status.

screen shot 2013-10-28 at 11 08 53

Thanks!

--ico Options

@alloy I am wondering if I can pass an ico option so that it display it instead of the terminal icon. I'll be glad to make it happen if you point me in the right direction.

On 10.8.5: -sender doesn't seem to work with -execute

Doing -sender by itself works, and doing -execute by itself works, but when doing both, -execute doesn't seem to be done.

terminal-notifier -message "test" -sender "com.apple.iTunes"
terminal-notifier -message "test" -execute "say Test"
terminal-notifier -message "test" -sender "com.apple.iTunes" -execute "say Test"

terminal-notifier segfaults

Installed from gem, on Mac OSX 10.7.5. No matter if I try to run it via the wrapper or directly inside *.app (like described in readme), result is like this:

$ terminal-notifier -message "foo"
Segmentation fault: 11

Run terminal-notifier via LaunchAgent (Daemon) process

I'd like to periodically pop up a notification (I have a "current task" I'd like to display, in a Pomodoro style app). I am attempting to use a user Launch Agent to schedule the task, which works successfully for running .sh or .py scripts. However, I'm not able to schedule the terminal-notifier to successfully launch. A possible cause from other reading is that the Environment variables are different for the Launch Agent process than the usual logged in user's Environment.

Please see this StackOverflow question for the details:
http://stackoverflow.com/questions/16616441/failure-to-run-terminal-notifier-ruby-app-from-a-launch-agent-in-osx-environm

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.