Keep Terminal window on top (in foreground)

All these years of using Terminal, and I haven't figured this out. Is there a way to keep the Terminal window(s) on top of all other windows?

Or, is there a third-party term app which will do this for me?

Many thanks!

Matt

2.5GHz|3.5GB G5, 1.5GHz|512MB PB12, iSight, 4G iPod, Mac OS X (10.4.7)

Posted on Mar 13, 2007 7:39 AM

Reply
5 replies

Mar 13, 2007 11:04 AM in response to Matt Clifton

I can't quite see why you'd want this, unless you only ever worked in terminal, but mine is not to reason why 🙂

You have three options that I can think of, depending on what your goals are.

First, if you want to keep the terminal active, then a background AppleScript that periodically activates Terminal.app would do that. However, this could get annoying if you ever want to run another app (say, the Finder?) and you keep getting dropped back into Terminal.

Secondly, and what I'm guessing is closer to what you want, is Focus-follows-mouse - a mode where simply pointing the mouse at a terminal window gives that window focus (e.g. all typing is directed there) without bringing that window frontmost.
There are a couple of levels this works at. If you're just focussed (no pun intended) on Terminal.app then you can run:

<pre class=command>defaults write com.apple.Terminal FocusFollowsMouse 1</pre>

when Terminal isn't active, and next time you'll have mouse focussing.

The third option which might get you what you want is Visor - a widget that brings up a shell window overlaying your current display when you press a hotkey. This is the only method I'm aware of to have a shell truly on top of any other window, but it's most useful for intermittent use (e.g. you just need to run a quick command or two), not for continuous use, but it might fit your needs.

Mar 14, 2007 8:50 AM in response to Camelot

Thanks Camelot - that does help some.

Here's what I'm trying to do. And I'll preface by saying that it's a 12" Powerbook without an external display. Let's say I have an O'Reilly tutorial page in Safari that I have pretty much full-screen. My Terminal window is covering the top right part of this page, and is transparent enough that I can see the web page through it. I would like to be able to scroll through the webpage, but keep the Terminal window in view, and easily mouse over to it and keep working there.


In other words, when Terminal is in focus, I can still see Safari, but when Safari is in focus, I can't see Terminal. (I know, I could make the Safari window smaller, but not all web pages will be readable that way)

Focus-follows-mouse only works for multiple Terminal windows; and you do have to mouse over the title bar of the appropriate window for it to have effect. I did find another utility, Mondo Mouse, which works for any applications, and isn't limited to mousing over the title bar (you can mouse over any part of any window to bring it into focus), but again, you do have to mouse over a visible part of the Terminal window. Meaning that I'd have to mouse all the way off the edge of the Safari screen to see my Terminal again. So it's almost the solution I need, but not quite.

I suspect that I'm just working in an inefficient way (that Aqua doesn't really support) and trying to find utilites which will work that way - it's possible that going to X11 for these Unix sessions would give me what I'm after, I guess.
I know that certain utilities have a "Stay on top" feature, but I can't work out if that's something built into the binary that I won't have access to, or if it's a windowing preference that I can somehow hack, with a "defaults write" command or some such.


Matt

Mar 17, 2007 8:31 AM in response to Matt Clifton

Matt,

I know this doesn't answer your specific question, but if you're just switching back and forth between two applications (ie Terminal & Safari in your case) then <command>-Tab works really well for this.

Since the frontmost application is always the first icon in the <command>Tab list and the "previous" application is always the second icon in the list... and <command>-Tab always defaults to selecting the second icon... a quick press and release of <command>-Tab will toggle you between the first and second app.

I use this all the time to switch back and forth between Xcode and Interface Builder when working on apps.

Steve

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Keep Terminal window on top (in foreground)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.