Annoying gaps between windows in dwm

8.3k views Asked by At

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

3

There are 3 answers

1
Adam Erickson On

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.

2
Richard Lupton On

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
pqrrot On

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.