Skip to content

Instantly share code, notes, and snippets.

@ahmad-alwazzan
ahmad-alwazzan / txt
Created March 22, 2023 17:56
wsl2 x11 forwarding to x11 server
paste this line in your bashrc
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
#!/usr/bin/env bash
sudo apt update
sudo apt install -y git build-essential pkg-config libevent-dev libncurses5-dev automake
rm -fr /tmp/tmux
git clone https://github.com/tmux/tmux.git /tmp/tmux
# install xclip for some linux distros for tmux copy/paste to work:
#sudo apt install xclip
git clone --bare https://github.com/ahmad-alwazzan/dotfiles.git $HOME/.cfg
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p $HOME/.config-backup
config checkout
if [ $? = 0 ]; then
echo "Checked out config.";
@ahmad-alwazzan
ahmad-alwazzan / install_dotfiles_win.sh
Last active January 27, 2020 15:42
Install your dotfiles
git clone -b windows --bare https://github.com/ahmad-alwazzan/dotfiles.git $HOME/.cfg
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout
if [ $? = 0 ]; then
echo "Checked out config.";
else
echo "Backing up pre-existing dot files.";