dotfiles/.local/bin/reveil

38 lines
665 B
Bash
Executable file

#!/bin/bash
[[ -z "$3" ]] && volume=90 || volume="$3"
sleeptime=$(date -Iseconds -d "$1")
wakeuptime=$(date -Iseconds -d "$2")
#if [[ "$(whoami)" != "root" ]]
#then
# echo "Ce script doit être exécuté en root" >&2
# exit 1
#fi
echo $sleeptime
echo $wakeuptime
read
echo 0 off > /proc/acpi/ibm/led
pkill xscreensaver
termdown -f contessa -a "$sleeptime"
mocp -s
pkill vlc
termdown -f contessa -a "$wakeuptime"
#rtcwake -m mem -t $wakeuptime
amixer -q -D default sset Master "$volume%"
echo 0 on > /proc/acpi/ibm/led
pkill mpv
mpv --loop-file ${HOME}/Musique_old/Sons/reveil.mp3
xscreensaver &
#mpv --loop-file /home/breizh/Musique/Radio_caroline.m3u