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
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.
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!
On CentOS 8 I had to do a few things:
https://github.com/resloved/i3
as mentioned a few times earliergrep -rl ev_loop . | xargs sed -i 's/ev_loop/ev_run/g'
because god is dead and we have killed himgrep -rl ev_run_destroy . | xargs sed -i 's/ev_run_destroy/ev_loop_destroy/g'
because pain is hilarioussudo 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: