Day-to-day thoughts, technical information, a random grab-bag of thoughts, discoveries, and interesting little tidbits.

Saturday, June 12, 2010

Giving Microsoft Windows the Linux Desktop

I am a Linux user.  I am such mainly because I'm most comfortable with the way Linux does things, and there's absolutely no limit to the customizations I make.  As a result, I've become comfortable with the interface I've grown accustomed to.

In my case, window focus follows the mouse, clicking on a window does not cause it to pop to the top, covering other windows, and moving or resizing said window is simply a matter of holding Alt and dragging (left or right, respectively) in it.  Additionally, I use a trackball, and in Linux, I configured it that holding one of the trackball buttons turned the trackball into a scrollball, and releasing the button would immediately return the trackball to the normal mousing mode.  And finally, I use an extremely spartan desktop; I run Compiz standalone (meaning that I don't have a desktop environment), with xbindkeys and MyGtkMenu working as hotkey controller and desktop menu, respectively, GKrellm as the system clock and status tracker, and stalonetray as a tray tool.

This kind of interface does not exist in Microsoft Windows, as the click-to-focus-and-raise model is pretty much standard.  And while there's a vague imitation of focus-follows-mouse in the accessibility options, clicking in a window still activates and raises said window.

Given that my current job, which is a work-from-home kind of dealie, requires me to use Windows, I felt the need to modify it to more closely behave like my Linux desktop.  Given the lack of customization options available for Windows, this seemed like a pretty daunting task.
I eventually discovered tools, however, to make the Windows desktop function almost perfectly like my Linux desktop.

First, I want to get rid of all the extra baggage that comes with a Windows desktop, so I want to get rid of the taskbar at the bottom.  All of it.  Nothing visible but desktop, perhaps with  the exception of the system tray.  So, I download and install the Emerge Desktop, which is a minimalist and modular shell replacement for Windows.  It has a system tray program and a task tray program which do the work I want; I can now have nothing but process icons lining the bottom of the desktop, at 16x16 resolution, with tasks on the left, and the tray on the right.  Nothing else.  This may be too minimalist for some, so there are other shell replacements for Windows as well; a popular one is bblean, a replication of the Fluxbox environment for Windows.

Second, I use gkrellm on Linux, and by gum, there's a Windows port of it.  This is a good thing, and something I take full advantage of.  Now, I have a system clock.  I've yet to muck about with the other krells, but time will bring opportunities for experimentation.

Next, sloppy-focus.  Windows is notorious for its click-to-raise tendencies; and I always preferred the stacking order to remain until I consciously decided to raise a window, regardless of whether I'm typing in a window, or clicking on window elements, such as buttons, menus, or a scroll bar.  Windows does have a focus-follows-mouse feature, but clicking in a window still follows the original click-to-raise model.  Enter True X-Mouse.  This tool causes Windows to perform the focus-follows-mouse action correctly.  It also introduces Linux-style copy/paste to Windows (highlight to copy, middle-click to paste), but this interrupts the middle-click features in Firefox, and even in Linux, I tend to use the Ctrl-C/Ctrl-V model, so in HKEY_CURRENT_USER\Software\<>\TXMouse, I create the strings "ExemptedClasses" and "ExemptedModules", setting them both to "*".  At this point, I have focus-follows-mouse, and no middle-click paste, which works for me.  (If you don't see the above key, you can make it).

Next, I want the ability to move or resize windows using the left and right buttons in combination with the ALT key; this means I can move or resize a window, even if the appropriate titlebar or border is not onscreen.  So, we make use of another utility that allows this: Win-X-Move.

At this point, mouse-based users are done; the desktop heavily resembles and behaves like a Linux desktop.  However, I still am using a Logitech Marble trackball with 4 buttons; two big, two small.  My Linux configuration makes the left small button a "scrollball emulator"; holding the button causes the trackball to simulate a scroll wheel that can scroll both horizontally and vertically.  The small right button is meant to be a middle button.  However, the SetPoint software does not quite meet the needs; universal scroll is a press-to-engage, press-to-disengage process, and the right-hand small button cannot be programmed to be a middle button.  So, I replace SetPoint with X-Mouse Button Control, which is a much more flexible mouse button remapping tool, and Marble Mouse Scroll Wheel, which sets the scroll functionality to perfectly match the linux variety.

Now, onto the virtual desktops.  True, Emerald Desktop has its own virtual desktop manager, but it's relatively anemic, and doesn't work with Vista/7 without administrator rights.  So, instead, I installed VirtuaWin,  a tray app that will handle multiple desktops without much difficulty, and has an incredible flexibility with the use of hotkeys. 

Finally, we come to the shortcuts.  I tend to use F1-F2 in combination with Win, Win-Ctrl, Win-Shift, and Win-Alt to launch programs.  There's enough of a space (48 combinations) there to handle the bulk of the applications I use on a regular basis, and then some.  I also use Win, Win-Shift, Ctrl, and Ctrl-Shift with the number pad to quickly access the various websites I use on a regular basis (36 combinations).

For the above combinations, I found that AutoHotKey not only fits the bill, but also provides the ability to use "hotstrings," which replaces something you type in with something else, either for the purpose of a correction of a misspelled word, or also for the expansion of acronyms/keywords.  This tool also allows me to make executables that will launch whole groups of applications simultaneously.

Well, that's my Windows desktop.  I still don't have Alt-Click to raise/lower, snap to edge, desktop cube, or wobbly windows, but this is a lot closer than I started with.  If anyone knows a way to accomplish these from Windows, I'd certainly appreciate the suggestion.