|


| NAVIGATION |
|
Home |
|
Store |
|
|
| INSIDE MAC |
|
Television Shows |
|
Broadcast Shows |
|
Daily News Shows |
|
Special Shows |
|
|
| EVENTS |
|
|
|
|
|
|
|
|
| DAILY TIPS |
|
Design |
|
Mac OS X |
|
Mac OS X UNIX |
|
|
| COMMUNITY |
|
Surveys |
|
|
| NEWS |
|
Current |
|
Press |
|
Archive |
|
|
| FEATURES |
|
Editorial |
|
Dr. Mac |
|
Reviews |
|
Reader Reports |
|
|
| RESOURCES |
|
FAQ |
|
Documentation |
|
Learning Center |
|
MAN pages |
|
Glossary |
|
Tutorials |
|
Tips |
|
Links |
|
|
|

|
|
|
OSXFAQ Mac OS X UNIX Tip-of-the-Day

Week 99 - Terminal Tricks (21 February 2005)
by
Adrian Mayo - Editor, OSXFAQ
Wednesday - Focus and Dock with Escape Sequences
Move a window to the background or the foreground from the command line, or within a script, using the following escape sequences. (See Monday's tip too.)
echo -n "^[[6t;"; sleep 5; echo -n "^[[5t;"
The above command hides the terminal window, waits 5 seconds, then brings it back into focus. The 'sleep 5' part could be a script that takes a while to run. When the script completes the terminal window will re-appear to let you know.
(Note: the sequence displayed as ^[ represents the escape character, obtained by typing control-v then the 'esc' key.)
Move a window into the Dock.
$ echo -n "^[[2t;"; sleep 5; echo -n "^[[5t;"
The above command docks the window, then after 5 seconds brings it back into focus.
These sequences can be places in bash/tcsh aliases - see Tuesday's tip.
If you want to learn more about Mac OS X Unix visit the Learning Center
click.
- For beginners: Mac OS X Unix Tutorials
- For detailed information on specific topics: Advanced Unix
- For OS X in gereral: Mac OS X Tutorials
|


|
Copyright © 2000-2010 Inside Mac Media, Inc. All rights reserved. |
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users. |
| Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc. |
|