Note : I'm assuming you have a working i3 install
sudo apt-get install \
cmake cmake-data libcairo2-dev libxcb1-dev libxcb-ewmh-dev \
libxcb-icccm4-dev libxcb-image0-dev libxcb-randr0-dev \
libxcb-util0-dev libxcb-xkb-dev pkg-config python3-xcbgen \
xcb-proto libxcb-xrm-dev libasound2-dev libmpdclient-dev \
libiw-dev libcurl4-openssl-dev libpulse-dev \
libxcb-composite0-dev xcb libxcb-ewmh2 libjsoncpp-dev
git clone https://github.com/jaagr/polybar.git
cd polybar
./build.sh
During the build process answer Yes
to all the options (except the first on
on using GCC instead of CLang if available).
And in the end say Yes
to run sudo make install
.