Last active
June 22, 2020 09:19
-
-
Save dasmikko/b11a7993e7a077d0691a8093d60e3c2f to your computer and use it in GitHub Desktop.
Install bspwm + sxhkd + polybar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
sudoUser=$SUDO_USER | |
compilationPath="/home/$sudoUser/StuffToBeCompiled" | |
echo "Installing compiling tools" | |
apt install -y clang git cmake python3-sphinx | |
echo "Installing libraries" | |
apt install -y build-essential git cmake cmake-data pkg-config python3-sphinx libcairo2-dev libxcb1-dev libxcb-util0-dev libxcb-randr0-dev libxcb-composite0-dev python3-xcbgen xcb-proto libxcb-image0-dev libxcb-ewmh-dev libxcb-icccm4-dev libxinerama-dev | |
echo "Installing other dependencies" | |
apt install -y libxcb-xkb-dev libxcb-xrm-dev libxcb-cursor-dev libasound2-dev libpulse-dev libjsoncpp-dev libmpdclient-dev libcurl4-openssl-dev libnl-genl-3-dev xcb libxcb-keysyms1-dev libxcb-xinerama0-dev libxcb-xtest0-dev libxcb-shape0-dev | |
echo "Creating compilation path" | |
if [ -d "$compilationPath" ]; then | |
# Take action if $DIR exists. # | |
echo "Compilation path already exists, deleting..." | |
rm -rf $compilationPath | |
fi | |
mkdir $compilationPath | |
cd $compilationPath | |
echo "******************" | |
echo "Installing BSPWM" | |
echo "******************" | |
git clone https://github.com/baskerville/bspwm.git | |
cd bspwm | |
make | |
make install | |
echo "Copy desktop file to xsessions" | |
cp -p contrib/freedesktop/bspwm.desktop /usr/share/xsessions/bspwm.desktop | |
if [ ! -d "/home/$sudoUser/.config/bspwm" ]; then | |
mkdir /home/$sudoUser/.config/bspwm | |
cp -p examples/bspwmrc /home/$sudoUser/.config/bspwm/bspwmrc | |
chown $sudoUser:$sudoUser /home/$sudoUser/.config/bspwm/bspwmrc | |
else | |
echo "BSPWM config already existing. Skipping..." | |
fi | |
if [ ! -d "/home/$sudoUser/.config/sxhkd" ]; then | |
mkdir /home/$sudoUser/.config/sxhkd | |
cp -p examples/sxhkdrc /home/$sudoUser/.config/sxhkd/sxhkdrc | |
chown $sudoUser:$sudoUser /home/$sudoUser/.config/sxhkd/sxhkdrccp -p examples/sxhkdrc /home/$sudoUser/.config/sxhkd/sxhkdrc | |
else | |
echo "SXHKD config already existing. Skipping..." | |
fi | |
echo "******************" | |
echo "Installing SXHKD" | |
echo "******************" | |
git clone https://github.com/baskerville/sxhkd.git | |
cd sxhkd | |
make | |
make install | |
echo "Done installing SXHDK" | |
echo "******************" | |
echo "Installing Polybar" | |
echo "******************" | |
cd $compilationPath | |
git clone --recursive https://github.com/polybar/polybar | |
cd polybar | |
mkdir build | |
cd build | |
cmake .. | |
make -j$(nproc) | |
# Optional. This will install the polybar executable in /usr/local/bin | |
make install | |
echo "Done installing Polybar" | |
echo "******************" | |
echo "Notice! You need to setup BSPWM to use Polybar" | |
echo "******************" | |
echo "Cleaning up" | |
rm -rf $compilationPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment