Code Monkey home page Code Monkey logo

terminal-notifier-guard's Introduction

TerminalNotifier - Guard Style

A simple Ruby wrapper around the terminal-notifier command-line tool, which allows you to send User Notifications to the Notification Center on Mac OS X 10.8, or higher.

This version has 4 different icons included for each status that Guard supports:

  1. Failed
  2. Notify
  3. Pending
  4. Success

Installation

This version depends on the official terminal-notifier. Install it with Homebrew or see the official Installation instructions.

$ brew install terminal-notifier

Then, install the gem

$ gem install terminal-notifier-guard

Or add it to your Gemfile:

gem 'terminal-notifier-guard', '~> 1.6.1'

OSX 10.8 users

As of version 1.6.1, we no longer bundle notifiers binaries in this gem. Please revert to version 1.5.3 for OSX 10.8 support.

Usage

You could also use the notifier directly.

Examples are:

TerminalNotifier::Guard.notify('Hello World')
TerminalNotifier::Guard.notify('Hello World', :title => 'Ruby', :subtitle => 'Programming Language')
TerminalNotifier::Guard.notify('Hello World', :activate => 'com.apple.Safari')
TerminalNotifier::Guard.notify('Hello World', :open => 'http://twitter.com/alloy')
TerminalNotifier::Guard.notify('Hello World', :execute => 'say "OMG"')
TerminalNotifier::Guard.notify('Hello World', :group => Process.pid)

TerminalNotifier::Guard.remove(Process.pid)

TerminalNotifier::Guard.list(Process.pid)
TerminalNotifier::Guard.list

TerminalNotifier::Guard.failed('This did not go well.')
TerminalNotifier::Guard.success('This did not go bad.')
TerminalNotifier::Guard.pending('This needs some work still')

License

All the works are available under the MIT license.

See LICENSE for details.

Contributors & Thanks to

  • @alloy (For the terminal-notifier)
  • @railsme (For a clean way to test for OSX version #15)
  • @jamilbx (For support for local terminal-notifier command #8)

terminal-notifier-guard's People

Contributors

alloy avatar frostrubin avatar glittershark avatar henrikbrixandersen avatar ranmocy avatar

Watchers

 avatar  avatar

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.