MIT Licence Bash Shell PRs Welcome

It's lit :fire:

Notify when a terminal task is done

Image could not be displayed

Sample working video, sped up at x2.

Install dependencies first :

  • For Mac OS - brew install terminal-notifier
  • For Ubuntu - sudo apt-get install notify-osd pulseaudio-utils libnotify-bin

Note: The above dependencies are generally installed on most systems.

Notifyre has been tested on a fresh install of Ubuntu 16.04 running bash, zsh or fish. If you have managed to port this script to another shell or another OS, please open a pull request with the instructions for the same and we will update the README! Got some coverage here.

Table of Contents

Bash / ZSH

(Back to top)


  • Place & in your home folder

    git clone
    cd NotiFyre
    cp ~
  • :zap: Lightning fast alternative: Pull only these two files from GitHub!

    curl -o ~/
    curl -o ~/
  • Add the following lines to the end of ~/.bashrc or ~/.zshrc:

    # as close to the end as possible
    source ~/
    source ~/

    Note: These 2 lines should be added as close to the end of the file as possible.

  • If you do not want to be notified for each command, then add only this to the end of your rc file:

    source ~/

    To get a notification for a command in this case, you need to run it as nf <command>


(Back to top)


There are four configurable options in NotiFyre:

  1. SOUND

    Options: 0 or 1

    Utility: SOUND=1 will play an alert sound for each notification that takes more time than SOUND_MIN seconds. This value is a boolean.


    Valid values: 1, 2, 3 ...

    Utility: Let's you configure the minimum amount of time a command must take for it to trigger a sound notification. (If SOUND=0, then no sound notification will be played) This value is in seconds.

  3. ALERT

    Options: Path to a sound file

    Utility: The sound file will be played whenever SOUND=1 and a command has taken more time than SOUND_MIN seconds. If the sound file does not exist, it plays an audible-bell sound (varies by terminal) as a fallback.


**Options:** 1, 2, 3, ...

**Utility:** An option to configure the minimum amount of time that a
command must take in order to trigger a notification. This value is in

Fish shell

(Back to top)


  • Place the, and in your ~/.config/fish/functions/ folder.

    git clone
    cd NotiFyre
    cp ~/.config/fish/functions/
  • :zap: Lightning fast alternative:

    # Pull the files from Github
    curl -o ~/.config/fish/functions/
    curl -o ~/.config/fish/functions/
    curl -o ~/.config/fish/functions/
  • To be notified for each process, add this to your functions/ file just before the end :

     function fish_prompt
        eval (notifyre)  # at the very end

    This method works pretty well with my bobthefish theme and no theme as well. Let me know if it doesn't work out for you.

  • If you want to be notified only for select commands, you do not need to modify the file.

    Run with nf command

    [This might take slightly more time than the process itself to complete execution.]

You can learn to write your own functions in fish with this as a starting point.


(Back to top)

set -x timeout 1
set -x ring_timeout 2
set -x ALERT /usr/share/sounds/ubuntu/notifications/Slick.ogg

There are three available options:

  1. timeout : Same as option MIN_INTERVAL in the Bash / ZSH section above

  2. ring_timeout : Same as option SOUND_MIN in the Bash / ZSH section above

  3. ALERT : Same as option ALERT in the Bash / ZSH Section above

    Note: The notifications appear in a queue, and cannot be implemented parallely (known bug in notify-send)

Why This?

(Back to top)

I had to reinstall Ubuntu quite a number of times thanks to how awesome Windows messed up my laptop. This script seeks to help anyone who multi-tasks, or does not constantly check their terminals. ntfy wasn't consistent always, so made this.

Tested on fresh install of Ubuntu 16.04, Arch Linux and Mac. Ubuntu 14 may require Slick.ogg whose path must be changed before usage.


(Back to top)

Your contributions are always welcome :smile: ! Please have a look at the contribution guidelines first.

Discussion Group:

You can use for some previous work I've referred to while making this.

Have a suggestion? Make an issue about it.


(Back to top)

Not working/ Message not displayed

check if notify-osd is working with this - notify-send "hi"

If no message pops up, it means notify-osd has stopped working. Reinstall some dependencies and try again:

sudo apt-get --reinstall install libnotify-bin notify-osd

For further customizations, you can use NotifyOSD config


(Back to top)


(Back to top)

The MIT License (MIT) 2017 - Kaustubh Hiware. Please have a look at the for more details.


Notify when a terminal task is done/ Terminal task notifier

Notifyre Info

⭐ Stars 56
🔗 Source Code
🕒 Last Update 9 months ago
🕒 Created 6 years ago
🐞 Open Issues 12
➗ Star-Issue Ratio 5
😎 Author kaustubhhiware