From 82df70eff06e7b44ee84283070d7f801f7fc1d92 Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sat, 6 Nov 2021 20:25:45 -0400 Subject: initial commit --- .local/bin/alarm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 .local/bin/alarm (limited to '.local/bin/alarm') diff --git a/.local/bin/alarm b/.local/bin/alarm new file mode 100755 index 0000000..2909ecf --- /dev/null +++ b/.local/bin/alarm @@ -0,0 +1,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 + -- cgit v1.2.3