diff options
author | Guillermo Ramos | 2023-03-12 16:01:02 +0100 |
---|---|---|
committer | Guillermo Ramos | 2023-03-12 16:01:02 +0100 |
commit | 9bee881c089ffb6c32c8d686dbfdbdcda47384d4 (patch) | |
tree | 022dec992ddeea5ffa8a2e1d4371f483dbbec44a | |
parent | db00c06ff58b00a0b2ef1bd892eee5e08fb1647d (diff) | |
download | cli-9bee881c089ffb6c32c8d686dbfdbdcda47384d4.tar.gz |
ding cmd + update gromo's ding URL
-rwxr-xr-x | ding | 17 | ||||
-rwxr-xr-x | gromo | 2 |
2 files changed, 18 insertions, 1 deletions
@@ -0,0 +1,17 @@ +#!/bin/sh +# +# Usage: ding <command> +# Just play a ding when the command is finished :) +############################################################################### + +CACHE_DIR=${XDG_CACHE_HOME:-$HOME/.cache} + +OK_DING_URL=https://gramos.me/sounds/macos8/Indigo.ogg +OK_DING=$CACHE_DIR/indigo.ogg +[ -f "$OK_DING" ] || curl $OK_DING_URL --create-dirs -so "$OK_DING" + +ERROR_DING_URL=https://gramos.me/sounds/macos8/Quack.ogg +ERROR_DING=$CACHE_DIR/quack.ogg +[ -f "$ERROR_DING" ] || curl $ERROR_DING_URL --create-dirs -so "$ERROR_DING" + +"$@" && { mpv --no-terminal "$OK_DING" & } || { mpv --no-terminal "$ERROR_DING" & } @@ -16,7 +16,7 @@ shopt -s nullglob -DEFAULT_DING=https://gramos.me/ding.opus +DEFAULT_DING=https://gramos.me/sounds/ding.opus DATA_DIR=${XDG_DATA_HOME:-$HOME/.local/share}/gromo CACHE_DIR=${XDG_CACHE_HOME:-$HOME/.cache}/gromo |