Wider Borders in XFCE / Xubuntu

A longstanding Xubuntu / XFCE UI problem has been single-pixel window borders that make click-and-drag resizing essentially impossible. The reason it’s a longstanding problem has been the developers’ unflinching response to any and all issues raised on the bug tracker:

That discussion may be illuminating.

I had never looked for the XFCE theme-building documentation (and, thus, never found any), because building a whole new theme would be a lot of work just to resize the damn borders. It should be feasible to tweak only the borders of an existing theme, but … I stalled.

Repeatedly. On every single version of Xubuntu that’s come along.

Fortunately, someone recently did the legwork and summarized the method, which I slightly adapted:

cd /usr/share/themes/
sudo cp -a Greybird-compact/ Greybird-wide
cd Greybird-wide/xfwm4
for f in bottom left right ; do sudo cp ../../Daloa/xfwm4/${f}* . ; done
sudo sed -i -e 's/C0C0C0/CECECE/' *xpm
sudo sed -i -e 's/A0A0FF/7C7C7C/' *xpm
sudo sed -i -e 's/E0E0FF/E0E0E0/' *xpm

The exact color mapping depends on which two themes you’re using. You can also specify GTK element colors, which seems like a better way to do it. Maybe next time.

Apparently, the corresponding PNG files contain transparency information for the XPM files, but I haven’t bothered to investigate how that works or what might happen if I tweaked them.

Then you select the new Graybird-wide theme and It Just Works.

Sheesh & similar remarks…


  1. #1 by Frans on 2015-02-01 - 10:42

    You only need to create your own theme if you aren’t happy with one of the presupplied wider-border themes. Personally I love small borders, although I’m using a theme with something like 2px or 3px borders atm. It’s called Redmond and it evokes Windows 98. ;)

    But also take a look at <a href=”http://xubuntu.org/news/window-resizing-in-xubuntu-and-xfce/>this. Just like Alt + click is one of the more efficient methods of dragging windows, Alt + right click, is one of the more efficient methods of resizing. Also interesting contenders are Alt + F7 (move) and Alt + F8 (resize).

    • #2 by Ed on 2015-02-01 - 11:51

      if you aren’t happy with one of the presupplied wider-border themes

      That would be us. [grin]

      One of the links in the post went to that page, from which I concluded:

      Alt+RightDrag resizes from the top down, which isn’t how I’ve ever wanted to resize a window in my entire life.

      Requiring four fingers and two hands (Alt + Fx + drag) just to resize a window is a flat-out batshit crazy UI decision. Plus, as nearly as I can tell, the window handler discards those combinations without a trace.

      • #3 by Frans on 2015-02-01 - 16:15

        I kept trying to figure out how that was happening for you until I realized that ahem you’re doing it wrong. :P

        I was intuitively using it as a giant handlebar, so I instinctively went to the bottom right — just with less accuracy. But it actually works more cleverly than that. It resizes very similar to the way in which you can resize layers in Gimp. If you don’t know what I mean, try it with the 8 different activation zones (top left/middle/right, middle left/right and bottom left/middle/right). I don’t know if this is Xfwm-only, but I actually think it’s quite brilliant. It’s just a pity that it’s so completely undiscoverable.

        Regarding Alt+Fn, that’s really meant for keyboard use. Whether you opt to use the arrow keys or the mouse is your own decision. I don’t think it’s any worse than Windows’ Alt+space optionally followed by e.g. s in any case.

        Plus, as nearly as I can tell, the window handler discards those combinations without a trace.

        How do you mean?

        • #4 by Ed on 2015-02-01 - 17:26

          until I realized that ahem you’re doing it wrong. :P

          As is often the case. Given that hint, yes, it can be done, but it’s still awkward: one finger for alt, the other hand for right-click and rolling the trackball.

          GUIs are supposed to work visually: I need to manipulate an object, so I point to the thing, I click, and stuff happens. If I wanted to type commands, I’d be using a green-screen terminal, not a GUI.

          I’d rather just click-and-drag the appropriate border, no matter whether I’m using a mouse, a trackball, a scratch pad, a tablet or a titmouse. What’s wrong with making the border wide enough (or sensitive enough) to behave the way it should?

          How do you mean?

          Press Alt+F7, release, arrow keys do nothing: up & down arrows scroll text as usual. Press and hold Alt+F7+arrow keys, ditto. Same combinations plus mouse dragging do nothing. Alt+drag does what you’d expect.

          Perhaps this stuff is just too subtle for me, but the results look a lot like nothing. In any event, whatever’s going on doesn’t involve moving the window or its borders…

  2. #5 by jvl60 on 2015-03-26 - 16:37

    What I don’t understand is why the developers are unable to make it so that the resizing area is not the border but something like a 5px area around the border. No window controls ought to be that close to the border so it wouldn’t cause any problems, and for the scenario where there could be more than one window that would fit the criteria, the selected one would have the priority, so again, no problem. That would make Xfce much more usable for me, as now when I use Xfce I also have to use Compiz which implements this, but Compiz really hates my computer and randomly makes window decorations disappear, so that’s not really great.

    • #6 by Ed on 2015-03-26 - 20:33

      The whole thing strikes me as an ideological issue, which means rational discussion will be unproductive.

      Making the borders just slightly wider worked well enough, as I cannot get used to the Alt-right-drag technique: a two-hand / four finger operation with the left-hand trackball.

      XFCE seems to be the least-awful DE environment available right now; I need something that isn’t tiling and Just Works. One desktop / workspace / whatever has two windows half-screen on the left and one full-screen on the right, with the other desktop having OpenSCAD / Kicad / whatever full-screen on the left and and an editor full-screen on the right. Mostly, the DE is just for starting up in the morning and shutting down in the evening; all the eye candy everybody else seems to demand Just. Doesn’t. Matter.