From 9bee881c089ffb6c32c8d686dbfdbdcda47384d4 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Sun, 12 Mar 2023 16:01:02 +0100 Subject: ding cmd + update gromo's ding URL --- ding | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 ding (limited to 'ding') diff --git a/ding b/ding new file mode 100755 index 0000000..e89cf00 --- /dev/null +++ b/ding @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Usage: ding +# 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" & } -- cgit v1.2.3