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!

@AlvaroSpain1987
Copy link

Then it means it's not it repo you will have to compile it on your own.
See if this helps https://unix.stackexchange.com/questions/338519/how-to-install-libxcb

Bro, thanks so much for you help! Following that I was able to make it and install it, I’m going to try it out.
THANK YOU

@Aeres-u99
Copy link

No issues mate :)

@lag00n
Copy link

lag00n commented May 15, 2020

when i try to put the command "make" i get the result "make: *** no targets specified and no makefile found. Stop."
what do i done wrong?

@Kabouik
Copy link

Kabouik commented Jul 9, 2020

On Debian Sid, sudo apt install libxcb-shape0-dev was also required (see here), and of course git but no surprise here.

@avinash-cn
Copy link

I had to install libxcb-shape0-dev on Ubuntu 20.04. Rest was perfect. Thanks.

@thriveth
Copy link

On Debian Buster, I get the error:

configure: error: Package requirements (libstartup-notification-1.0) were not met:

No package 'libstartup-notification-1.0' found

but both libstartup-notification and its -dev package arte installed.

Any pointers?

@cainnz
Copy link

cainnz commented Oct 13, 2020

What if I would like to remove it as a whole?

@ubuntupunk
Copy link

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.

@jmhakvoort
Copy link

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

@ubuntupunk
Copy link

Okay, I see the build system was changed as per RELEASE NOTES

meson build
ninja -C build/ install

@ishank-katiyar
Copy link

ishank-katiyar commented Jan 5, 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

@ameasere
Copy link

ameasere commented Jan 12, 2021

Above repo didn't work while following the same steps as OP.

Log: https://mega.nz/file/kDAyxJKR#9hlW_RGN0luR_2rfVh9IGJW0E_oBO2jfyqW4NXf5gi4
(The log exceeded 512kB thanks to its ridiculously verbose output)

Edit: I installed regolith and found a custom i3 config with polybars and I love them.

@Sebastian-Nielsen
Copy link

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!

@Kabouik
Copy link

Kabouik commented Mar 23, 2021

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.

@Staubgeborener
Copy link

should be now git checkout gaps-next

@gerardparareda
Copy link

The gaps-next branch still returns
autoreconf: 'configure.ac' or 'configure.in' is required and ../configure: No such file or directory

@mcrors
Copy link

mcrors commented May 28, 2021

sudo meson install -C ../build

thanks, this worked for me.

@blasco
Copy link

blasco commented Jul 16, 2021

Still having the same problem:

autoreconf: 'configure.ac' or 'configure.in' is required and ../configure: No such file or directory

@Kabouik
Copy link

Kabouik commented Jul 16, 2021

Please clarify which repository you used and whether you ran sudo meson install -C ../build or the older instructions.

@blasco
Copy link

blasco commented Jul 16, 2021

Please clarify which repository you used and whether you ran sudo meson install -C ../build or the older instructions.

For me it didn't work with:

https://www.github.com/Airblader/i3

but this worked as suggested in a previous message:

https://github.com/resloved/i3

@Staubgeborener
Copy link

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

@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