aboutsummaryrefslogtreecommitdiff
path: root/bin/alert
blob: 45103ff483bcd83f5bf2954e4f236531fa48c15b (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="notify-send 'alert'; echo -n -e \a"

eval $CMD

if test -n "$1"
then
	while true
	do
		eval $CMD
		sleep 1
	done
fi