- Timestamp:
- 11/27/05 22:06:28 (19 years ago)
- Location:
- trunk/LocationDo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocationDo/LocationDo.py
r198 r205 31 31 RE_AIRPORT_STATUS = '/'.join([kSCDynamicStoreDomainState, kSCCompNetwork, kSCCompInterface, kSCCompAnyRegex, kSCEntNetAirPort]) 32 32 33 # XXX switch to Cocoa interface for Growl 33 34 growl = app('GrowlHelperApp') 34 35 … … 58 59 currentLocation = Location() 59 60 61 # XXX attach actions to location tag; something like: 62 # locations['Siebel'].onArrive.ensureKerberosPrincipalsValid(...) 63 60 64 def arriveAtLocation(location): 61 65 growlNotify(NOTIFICATION_ARRIVE, 'Arriving at location', location) … … 68 72 action.setDisplayBrightnessPercent(0.2) 69 73 action.setAdiumStatus('Working in 1115 SC') 74 if '1404 SC' in location: 75 action.setDisplayBrightnessPercent(0.4) 76 action.setVolumePercent(0) 77 action.setAdiumStatus('In 1404 SC') 70 78 if '4111 SC' in location: 71 action.openInBackground('~/Documents/MSSP/MSSP progress.oo3') 72 action.terminalDo('kswitch -p njriley@ACM.UIUC.EDU;(sleep 10;kswitch -p njriley@AD.UIUC.EDU)&!;clear;ssh yt') 79 action.openInBackground('~/Documents/Research/Research progress.oo3') 80 # XXX wait for yt to be accessible 81 # XXX start NX 82 # XXX move windows 83 action.terminalDo('kswitch -p njriley@ACM.UIUC.EDU;(sleep 10;kswitch -p njriley@AD.UIUC.EDU)&! ;clear;ssh yt') 73 84 action.setDisplayBrightnessPercent(0.9) 74 85 action.setAdiumStatus('Working in 4111 SC') 75 86 if 'ACM office' in location: 76 87 action.setDisplayBrightnessPercent(0.2) 88 action.setVolumePercent(0.5) 77 89 action.setAdiumStatus('At ACM') 78 90 if 'Champaign' in location: … … 121 133 122 134 # XXX watch battery status, too, for display brightness 135 # XXX look at display configuration to tell difference between 4111 and 4124 136 # XXX need concept of ambiguity, ask user which location they're in (ACM/1115) 123 137 124 138 airPortStatus = {'BSSID': None, 'SSID': None} … … 136 150 '00:0e:83:05:75:d2']: 137 151 location.add('4111 SC') 152 elif bssid in ['00:0e:83:05:75:a2', '00:0e:83:05:75:a0']: 153 location.add('1404 SC') 138 154 elif bssid in ['00:0e:83:05:76:82', '00:0e:83:05:76:80']: 139 155 location.add('ACM office') … … 146 162 elif bssid == '00:02:2d:2c:cb:34': 147 163 location.add('B02 CSL') 164 elif bssid == '00:13:c4:78:e1:a0': 165 location.add('Engineering Hall') 166 elif bssid == '00:0d:93:ed:e0:bc': 167 location.add('340 Marlborough St.') 168 elif bssid == '00:40:96:5a:5e:0f': 169 location.add('BMI baggage claim') 148 170 elif bssid == '44:44:44:44:44:44': 149 171 location.add('No AirPort network') … … 168 190 elif ssid == 'CSL Wireless': 169 191 location.add('CSL') 192 elif ssid == 'Wackyland': 193 location.add('340 Marlborough St.') 194 elif ssid == 'CIRA': 195 location.add('BMI') 170 196 else: 171 197 growlNotify(NOTIFICATION_UNKNOWN, 'Unknown SSID', ssid, -
trunk/LocationDo/SCNetworkReachabilitymodule.c
r196 r205 18 18 (flags & kSCNetworkFlagsConnectionAutomatic))); 19 19 } 20 21 /* XXX should have a way to cancel (e.g. on location detach) */ 20 22 21 23 static void -
trunk/LocationDo/action.py
r198 r205 60 60 61 61 def terminalDo(command): 62 # XXX if this launches Terminal, it inherits our PYTHONPATH 62 63 terminalApp = app(id='com.apple.Terminal') 64 # XXX this does not create a new Terminal window; fix 63 65 terminalApp.do_script(command + '; exit') 64 66
Note:
See TracChangeset
for help on using the changeset viewer.