Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save maxsuelmarinho/1225db3dc663640f9bf4d651ad76507f to your computer and use it in GitHub Desktop.
Save maxsuelmarinho/1225db3dc663640f9bf4d651ad76507f to your computer and use it in GitHub Desktop.

Terminal + Zsh + Windows + WSL + Ubuntu + VS Code + Git Bash + Windows Terminal

Zsh

Install

$ sudo apt install zsh
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh-syntax-highlighting" --depth 1
$ echo "source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> "$HOME/.zshrc"
$ echo "fpath=(~/.zsh/completion $fpath)" >> "$HOME/.zshrc"
$ echo "autoload -Uz compinit && compinit -i" >> "$HOME/.zshrc"
$ sed -i 's/ZSH_THEME=".*"/ZSH_THEME="agnoster"/g' ~/.zshrc
$ sed -i 's/plugins=(.*)/plugins=(git docker docker-compose dotenv go golang npm npx terraform ansible aws z)/g' ~/.zshrc
$ cd ~/.oh-my-zsh
$ upgrade_oh_my_zsh
$ chsh -s /bin/zsh # or: exec zsh
# default shell
$ chsh -s /bin/bash

Ajusting UI

Install Powerline fonts

Ubuntu

$ sudo apt-get install -y powerline fonts-powerline

Windows

$ git clone https://github.com/powerline/fonts.git "$HOME/.powerline-fonts"
$ cd $HOME\.powerline-fonts
$ Set-ExecutionPolicy Bypass
$ .\install.ps1
$ Set-ExecutionPolicy Default

Windows Terminal

Open Windows Terminal settings using the shortcut: Crtl + ,

Then, add the "fontFace" field with the desired font

 ...
 "profiles":
    [
        {
            "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
            "hidden": false,
            "name": "Ubuntu-18.04",
			"fontFace":  "DejaVu Sans Mono for Powerline",
            "source": "Windows.Terminal.Wsl"
        },
        ...
    ],
    ...

VS Code

  • Open VS Code settings using the shortcut: Crtl + ,
  • Search for 'Terminal Font'
  • Under Terminal > Integrated: Font Family enter "DejaVu Sans Mono for Powerline", or another font name

Git Bash

  • Go to Menu Options... > Text
  • and then, under Font click on Select... button
  • and select "DejaVu Sans Mono for Powerline" font
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment