Skip to content

Instantly share code, notes, and snippets.

@boreycutts
Last active November 11, 2024 11:55
Show Gist options
  • Save boreycutts/6417980039760d9d9dac0dd2148d4783 to your computer and use it in GitHub Desktop.
Save boreycutts/6417980039760d9d9dac0dd2148d4783 to your computer and use it in GitHub Desktop.
A simple installation guide for i3-gaps

Installing i3-gaps

Dependencies

i3-gaps has some packages that are required for it to work so install these things:

sudo apt install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev libtool automake

You also need to install libxcb-xrm-dev, but I got Unable to locate package libxcb-xrm-dev when trying to install from the apt repositories on Ubuntu 16.04. If this happens to you, just install it from source using these commands:

mkdir tmp
cd tmp
git clone https://github.com/Airblader/xcb-util-xrm
cd xcb-util-xrm
git submodule update --init
./autogen.sh --prefix=/usr
make
sudo make install

Installing

gaps also needs to be installed from source so run these commands:

cd tmp
git clone https://www.github.com/Airblader/i3 i3-gaps
cd i3-gaps
git checkout gaps && git pull
autoreconf --force --install
rm -rf build
mkdir build
cd build
../configure --prefix=/usr --sysconfdir=/etc --disable-sanitizers
make
sudo make install

Now i3-gaps should be installed.

Configuring

To enable gaps you need to set some variables in your i3 config.

gaps inner <# of pixels>
gaps outer <# of pixels>

Add this to get rid of titlebars because gaps doen't work with titlebars:

for_window [class="^.*"] border pixel 2

Refresh i3 and you're good to go!

@Staubgeborener
Copy link

Someone here says, he still has issues in 2023 with this installation (and deleted this post, duh). This is debian based i3-gaps installation, maybe it helps someone.

@pewpewnotes
Copy link

Just to update: I3 has been merged with i3-gaps iirc, so none of these will be needed anymore. We can directly install i3 (or wmderland)

@dusanbrankov
Copy link

Someone here says, he still has issues in 2023 with this installation (and deleted this post, duh). This is debian based i3-gaps installation, maybe it helps someone.

This also doesn't work, failed to run meson -Ddocs=true -Dmans=true ../build:

cd -- meson -Ddocs=true -Dmans=true ../build
bash: cd: too many arguments

I'll leave it as is, don't see the point in investing so much time for such BS. Thanks anyway for trying to help.


Just to update: I3 has been merged with i3-gaps iirc, so none of these will be needed anymore. We can directly install i3 (or wmderland)

I installed it yesterday with apt package manager (v 4.20.1), gaps are still not available. The official docs also don't tell you nothing about it.

@Staubgeborener
Copy link

Someone here says, he still has issues in 2023 with this installation (and deleted this post, duh). This is debian based i3-gaps installation, maybe it helps someone.

This also doesn't work, failed to run meson -Ddocs=true -Dmans=true ../build:

cd -- meson -Ddocs=true -Dmans=true ../build
bash: cd: too many arguments

I'll leave it as is, don't see the point in investing so much time for such BS. Thanks anyway for trying to

your error seems to be related to a previous cd command according your error message: And yeah, for cd these are indeed too much / incorrect parameters.

@deryckschnee-dev
Copy link

On Debian Sid and with Resolved's repository mentioned above, I got the same verbose error as @projectintel-anon.

What I had to do was:

mkdir /tmp/build 
cd /tmp/build
git clone https://www.github.com/Airblader/i3 i3-gaps
cd i3-gaps
git checkout gaps && git pull
sudo apt install meson asciidoc
meson -Ddocs=true -Dmans=true ../build
meson compile -C ../build
sudo meson install -C ../build

I preferred using Airblader's repository over Resolved's because the former seems to be better maintained (the latter hasn't seen commits in years and I was still having issues with it when using autoreconf).

I hope this will help others.

THANK YOU!! (Debian 12.4.0, had to also install libxcb-shape0-dev and a few other dependencies as they came up when running the initial meson command.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment