Skip to content

n3tw0rth/completion-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Completion Notifier

A simple notifier to send notifications on terminal process events.

Installation

Install directly from source

  $ git clone https://github.com/n3tw0rth/completion-notifier.git
  $ cd completion-notifier
  $ ./install.sh
  
  $ completion-notifier -h

it is better to use a alias for the binary,

#.bashrc
alias notif='completion-notifier'

Usage

It is easy as passing the command directly, by default a notification will be send once the program completes execution success or failed.

$ completion-notifier ping google.com 

Profiles

Profiles can used to group notification clients by a specific name.

[profiles.default]
sendto = ["desktop","email.default"]

[profiles.work]
sendto = ["desktop","gchat.work","email.work"]

Triggers

Triggers can be added to send custom notifications based on the requirement. for example,

$ completion-notifier -t PING ping google.com 

program will start running as usual, and will send additionals notifications before process exit. Based on the string values passed into the -t flag. According to this example a notification will be send when program find a specific line contain the word PING.

$ completion-notifier -t approve,'Enter a value' terraform apply

flag -t will accept comma seperated values, and trigger values containing more words seperated by spaces they can be passed in as shown. In this example user will be notified when there undefined variables and when terraform ask for user confirmation to apply the change.

Configuration

[email.default]
from = "[email protected]"
to = "[email protected]"
username = ""
password = ""
port = 465
host = ""

[email.work]
from = "[email protected]"
to = "[email protected]"
username = ""
password = ""
port = 465
host = ""

[profiles.default]
sendto = ["desktop","email.default"]

[profiles.work]
sendto = ["desktop","gchat.work","email.work"]

[gchat.work]
api_key = ""
webhook = ""

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published