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