Linux Tips: Window focus - gHacks Tech News

Linux Tips: Window focus

I like to think of myself as a Linux desktop power user. To that end I want my desktop to be very efficient and work with me on every level. I want as few clicks of the mouse as possible. Fortunately there are certain (nearly) universal aspects of the Linux that make this not only possible, but simple.

There are three particular aspects of the desktop I take advantage of in order to make it as efficient as possible, each a sub set of Focus: window focus, auto raise, and window tab cycling. In this article I will highlight each of these so you can see how efficient your desktop can be.

These tips should work with most every window manager or desktop you can find in Linux. I won't go into the actual configuration of each because that configuration will be different for each window manager or desktop.

Focus?

First let me make sure you understand the idea behind window focus. It's very simple: A focused window is the window you are working in. In most operating system desktops you have to click on that window in order to give it focus. In Linux there are other ways to give a window focus. Let's take a look at them.

Focus Follows Mouse (sometimes called Sloppy Focus) instructs the desktop that the window under the mouse pointer has focus. With this set you do not have to click on a particular window in order to start working in that window. Of course this can lead to a problem when you have a smaller window over a larger window and you want to give the larger window focus. With just Focus Follows Mouse set alone your lower window will have focus but it will be difficult to work with because it will have another window hiding what you're working on. To resolve this you set the Autoraise feature.

With Autoraise set the window that has focus automatically raises to the top. This is a great feature, but, it can get in the way. If your mouse moves outside of the currently focused window, into another window, that window will automatically raise up. To solve this problem you can set a delay to the auto raise. This is a good practice because it will save you the headache of your windows constantly losing focus as the mouse escapes from the borders of your current working window. Autoraise delay is set in miliseconds so remember that when you're setting a delay. Play around until you get the perfect setting for your needs.

Window cycling

Figure 1
Figure 1

While working on your Linux desktop hit the Alt-Tab combination and you will see something similar to that in Figure 1. In this example you see cycling through windows in the Window Maker window manager. To get to the to the next window you hold down the Alt key and tap the Tab key. When you land on the window you want to work in you release the keys and the window will have focus.

This, of course, can be used in conjunction with the workspace switching key combination of Ctrl-Alt-left/right arrow. When you press that combination you will warp to the next workspace to either the right or left of where you are (depending upon which arrow key you use.)

Final thoughts

It is possible to make your Linux desktop as efficient as you want it. By employing these easy to use tips you will find yourself spending more time working and less time clicking and dragging windows.


Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. Rico said on May 21, 2009 at 10:38 pm
    Reply

    Coincidentally, i’ve been looking for apps to emulate the way windows are handled across the various desktop environments and windows managers. There’s a number of apps that offer always on top and rolling up windows, a few that offer sloppy focus, but i’ve yet to find one that offers auto-raise. i’d pay for an app that handles all of them and had keyboard shortcuts. Dexpot is very close and free, although it doesn’t offer auto-raise.

    Window management, even without Compiz-Fusion, its one of the things i sorely miss from Linux.

  2. jack said on May 22, 2009 at 2:35 am
    Reply

    Rico,

    if you’re wondering about rolling up windows in Windows there is the little app called “Winroll”

    http://www.palma.com.au/winroll/

  3. Rico said on May 22, 2009 at 5:05 am
    Reply

    i’m currently using Dexpot, which allows window rolling, with the added bonus of having a VWM. But thanks for the suggestion. i’ve actually used Winroll in the past and was amazed how tiny it was.

  4. JimTux said on May 22, 2009 at 9:01 am
    Reply

    I personally use the mouse scroll button to scroll between my active windows and active desktops. This way I can hold the ctrl key down and scroll for apps our goto the edge of my window and scroll to switch desktops. Pretty easy. With a new mouse I am getting I will be able to do this with one of the extra buttons on the mouse, no more keyboard!

  5. Patkos Csaba said on May 22, 2009 at 2:01 pm
    Reply

    It seems like I can’t find an option in KDE4. In older KDE versions there was an option “Mouse Follows Focus”, so that the mouse cursors was automatically moved inside any newly focused window. I need this in KDE4, any idea where is this setting if it exists at all?

  6. Dave said on July 8, 2009 at 12:13 pm
    Reply

    I’m setting up a kiosk in gnome (full screen web broswer) and created links to skype… the thing is when skype links are clicked they stay behind the browser and in with the browser in full screen mode skype can’t be clicked on on to gain the focus.
    I don’t really want to give everyone that uses it a crash course on pushing Alt Tab after you click to get to the correct window.

    Is there another way of getting focus to Skype automatically?

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.