dotfiles/.local/bin/reveil

45 lines
769 B
Text
Raw Permalink Normal View History

2018-12-26 00:40:38 +01:00
#!/bin/bash
[[ -z "$3" ]] && volume=90 || volume="$3"
#if [[ "$(date "+%F" -d "$2")" = "$(date "+%F")" ]]
#then
# set -- "$1" "tomorrow $2" "$3"
#fi
2018-12-26 00:40:38 +01:00
sleeptime=$(date -Iseconds -d "$1")
wakeuptime=$(date -Iseconds -d "$2")
2018-12-26 00:40:38 +01:00
#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/girlswithguns.mp3
2018-12-26 00:40:38 +01:00
xscreensaver &
#mpv --loop-file /home/breizh/Musique/Radio_caroline.m3u