From: Nicolas Boisselier Date: Tue, 17 Mar 2015 23:27:25 +0000 (+0000) Subject: alerts X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=ab2c996e2684a69c77b90acf1474893885f0245e;p=nb.git alerts --- diff --git a/etc/bashrc.function b/etc/bashrc.function index 3c795edf..e2d13ea0 100644 --- a/etc/bashrc.function +++ b/etc/bashrc.function @@ -250,13 +250,19 @@ nb-alert() { host=pi.brighton.loc cmd="$cmd && echo $FUNCNAME > /var/run/gpiod.sock" ;; - sound) + say) + host=pi.brighton.loc + shift + cmd="$cmd && say <<< \"$@\"" + ;; + beep) host=pi.brighton.loc cmd="$cmd && play 2>/dev/null -v 5 /home/pi/python_games/beep1.ogg" ;; *) host=macbook.brighton.loc - cmd="$cmd && mac-xmessage \"$FUNCNAME: $1\" 1>/dev/null" + shift + cmd="$cmd && mac-xmessage \"$FUNCNAME: $@\" 1>/dev/null" ;; esac cmd="sh -c '$cmd'"