Linux: Mouse Hover to Raise Window

By Xah Lee. Date: . Last updated: .

A great feature is window auto-raise. Just move mouse cursor to a window, and after a delay, that window will come to front. This save you a lot clicks. But takes some time to get used to.

For Linux, you can set it in the Window Manager Preference. Exact steps depends on which desktop (gnome, kde, ubuntu unity, xfce, lxde, etc) you are using. [see Linux: How to Switch to LXDE, Xfce]

linux openbox window manager raise window on focus
Linux LXDE OpenBox window manager obconf, raise window on focus.
linux xfce window manager raise window on focus
Linux Xfce Window Manager preference settings for auto-raise.

On Linux, be sure to make the delay time at least 0.5 second. Because, otherwise you'll often switch windows by mistake.

The Xfce preference setting doesn't indicate exact timing. But you can adjust it by editing the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml

<property name="focus_delay" type="int" value="500"/>
<property name="raise_delay" type="int" value="5"/>

Push Mouse to Window Edge to Switch Windows

You can set your apps so that each touches a edge on the screen. This way, you just nudge your mouse to switch. This is much faster and convenient than Alt+Tab.

xah Linux desktop 2013-06-02
Linux Xfce desktop

The most frequently used app for me are: Emacs, Firefox, Chrome, terminal. Each's window has a visible area on screen, usually on one edge of the screen. So i just hover to it to activate.

Also, you should set up a key to switch window within the same app. For example, in terminal, you might have several terminal windows. Once you push mouse to activate a terminal, you can press the key to switch to other terminal windows.

Don't Move Mouse Needlessly

One problem is that if you moved your mouse carelessly, some background window pops to the front. You can quickly go back to your previous window by Alt+Tab. However, it is especially annoying when the window you are working on is a small dialog that just popped up while you are moving the mouse. You can't switch back to the dialog because it's not a window or app.

So, you'll get into the habit of not moving the mouse needlessly. Leave hand off the mouse when not actually moving pointer.

Auto-raise is especially good if you are a trackball or trackpad user. Because trackball are less likely to move the pointer unnecessarily.

[see Best Trackballs, Xah Pick]

Single Key to Switch App

Sometimes you have too many apps/windows open but you only have 4 screen edge. So, i recommend setting up a F key to Switch to {Firefox, Emacs, Terminal}.

How to Set Key to Switch to Browser

If you use a full sized keyboard with numberpad, the numberpad keys is best used to switch apps, tabs, window. For detail and how-to, see How to Program Number Keypad as Function Keys .

Customize Mouse