aboutsummaryrefslogtreecommitdiff
path: root/bin/alert
blob: 2eb45e53c8d124c9297e5970d0f61018c5327d8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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