Wiki Table of Contents

Changing border size with Xfce4 Window Manager

ntroduction

In Xfce, the overall look of windows and applications is controlled not just by the GTK theme applied, but also by the Window Manager (WM) theme which “is responsible for the placement of windows on the screen, provides the window decorations and allows you for instance to move, resize or close them“ (Link 1)

Even though most GTK themes will include a subfolder with the accompanying WM theme, you can choose to mix and match your GTK theme with the window decorations and borders from any other WM theme. 

  • Apply the GTK theme from Settings > Appearance > Style tab
  • Click on Settings > Window Manager and select from the WM themes listed (Figure 1).  Figure 1:

If your GTK theme had an accompanying WM theme, it will be listed there as well, but you are not limited to choosing that related WM theme.

Border adjustment

One reason a user might prefer another WM theme to the “matching” one is that some WM themes’ borders have a very thin “grabbable” area, limited in some cases to just that one-pixel edge around the window, making them hard to resize with just the mouse alone.

There are general solutions for handling such difficult window edges:

  • Alt + right-click + drag. Simply hold the Alt key, right-click somewhere inside the window and drag to resize. It works well and complements the Alt-key method of moving windows: holding Alt and left-click drag on anywhere in the window.
  • Keyboard shortcut. Xfwm4, Xfce’s window manager, supports a number of keyboard shortcuts (which can be edited by going to the Settings Manager > Window Manager > Keyboard). One of them is for resizing windows with your keyboard. 
    The keyboard shortcut set by default in Xfce upstream is Alt+F8. Once you hit this key combination, you can then resize the window by either moving your mouse (no need to click or drag) or using your keyboard arrow keys.

These solutions do require the use of two hands. If you wish to be able to easily resize a window with just the mouse, you will need either to find an appropriate WM theme with sufficiently “grabbable” edges, or edit the WM theme yourself.

Window manager themes with easy to grab edges

<DRAFT>

MX Linux provides repackaged Arc and Greybird themes (the defaults) in which their complementary WM themes have been adjusted to have increased “grabbable” areas around their edges.

Other than those, Daloa WM theme, which comes preinstalled in MX releases 15 to 18, has easy-to-grab borders. The window bar also takes on the colour of the GTK theme’s cursor highlight. However, the window bar decoration might be considered a little dated by some.

We would also suggest forum member rich’s more modern flat-numix-style “borders” WM theme, which adapts its looks and colours to whichever GTK theme you use, yet provides great “grabbability”.

Currently it has not been packaged and added to the MX repos, but it can be downloaded for the moment from:
https://app.box.com/s/7gk3pwdn5onj5q5b9eowa2315qy8pcy3 

To use it, download the archive file from the given link, extract the contents to: $HOME/.themes, then apply it from Window Manager.

In figure 2 below, it can be seen that when “borders” is applied as the WM theme, this WM theme causes the window decorations and borders to take on the colour scheme of the currently-applied GTK theme. It is to be noted that the said GTK theme’s own WM theme (see figure 1 above) has very minimal “grabbable” area around the borders.

Figure 2: 

Technical aspects

Forum member Paul.. posted a comment about how to change existing WM themes to make them thicker

Turns out the only way create bigger borders is to patch each set of theme files individually which is kind of…well…ugly. For example, the relevant Greybird-MX17 Window Manager theme files are located in /usr/share/themes/Greybird-17/xfwm4/.  To change the border thickness, you need to edit certain .xpm files which are a kind of ASCII art file. Adjusting these files is trial-and-error…”

However, the Arc theme may not be as easy to edit as Greybird: it requires the generation of svg files at package build. During the build, it installs into the xfwm4 subfolder a whole set of png files that were rendered from the svg file. Other xfwm themes use bitmap png or xpm format files from the start. 

If you wish to experiment with adjusting Arc WM thickness on your own MX-18 system, you might wish to make a copy of its xfwm4 subfolder, found in /usr/share/themes/Arc-Dark, and paste it into your $HOME/.themes/ folder (you may have to create it first). Make the copied xfwm4 folder a subfolder of a new folder with a different name such as Arc-Dark-Thickborders. You may then try the instructions given in Link 4.

Links

(1) Xfwm4 Introduction 

(2) Xfwm4 Preferences

(3) Xubuntu discussion on resizing

(4) Blog post on increasing size

v. 20190124

Leave a Comment

Do NOT follow this link or you will be banned from the site!