[592] | 1 | appswitch 1.1.1d1 [unreleased]
|
---|
| 2 | ===============
|
---|
[91] | 3 |
|
---|
| 4 | A command-line interface to the Mac OS X process manager.
|
---|
| 5 |
|
---|
| 6 | Written by Nicholas Riley <mailto:appswitch@sabi.net>.
|
---|
| 7 | Obtain updates from <http://web.sabi.net/nriley/software/>.
|
---|
| 8 |
|
---|
| 9 | WHAT IS IT?
|
---|
| 10 | -----------
|
---|
| 11 |
|
---|
| 12 | If you use shell scripts to automate Mac OS X applications, you may
|
---|
| 13 | need to switch between applications. You could use AppleScript via
|
---|
[350] | 14 | osascript(1), but that can take several seconds for the script to
|
---|
[91] | 15 | compile and execute - or you could use appswitch, which works almost
|
---|
| 16 | instantly.
|
---|
| 17 |
|
---|
| 18 | Say you're launching an X11 application from Terminal but the X server
|
---|
| 19 | isn't in front when you need it. Use appswitch to fix the problem.
|
---|
| 20 |
|
---|
| 21 | Or, if you'd like a version of the ps(1) utility which understands the
|
---|
| 22 | concept of OS X applications, appswitch can help.
|
---|
| 23 |
|
---|
| 24 | INSTALLATION
|
---|
| 25 | ------------
|
---|
| 26 |
|
---|
| 27 | The commands below install the 'appswitch' tool in /usr/local/bin,
|
---|
| 28 | which is in the default path. You should subsequently be able to use
|
---|
| 29 | 'appswitch' by typing its name. If you wish to install it somewhere
|
---|
| 30 | else, modify the install line as appropriate.
|
---|
| 31 |
|
---|
| 32 | % sudo /usr/bin/install -d /usr/local/bin /usr/local/man/man1
|
---|
[352] | 33 | % sudo /usr/bin/install appswitch /usr/local/bin
|
---|
| 34 | % sudo /usr/bin/install appswitch.1 /usr/local/man/man1
|
---|
[306] | 35 | % rehash # if necessary
|
---|
[91] | 36 |
|
---|
| 37 | Uninstallation:
|
---|
| 38 |
|
---|
[156] | 39 | % sudo rm -f /usr/local/bin/appswitch /usr/local/man/man1/appswitch.1
|
---|
[91] | 40 |
|
---|
| 41 | COMPILATION
|
---|
| 42 | -----------
|
---|
| 43 |
|
---|
[306] | 44 | An Xcode project, 'appswitch.xcodeproj', is included. A precompiled
|
---|
[345] | 45 | Universal binary is also provided. 'appswitch' should build under
|
---|
| 46 | Xcode 2.4 or later.
|
---|
[91] | 47 |
|
---|
| 48 | USAGE
|
---|
| 49 | -----
|
---|
| 50 |
|
---|
| 51 | Just type 'appswitch' by itself to receive usage information. See the
|
---|
| 52 | manual page (man appswitch) for more information.
|
---|
| 53 |
|
---|
| 54 | If you're curious about the speed difference between appswitch and
|
---|
| 55 | other methods, this should give you some indication.
|
---|
| 56 |
|
---|
[306] | 57 | appswitch -a Emacs 0.01s user 0.01s system 28% cpu 0.069 total
|
---|
| 58 | launch -a Emacs 0.01s user 0.01s system 35% cpu 0.076 total
|
---|
| 59 | open -a Emacs 0.04s user 0.02s system 52% cpu 0.115 total
|
---|
[91] | 60 | osascript -e 'tell application "Emacs" to activate'
|
---|
[306] | 61 | 0.13s user 0.06s system 59% cpu 0.326 total
|
---|
[91] | 62 |
|
---|
[306] | 63 | The above tests were performed on a Mac mini Core Duo 1.66 GHz; slower
|
---|
| 64 | systems show more dramatic differences.
|
---|
[91] | 65 |
|
---|
| 66 | COMMENTS, SUGGESTIONS, BUG REPORTS, ETC.
|
---|
| 67 | ----------------------------------------
|
---|
| 68 |
|
---|
| 69 | Please send to the author, Nicholas Riley, at <appswitch@sabi.net>.
|
---|
| 70 |
|
---|
| 71 | VERSION HISTORY
|
---|
| 72 | ---------------
|
---|
| 73 |
|
---|
[592] | 74 | 1.1.1 - unreleased
|
---|
| 75 | - use Cocoa instead of CPS to show all/hide other applications
|
---|
| 76 | (r. 4808397)
|
---|
[350] | 77 | 1.1 - 6 November 2007
|
---|
[345] | 78 | - switched to Process Manager instead of CPS where possible - slower
|
---|
[350] | 79 | but more compatible (r. 4808397, 4808400)
|
---|
[306] | 80 | - fixed description of -k option: SIGTERM, not SIGINT
|
---|
| 81 | - added -f option
|
---|
[345] | 82 | - fixed incorrect output/behavior with Mac OS X 10.5
|
---|
| 83 | - Universal Binary, compatible with Intel Macs; built for OS X 10.4
|
---|
| 84 | or later
|
---|
[160] | 85 | 1.0.1 - 16 May 2004
|
---|
| 86 | - fixed crash matching applications with no bundle identifier
|
---|
| 87 | - fixed process listing PSN column width
|
---|
[99] | 88 | 1.0 - 19 February 2003
|
---|
| 89 | - added description of -q delay bug (no workaround)
|
---|
| 90 | 1.0b3 - 13 February 2003
|
---|
| 91 | - display spaces instead of ? characters when unprintable
|
---|
| 92 | - properly handle very narrow window width with -l
|
---|
| 93 | - further revised and clarified man page
|
---|
| 94 | - added -q, -K, -L options
|
---|
[97] | 95 | 1.0b2 - 11 February 2003
|
---|
| 96 | - display ? characters for unprintable creator code characters
|
---|
| 97 | (e.g. java)
|
---|
| 98 | - fixed -P/-p error in man page
|
---|
| 99 | - revised and clarified man page
|
---|
[91] | 100 | 1.0b1 - 10 February 2003
|
---|
| 101 | - added -S, -S, -h, -H, -k, -P, -l, -F options
|
---|
| 102 | - fixed reference to bogus -u option
|
---|
| 103 | - fixed bug where unknown match type was silently discarded
|
---|
| 104 | - added man page and this README
|
---|
| 105 | 1.0d1 - 4 February 2003
|
---|
| 106 | - initial release
|
---|