Skip to content

Instantly share code, notes, and snippets.

@NTag
Last active November 17, 2018 13:51
Show Gist options
  • Save NTag/39a27aea87aeabe54c09 to your computer and use it in GitHub Desktop.
Save NTag/39a27aea87aeabe54c09 to your computer and use it in GitHub Desktop.
Beautiful Terminal with Ubuntu 14.04 LTS
  1. Install ZSH

    • sudo apt-get install git zsh
  2. Install OhMyZSH

    • sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  3. Install zsh-autosuggestions

    • git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
    • Edit ~/.zshrc and replace line plugins=(git) with plugins=(git zsh-autosuggestions)
    • Create a file ~/.oh-my-zsh/custom/colors.zsh containing ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=240'
  4. Install zsh-syntax-highlighting

    • git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
    • Edit ~/.zshrc and replace line plugins=(git zsh-autosuggestions) with plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
    • Note: if you have issues with this plugin, go in ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting and execute git checkout 0.4.1
  5. Install Powerline

    • Install pip: (in root) curl https://bootstrap.pypa.io/get-pip.py | python
    • sudo pip install powerline-status
    • Find where Powerline has been installed: pip show powerline-status and look the line Location: (for me it's /usr/local/lib/python2.7/dist-packages). We will call it {repository_root}
    • In ~/.zshrc add the following line at the end: . {repository_root}/powerline/bindings/zsh/powerline.zsh (replace {repository_root} with the previous value; for me it gives: . /usr/local/lib/python2.7/dist-packages/powerline/bindings/zsh/powerline.zsh)
  6. Install tmux >= 1.9

    • You can check the version installed with tmux -V
    • On Ubuntu 14.04
    • sudo apt-get install -y python-software-properties software-properties-common tmux
    • sudo add-apt-repository -y ppa:pi-rho/dev
    • sudo apt-get update
    • sudo apt-get install tmux
  7. Add Powerline to tmux

    • Create a file ~/.tmux.conf and put inside:
    set -g default-terminal "screen-256color"
    run-shell "powerline-daemon -q"
    source "/usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf"
    # Start windows and panes at 1, not 0
    set -g base-index 1
    setw -g pane-base-index 1
    
    # pane border
    set-option -g pane-border-fg colour235 #base02
    set-option -g pane-active-border-fg colour240 #base01
    
    # message text
    set-option -g message-bg colour235 #base02
    set-option -g message-fg colour166 #orange
    
    # pane number display
    set-option -g display-panes-active-colour colour33 #blue
    set-option -g display-panes-colour colour166 #orange
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment