Skip to content

Commit 62ecfbc

Browse files
committed
Added a keystroke to quickly launch the Backblaze preference pane.
1 parent 453ca24 commit 62ecfbc

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

backblazemonitor.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ COLORTIME="\033[31m"
66
COLORTEXT="\033[32m"
77
COLORSPACE="\033[33m"
88
COLORFILE="\033[36m"
9+
BACKBLAZEAPP="/Applications/Backblaze.app"
910

1011
#unset SPACEDIFFERENCE
1112
#unset $SPACEREMAININGRAW
@@ -91,7 +92,7 @@ human_time() {
9192
# local scratch set, using none (not backing up or between files)
9293

9394
SLTIME=$((FREQUENCY * 60))
94-
echo "This script will run until you interrupt it (CTRL-C)"
95+
echo "This script will run until you interrupt it (CTRL-C); press 'b' to launch the Backblaze preference pane."
9596
debug "You will receive an update every $COLORTIME$FREQUENCY minutes$COLORTEXT."
9697
while true
9798
do
@@ -154,6 +155,13 @@ do
154155
unset OLDFILE
155156
unset SPACEREMAININGRAW
156157
fi
157-
158-
sleep "$SLTIME"
158+
read -t $SLTIME -n 1 -s key
159+
if [[ $key = b ]]
160+
then
161+
key=""
162+
if [ -n $BACKBLAZEAPP ]
163+
then
164+
open $BACKBLAZEAPP
165+
fi
166+
fi
159167
done

0 commit comments

Comments
 (0)