Skip to content
A plugin to alert you when a long-running command has finished
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CHANGELOG.md CHANGELONG renamed to CHANGELOG.md Sep 26, 2019
LICENSE
README.md
VERSION
zlong_alert.zsh

README.md

zlong_alert.zsh

zlong_alert.zsh will use notify-send and a bell to alert you when a command that has taken a long time (default: 15 seconds) has completed.


Installation

zplug

zplug "kevinywlui/zlong_alert.zsh"

Manual

This script just needs to be sourced so add this to your .zshrc:

source /path/to/zlong_alert.zsh

Configuration

There are 3 variables you can set that will alter the behavior this script.

  • zlong_duration (default: 15): number of seconds that is considered a long duration.
  • zlong_ignore_cmds (default: "vim ssh"): commands to ignore.
  • zlong_use_notify_send (default: true): whether to use notify-send.

For example, adding the following anywhere in your .zshrc

zlong_use_notify_send=false
zlong_duration=2
zlong_ignore_cmds="vim ssh pacman yay"

will alert you, without using notify-send, if a command has lasted for more than 2 seconds, provided that the command does not start with any of vim ssh pacman yay.

Changelog

See CHANGELOG

Credit

This script is the result of me trying to understand and emulate this gist: https://gist.github.com/jpouellet/5278239 My version fixes some things (possibly bugs?) that I did not like about the original version.

You can’t perform that action at this time.