3

I'm trying to figure out how can I get rid of these gaps between windows. Please, see the screens below. At the first screen there is a gap at the bottom a gap (about 15px). At the second one - gap at the center between two windows.

I've already applied the uselessgap patch (https://dwm.suckless.org/patches/uselessgap). However - even after setting gappx const to 0 - nothing changed :(

Any ideas?

ssd ssd

Devon
  • 130
  • 9
Timur Fayzrakhmanov
  • 17,967
  • 20
  • 64
  • 95

3 Answers3

5

This is likely due to suckless terminal. This issue is addressed in the anysize patch. You can patch the files before compiling the terminal as follows, starting from your st-0.x.x folder:

wget https://st.suckless.org/patches/anysize/st-anysize-0.8.1.diff
patch -Np1 -i st-anysize-0.8.1.diff
make
sudo make install

Now, the window gap issue should be fixed in your st binary. This method works for applying other patches as well.

Adam Erickson
  • 6,027
  • 2
  • 46
  • 33
  • In my setup, this patch does not fix entirely the problem, but setting resizehints to 0 does, and for all terminals. – R. W. Prado Sep 28 '21 at 04:11
2

Try turning resize hints off in your config.h. More precisely, you would need to set

static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */

This works for me with dwm and urxvt.

The problem apparently stems from terminals being unable to expand to fill arbitrary space on the screen. When resizehints are on, space is left around the window (the gaps you see). When they are off, that dead space is subsumed withing the terminal window itself (although the terminal application can't use it). (Source: https://dwm.suckless.org/faq)

  • 1
    From the [Arch Wiki](https://wiki.archlinux.org/index.php/Dwm#Fixing_gaps_around_terminal_windows): “This will cause dwm to ignore resize requests from all client windows, not just terminals. The downside to this workaround is that some terminals may suffer redraw anomalies, such as ghost lines and premature line wraps, among others.” – Devon Aug 15 '19 at 17:48
  • These events are rare in most terminals. You can test it, as always. For example, in xfce4-terminal, I'm still trying to find an anomaly that this patch causes. =) The benefits surpass the malefits for sure. – R. W. Prado Sep 28 '21 at 04:08
0

You are in what is called 'tiling mode'. It's not a bug, it's a feature. If you want to get rid of the spaces, just switch to Fibbonacci-mode, for example.

pqrrot
  • 172
  • 1
  • 3
  • If It's an unwanted consequence, don't call it a feature. If it were at least a bug that is being used in benefit of something, I would accept it as a feature, but actually it's not. – R. W. Prado Sep 28 '21 at 04:18