summaryrefslogtreecommitdiff
path: root/.local/bin/alarm
blob: 2909ecf824fd2de02fdc78694dea3a28c1fcb00c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

[ $1 = "-h" -o $1 = "--help" ] && echo "usage: alarm time sound_file" && exit 0
[ $# != 2 ] && echo "usage: alarm time sound_file" && exit 1

echo "alarm set for $1"
echo "$(basename "$2") is the alarm tone"

while [ $(date +%H:%M) != "$1" ]
do
		sleep 1
done

amixer -q sset Master 100% unmute
pkill -RTMIN+10 i3blocks
mpv --loop=inf $2