Skip to content

Commit

Permalink
Add several workarounds for WSL (Windows Subsystem for Linux)
Browse files Browse the repository at this point in the history
  • Loading branch information
kodemeister committed Oct 4, 2020
1 parent 9c2de73 commit 04d1473
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions runcoms/zprofile
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,23 @@ export LESS='-F -g -i -M -R -S -w -X -z-4'
if (( $#commands[(i)lesspipe(|.sh)] )); then
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
fi

#
# WSL (Windows Subsystem for Linux)
#

if [[ -f /proc/version ]] && grep -q "Microsoft" /proc/version; then
# Force tmux use /bin/zsh as the default shell instead of /bin/bash.
export SHELL="/bin/zsh"

# Enable access to VcXSrv/Xming.
export DISPLAY=":0.0"

# Fix umask value if WSL didn't set it properly.
# https://github.com/Microsoft/WSL/issues/352
[[ "$(umask)" == "000" ]] && umask 022

# Don't change priority of background processes with nice.
# https://github.com/Microsoft/WSL/issues/1887
unsetopt BG_NICE
fi

0 comments on commit 04d1473

Please sign in to comment.