I am using XFCE as my Desktop Environment, and that includes XFWM - XFCE’s own window manager. I could have used another one, but I find XFWM to be quite good.
I did look briefly at what other WMs are out there, and what I pretty much ended with was that a Compositing window manager would be best (XFWM is one), and not just for fun visual effects. Actually, if that’s what you’re looking for Compiz might be what you want to give a try. But I’m not really looking for all those visual effects, and XFWM offered what I needed, so I didn’t see the need to look for anything else.
Having been using it for a little while now, I did however figure out a few nice tips & tricks that I thought I might share. Some might be quite known, and/or even common with other WMs, but either way they’re pretty nice and might come in handy every once in a while.
Moving a window without decorations (or whose decorations aren’t available)
This is how I started looking for such tricks: in one application, a window would open and be misplaced, probably because of my dual monitor setup and a bug in the window placement of said application. It was a problem because I could only see the lower half or so of the window.
Moving a window isn’t usually a problem, but in this case I obviously couldn’t use the title bar, since it was not visible, the whole upper-half of the window being “outside” of my monitor. And because this wasn’t a top-level window, it didn’t appear in the XFCE-Panel, so I couldn’t use that to trigger a move operation either.
I know that Openbox also supports right-click on window’s border, to popup its menu, but XFWM only does it from the title bar. But fear not, as it does, however, offer quite a few ways to get things done, even without any decorations.
For starter, you can middle-click-and-drag from the window’s border to move it. Just like you would usually click-and-drag from the border to resize a window, but using the middle button instead of the left one. And of course, the right button also does something of its own: you can right-click-and-drag to resize a window without activating it.
But it doesn’t stop there, as you can also move a window by simply holding Alt and click-and-drag from anywhere the window. This is especially usefull for windows without decorations (and thus, not even borders). Hold Alt, and you shoud be able to click-and-drag from anywhere in the window to move it around. You can also Hold Alt and double-click anywhere in the window to (un)maximize it.
This can be quite nice, for instance if you have a decoration-less terminal window, you can (un)maximize it & move it around very easily.
But it gets better!
As you might have guessed now, using other buttons will get you different results: hold Alt and rght-click-and-drag will resize the window but wuth a trick: the result will depend on where you clicked in the window. That is, if you clicked in the upper side of the window, you’ll resize it as if you left-clicked on the top border. If you clicked on the right side of the window, it’ll be as if you used the right border, and so on.
Again, this allows you to resize at will any window, even when it doesn’t have any border/decorations. And yes, holding Alt and using the middle-click will do something else: it sends the window behind all other windows.
Different kinds of maximize
Another nice little thing, that does requires decorations this time. About every WM out there offers a Maximize button as part of the window decorations. But XFWM allows you to have some other kind of maximize. That is, you can middle-click the maximize button to only maximize the height of the window, while leaving the width unchanged. Which might come in handy when you have e.g. a terminal with a file or a man page opened. Similarly, you can also right-click the maximize button to only maximize the width of the window, leaving its height unchanged.
I’m not exactly sure whether all this is (well-)known or not, since when I looked on XFCE’s website I couldn’t really find much about such XFWM features/tricks, so hopefully this might be useful to some of you. And if you happen to know other tricks I missed/am not aware of yet, please let me know.
Couple other things, that for some reason I feel are more known, but might not be:
- Wheel up/down over the titlebar to roll the window up/down
- Hold Alt and use the wheel over the title bar to change the window’s opacity
Hover effect for inactive windows, too
The only little thing that XFWM does not do, and that I really would have liked, was a visual effect: When hovering titlebar’s buttons, there is usually a little effect. It’s just a visual thing, but it also “confirms” which button you’re about to click, and - maybe as a Windows user - I’m used to it, and to rely on it to check responsiveness and whatnot.
Anyways, while XFWM does support such a thing (depends on your theme, actually), it does so only for the active window. Inactive windows, or their decorations/button, will not react to mouse hovering. So I looked into it, and while this isn’t supported by XFWM, it’s quite easy to change it.
So I did, and as usual the modified source code is available on this BitBucket repository.
For Arch Linux users, you can also find a PKGBUILD in the AUR, which uses the official source code and a patch to get there, simply because I figured it would allow people to check the changes more easily.
- pd12 likes this
- insaneisnotfree reblogged this from mywaytoarch
- insaneisnotfree likes this
- mywaytoarch posted this