#!/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