Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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!

@Aeres-u99
Copy link

Aeres-u99 commented May 3, 2020

No issues.

@AlvaroSpain1987
Copy link

AlvaroSpain1987 commented May 3, 2020

So is there a way to install it then?

@Aeres-u99
Copy link

Aeres-u99 commented May 3, 2020

have you tried libxcb-shape?.
what does apt-get search xcb shows?

@Aeres-u99
Copy link

Aeres-u99 commented May 3, 2020

aha I read your comment on airblade's issue page too lol. sudo apt-get install libxcb-shape libxcb-shape-dev should resolve it

@AlvaroSpain1987
Copy link

AlvaroSpain1987 commented May 4, 2020

sudo apt-get install libxcb-shape libxcb-shape-dev

Thanks for the reply, I already tried it says:
“Unable to locate package”

@Aeres-u99
Copy link

Aeres-u99 commented May 4, 2020

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

@AlvaroSpain1987
Copy link

AlvaroSpain1987 commented May 4, 2020

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

Aeres-u99 commented May 4, 2020

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

avinash-cn commented Aug 2, 2020

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

@thriveth
Copy link

thriveth commented Sep 22, 2020

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

ubuntupunk commented Nov 17, 2020

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

jmhakvoort commented Nov 17, 2020

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

ubuntupunk commented Nov 17, 2020

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

@projectintel-anon
Copy link

projectintel-anon 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

Sebastian-Nielsen commented Mar 11, 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!

@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

Staubgeborener commented May 15, 2021

should be now git checkout gaps-next

@gerardparareda
Copy link

gerardparareda commented May 23, 2021

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

Staubgeborener 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

@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

KernelDeimos commented Dec 4, 2021

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

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