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!

@blasco
Copy link

blasco commented Jul 17, 2021

@blasco because you are in the wrong folder/path the program simply can’t find configure.ac - and this is your problem

I'm quite sure I was at the right path, but you might be right. Anyhow, for anyone else having the problem, and if they check the path and still doesn't work, the other repo works great

@MK3Core
Copy link

MK3Core commented Sep 14, 2021

on Ubuntu 20.04
autoreconf --force --install
I get: autoreconf: 'configure.ac' or 'configure.in' is required
then
../configure --prefix=/usr --sysconfdir=/etc --disable-sanitizers
I get: bash: ../configure: No such file or directory
automake is installed.

Same on Debian sid

Is there any soln to this ??
EDIT: clone this repo "https://github.com/resloved/i3" instead of given above

Thank you, that worked for me!

This worked for me as well, thank you!

@KernelDeimos
Copy link

On CentOS 8 I had to do a few things:

  • use https://github.com/resloved/i3 as mentioned a few times earlier
  • grep -rl ev_loop . | xargs sed -i 's/ev_loop/ev_run/g' because god is dead and we have killed him
  • grep -rl ev_run_destroy . | xargs sed -i 's/ev_run_destroy/ev_loop_destroy/g' because pain is hilarious
  • sudo dnf install startup-notification-devel

and I had to install the following with sudo dnf --enablerepo=powertools install <name>.
I already enabled powertools before, but had to add this flag anyway for some reason.
xcb-util-devel,xcb-util-cursor-devel,xcb-util-keysyms-devel,libxkbcommon-x11-devel,xcb-util-wm-devel,yajl-devel,pcre-devel

I had to install these ones directly from mirrors because I honestly don't know what I'm doing:

sudo dnf install https://pkgs.dyn.su/el8/base/x86_64/xcb-util-xrm-devel-1.3-5.el8.x86_64.rpm
sudo dnf install http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/cairo-devel-1.15.12-3.el8.x86_64.rpm
sudo dnf install http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/pango-devel-1.42.4-8.el8.x86_64.rpm

@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