this repo has no description
1# vim:ts=4:et:tw=72
2# $Id: README,v 1.5 2007/02/24 22:54:42 jcs Exp $
3
4blueping
5------------------------------------------------------------------------
6by joshua stein <jcs@jcs.org> http://jcs.org/
7
8blueping is a simple command-line utility for mac os x (>=10.4) that
9"pings" a bluetooth device in a loop, optionally executing programs when
10the device is reachable (within range) and/or not reachable (out of
11range).
12
13blueping is released under a bsd license.
14
15the following options are available:
16
17 -d MAC (required) the mac address of the device, in the format
18 01-23-45-67-89-01 or 012345678901. can be found by opening
19 the system bluetooth preferences and locating the "device
20 address" of the device.
21
22 the device must be paired and configured prior to using it
23 with blueping.
24
25 -e PROG (optional) a string to execute when the device enters range
26 and is reachable. passed directly to sh(1).
27
28 -i NUM (optional) the interval, in seconds, to ping the device.
29 the default is 15 seconds. not recommended to be under 5
30 seconds.
31
32 -v (optional) be verbose and log to STDOUT. specify this
33 option twice to be even more verbose.
34
35 -x PROG (optional) a string to execute when the device exits range
36 and is no longer reachable. passed directly to sh(1).
37
38examples of usage:
39
40 when i walk away carrying my cell phone, lock the screen:
41
42 blueping -d 00-14-9a-d8-10-18 -v -x "/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine"
43
44 when my cell phone comes into range, run a helper script that checks
45 the last time that iSync completed and if it has been over a certain
46 amount of days, launch iSync and auto-synchronize:
47
48 blueping -d 00-14-9a-d8-10-18 -v -e "/Users/jcs/bin/blueping-isync"
49
50 when i walk away carrying my cell phone, pause itunes, then unpause
51 it when i return:
52
53 blueping -d 00-14-9a-d8-10-18 -v \
54 -e "osascript -e 'tell application "'"iTunes"'" to play'" \
55 -x "osascript -e 'tell application "'"iTunes"'" to pause'"