Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save aaronsaderholm/872d55a1cec3969a5baf549f840147f1 to your computer and use it in GitHub Desktop.
Save aaronsaderholm/872d55a1cec3969a5baf549f840147f1 to your computer and use it in GitHub Desktop.
Install i3-gaps on Ubuntu 16.04
#!/usr/bin/env bash
# Install i3-gaps on Ubuntu 16
set -e
set -x
sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-shape0-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 dh-autoreconf
mkdir -p $HOME/repos
cd $HOME/repos
# Setup xcb-util-xrm
if cd xcb-util-xrm; then \
git pull;
else
git clone --recursive https://github.com/Airblader/xcb-util-xrm.git xcb-util-xrm; cd xcb-util-xrm;
fi
./autogen.sh
make
sudo make install
# Setup i3-gaps
sudo ldconfig
sudo ldconfig -p
cd $HOME/repos
if cd i3-gaps; then
git pull
else
git clone https://www.github.com/Airblader/i3 i3-gaps; cd i3-gaps;
fi
autoreconf --force --install
rm -Rf build/
mkdir build
cd build/
../configure --prefix=/usr --sysconfdir=/etc
make
sudo make install
which i3
ls -l /usr/bin/i3
@humding3r
Copy link

You are honestly the greatest person in the world for making this. I was so frustrated on trying to install i3-gaps and then I came across this, and it installed it for me. Thanks.

@a-vandov
Copy link

a-vandov commented Nov 5, 2017

thanks man, this is great :)

@pp4arts
Copy link

pp4arts commented Nov 30, 2017

Hi, I did all procedures above but I can't continue because this:

configure: error: Package requirements (xcb-xrm) were not met:
No package 'xcb-xrm' found

my distro is Kxstudio!

Please, help me! thanks you!

@bresilla
Copy link

@pp4arts - Its because, after line 18, you should do an "sudo make install" which is missing, then you are good to go :)

@cuprousoxide
Copy link

thanks!
i'm getting some weird memory errors trying to run i3, though (this is probably related to me running ubuntu through WSL on windows 10)

@shxdow
Copy link

shxdow commented May 30, 2019

Isn't running dist-upgrade overkill ?

@danieldugas
Copy link

danieldugas commented Jan 10, 2020

Worked like a charm, just need to add
sudo apt install libxcb-shape0-dev

@aaronsaderholm
Copy link
Author

Isn't running dist-upgrade overkill ?

Yes, probably.

I updated the script with suggested changes here.

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