Skip to content

Instantly share code, notes, and snippets.

@Xyene
Created December 12, 2019 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xyene/0a4af283bee7f395bf1e7da6322e678a to your computer and use it in GitHub Desktop.
Save Xyene/0a4af283bee7f395bf1e7da6322e678a to your computer and use it in GitHub Desktop.
Instructions for installing i3 on WSL (https://github.com/Xyene/wsl-dotfiles/)
# These instructions assume a clean install of a Debian image from the Windows store
sudo mkdir /code
sudo chmod 777 /code
cd /code
sudo apt install -y git vim
git clone https://github.com/Xyene/wsl-dotfiles.git
cd wsl-dotfiles
chmod +x ~/.scripts/*
ln -s `pwd`/.config ~/.config
ln -s `pwd`/.scripts ~/.scripts
ln -s `pwd`/.bashrc ~/.bashrc
ln -s `pwd`/.Xresources ~/.Xresources
# Install fzf for better Ctrl+R
cd /code
git clone --depth 1 https://github.com/junegunn/fzf.git
./fzf/install
# Git branch in PS1
curl -o ~/.scripts/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
echo 'source ~/.scripts/.git-prompt.sh' >> ~/.bashrc
# Reload bashrc so all our changes above are applied
. ~/.bashrc
#######################################################################################################################
# Install i3-gaps
cd /code
sudo apt install -y libxcb-shape0-dev libxcb-xrm-dev 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
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
#######################################################################################################################
# Install termite
# Modified from https://raw.githubusercontent.com/Corwind/termite-install/master/termite-install.sh
cd /code
sudo apt install -y \
git \
g++ \
libgtk-3-dev \
gtk-doc-tools \
gnutls-bin \
valac \
intltool \
libpcre2-dev \
libglib3.0-cil-dev \
libgnutls28-dev \
libgirepository1.0-dev \
libxml2-utils \
gperf
git clone --recursive --depth 1 https://github.com/thestinger/termite.git
git clone --depth 1 https://github.com/thestinger/vte-ng.git
echo export LIBRARY_PATH="/usr/include/gtk-3.0:$LIBRARY_PATH"
cd vte-ng && ./autogen.sh && make && sudo make install
cd ../termite
# Apply this patch
diff --git a/termite.cc b/termite.cc
index e168e77..5ca2d46 100644
--- a/termite.cc
+++ b/termite.cc
@@ -1638,7 +1638,7 @@ static void on_alpha_screen_changed(GtkWindow *window, GdkScreen *, void *) {
int main(int argc, char **argv) {
GError *error = nullptr;
- const char *const term = "xterm-termite";
+ const char *const term = "xterm-256color";
char *directory = nullptr;
gboolean version = FALSE, hold = FALSE;
make && sudo make install
sudo ldconfig
#######################################################################################################################
# Install polybar
cd /code
sudo 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 python-xcbgen xcb-proto libxcb-image0-dev libxcb-ewmh-dev libxcb-icccm4-dev
git clone --recursive --depth 1 https://github.com/polybar/polybar
cd polybar
mkdir build
cd build
cmake ..
make -j$(nproc)
sudo make install
#######################################################################################################################
# Misc things
sudo apt install hsetroot feh compton x11-xserver-utils
sudo apt install neofetch w3m-img imagemagick xdotool lsb-release
# Vim plugins
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
ln -s /code/wsl-dotfiles/.vimrc ~/.vimrc
## `vim ~/.vimrc` and run :PluginInstall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment