Code Monkey home page Code Monkey logo

noti's Introduction

noti

Display a notification after a terminal process finishes.

Types

These are the different types of notifications currently available.

Desktop notifications

This is the default. Supported on OS X and Linux/FreeBSD through libnotify. This is great so you don't have to keep checking the terminal to see if your process is done.

OS X notification (OS X)

Linux Mint notification (Linux Mint 17.2)

Dunst (Dunst)

Pushbullet notifications

This is great if you want to leave sight of your computer and grab some coffee. These notifications will get sent to all your Pushbullet devices, including your phone.

Pushbullet notification

Pushbullet Android notification

Installation

Download the latest release for your OS and architecture from the releases page. Then, add it to your PATH.

# OS X
curl -LOk https://github.com/variadico/noti/releases/download/v1.3.0/noti1.3.darwin-amd64.tar.gz

# Linux
curl -LOk https://github.com/variadico/noti/releases/download/v1.3.0/noti1.3.linux-amd64.tar.gz

If you're feeling adventurous, you could download a prerelease of noti version 2, which includes speech notifications, among other things.

# OS X
curl -LOk https://github.com/variadico/noti/releases/download/v2.0.0-rc.1/noti2.0.0-rc.1.darwin-amd64.tar.gz

# Linux
curl -LOk https://github.com/variadico/noti/releases/download/v2.0.0-rc.1/noti2.0.0-rc.1.linux-amd64.tar.gz

Otherwise, if you have Go installed and want to compile noti from source, you can do this.

go get -u github.com/variadico/noti

Usage

Just put noti at the beginning or end of your regular commands.

noti [options] [utility [args...]]

Options

-t, -title
    Set the notification title. If no arguments passed, default is "noti",
    otherwise default is utility name.

-m, -message
    Set notification message. Default is "Done!"

-s, -sound
    Set notification sound (OS X only). Default is Ping.
    Possible options are Basso, Blow, Bottle, Frog, Funk, Glass, Hero,
    Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink.
    Check /System/Library/Sounds for available sounds.

-f, -foreground
    Bring the terminal to the foreground. (OS X only)

-p, -pushbullet
    Send a Pushbullet notification. Access token must be set in NOTI_PB
    environment variable.

-v, -version
    Print noti version and exit.

-h, -help
    Display usage information and exit.

Examples

Display a notification when tar finishes compressing files.

noti tar -cjf music.tar.bz2 Music/

Display a notification when apt-get finishes updating on a remote server.

noti ssh [email protected] apt-get update

Set the notification title to "homebrew" and message to "Up to date" and display it after brew finishes updating.

noti -t "homebrew" -m "up to date" brew upgrade --all

You can also add noti after a command, in case you forgot at the beginning.

clang foo.c -Wall -lm -L/usr/X11R6/lib -lX11 -o bizz; noti

Create a reminder to get back to a friend.

noti -t "Reply to Pedro" gsleep 5m &

Send a Pushbullet notification after tests finish.

noti -p go test ./...

noti's People

Contributors

cryptix avatar variadico 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.