Lots of bin changes
This commit is contained in:
parent
2c617a5b49
commit
121798e075
12 changed files with 258 additions and 44 deletions
24
bin/.bin/settimer
Executable file
24
bin/.bin/settimer
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "$@" > "$HOME/timer"
|
||||
|
||||
|
||||
humanDuration=$(head -n 1 "$HOME/timer")
|
||||
# All these dates are in seconds since the epoch
|
||||
duration=$(( $(date -d "now + $humanDuration" '+%s') - $(date '+%s') ))
|
||||
|
||||
# Display date time notification when half way
|
||||
( sleep $(( duration / 2 ))
|
||||
datetime
|
||||
) & disown
|
||||
|
||||
# Display date time notification when 90% done
|
||||
( sleep $(( (duration * 9) / 10 ))
|
||||
datetime
|
||||
) & disown
|
||||
|
||||
# Display date time notification when half way
|
||||
( sleep $duration
|
||||
datetime "Finished"
|
||||
) & disown
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue