beepmein

Beepmein

A reminder/alarm script using ‘at’ as back.

Set reminder or alarm:

    beepmein now + 3 minutes # reminder ('at' time format)
    
    beepmein 22:10           # reminder ('at' time format)
            
    beepmein 3               # reminder (in 3 minutes, beepmein shortcut)
            
    beepmein 8:00 --alarm    # alarm (must be last parameter)
    
    beepmein --nr 5          # with no reason (must be first parameter)
       
Set sounds: (playback depends on mpv)

    beepmein --set-alarm <path/to/alarm.sound>
    beepmein --set-remind <path/to/reminder.sound>

Test playback, blinking and notifications:

    beepmein --reaction reminder_text
    beepmein --reaction --alarm alarm_text
    beepmein --test # test everything

Kill all running playback/beeping:

    killall beepmein 

Notes:

    at -l       # will list pending jobs (or atq)
    at -r <num> # will remove job <num>  (or atrm)

Note: ‘at’ doesn’t use seconds, max precision seems to be minutes.

Some debate.

With Debian buster ‘at’ jobs may be found in /var/spool/cron/atjobs.

gmrun could be also used instead of yad for inputing ‘reason’

in ~/.gmrunrc

# beepmein reason
URL_reason = echo "%s"

in beepmein, under input

read -rp "reason? " reason || reason="$(gmrun reason:)"

pipeBeepmein

Pipe-menu of some sort intended for jgmenu, using cvs format.

scrot12376.md.png

Date calculus

https://stackoverflow.com/questions/8903239/how-to-calculate-time-elapsed-in-bash-script

For example to get ‘now + 5 minutes’

date +%R
16:36
date -u -d "+5 minutes" +%R 
15:41

Date non-documented features (misko)

Miliseconds
date +%s%3N
Microseconds
date +%s%6N
Nanoseconds
date +%s%9N

for example to get Seconds.Miliseconds

date +%_S.%3N
repeat 120 date +%_S.%3N # zsh
about / github / jekyll