~scripts
55 itemsDownload ./*

55 itemsDownload ./*

..
dzen2
tiling
vosh
4cdl
4trips
alarm
ambient
ana-wall.sh
battery-monitor
brightness.sh
checkit
cleverbot.py
clock
color-gen
colors-hex
colorscheme.sh
compton
dailywall
dmenu
ffthumb
grid
gridmacro
gridmacro.kde
help
importw
indexer
install-all.sh
install-twily.sh
installng
keep-on
mp3ogg
orage
pipes
pipes.x
pipewire_bt.sh
ports
rain
randwall
rotate.sh
scan.sh
screen-dim
screencast
screencast2
scrot
scrotw
search
skull
slocker
starwars
streamit
sumnum
tty-colorize
usrmount
ytp
ytplay


scriptsalarm
2 661•  8 years ago•  DownloadRawClose
8 years ago•  2 661

{}
#!/bin/bash
#
# Author:       Twily                          2016
# Description:  Play file at specific time as alarm
# Requires:     alsa, wget (or mpv for mp3)
# Usage:        $ sh ./alarm 07:00
# Format:       $ date +"%H:%M"
#

LOCK=true
SET="$1"

while $LOCK; do
    NOW=$(date +"%H:%M")
    if [ "$SET" == "$NOW" ]; then LOCK=false; fi

    sleep 1
done

echo "Time is $NOW; Executing alarm!"

amixer -q sset Master unmute
amixer -q sset Master 100%

#ALARM="/home/guest/DATA-TWILY-OLD/music/Miley Cyrus - Can't Be Tamed.mp3"
#mpv --loop=inf --no-terminal --volume=100 "$ALARM"

# http://www.actsofvolition.com/archive/2005/january/thesoundofdata
wget http://twily.info/usa.bmp --quiet -O /tmp/usa.bmp
while :; do cat /tmp/usa.bmp | aplay --quiet -r 8000; done

exit

Top
©twily.info 2013 - 2024
twily at twily dot info



2 017 351 visits
... ^ v