|
|
@ -9,15 +9,15 @@ timerrun() { |
|
|
|
bc |
|
|
|
bc |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
date1=$((`date +%s` + $TIME)); |
|
|
|
DATE1=$(($(date +%s) + TIME)); |
|
|
|
while [ "$date1" -ge `date +%s` ]; do |
|
|
|
while [ "$DATE1" -ge "$(date +%s)" ]; do |
|
|
|
echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S) \r"; |
|
|
|
printf %b "$(date -u --date @$((DATE1 - $(date +%s))) +%H:%M:%S) \r"; |
|
|
|
sleep 0.1 |
|
|
|
sleep 0.1 |
|
|
|
done |
|
|
|
done |
|
|
|
echo "Done with $@" |
|
|
|
echo "Done with $*" |
|
|
|
|
|
|
|
|
|
|
|
while :; |
|
|
|
while :; |
|
|
|
do notify-send "Done with $@"; |
|
|
|
do notify-send "Done with $*"; |
|
|
|
sxmo_vibratepine 1000 |
|
|
|
sxmo_vibratepine 1000 |
|
|
|
sleep 0.5 |
|
|
|
sleep 0.5 |
|
|
|
done |
|
|
|
done |
|
|
@ -26,7 +26,7 @@ timerrun() { |
|
|
|
menu() { |
|
|
|
menu() { |
|
|
|
pidof svkbd-sxmo || svkbd-sxmo & |
|
|
|
pidof svkbd-sxmo || svkbd-sxmo & |
|
|
|
TIMEINPUT="$( |
|
|
|
TIMEINPUT="$( |
|
|
|
echo -e " |
|
|
|
echo " |
|
|
|
1h |
|
|
|
1h |
|
|
|
10m |
|
|
|
10m |
|
|
|
9m |
|
|
|
9m |
|
|
@ -43,9 +43,9 @@ menu() { |
|
|
|
" | awk 'NF' | awk '{$1=$1};1' | dmenu -p Timer -c -fn "Terminus-30" -l 20 |
|
|
|
" | awk 'NF' | awk '{$1=$1};1' | dmenu -p Timer -c -fn "Terminus-30" -l 20 |
|
|
|
)" |
|
|
|
)" |
|
|
|
pkill svkbd-sxmo |
|
|
|
pkill svkbd-sxmo |
|
|
|
[[ "Close Menu" == "$TIMEINPUT" ]] && exit 0 |
|
|
|
[ "Close Menu" = "$TIMEINPUT" ] && exit 0 |
|
|
|
|
|
|
|
st -f Monospace-50 -e "$0" timerrun "$TIMEINPUT" |
|
|
|
st -f Monospace-50 -e $0 timerrun $TIMEINPUT |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[ $# -gt 0 ] && $@ || menu |
|
|
|
# shellcheck disable=SC2068 |
|
|
|
|
|
|
|
if [ $# -gt 0 ]; then $@; else menu; fi |