From 125237e4a7cf7e6d2ec28565d4403ab9c9908d85 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 10 Oct 2019 23:12:02 +0200 Subject: add generic shell helper scripts --- bin/alert | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 bin/alert (limited to 'bin/alert') diff --git a/bin/alert b/bin/alert new file mode 100755 index 0000000..2eb45e5 --- /dev/null +++ b/bin/alert @@ -0,0 +1,25 @@ +#!/bin/sh + +# Print and ring Bell + +# Author: Florian Fischer +# License: WTFPL + +if test -n "$1" -a ! \( "$1" == "-l" -o "$1" == "--loop" \) +then + echo "Usage: $0 [-l | --loop]" + exit 1 +fi + +CMD="xkbbell ^/dev/null; echo -n -e \a" + +eval $CMD + +if test -n "$1" +then + while true + do + eval $CMD + sleep 1 + done +fi -- cgit v1.2.3