Giter Club home page Giter Club logo

rocketseat-terminal's Introduction

- Rocketseat Terminal Customization


Minhas personalizações do terminal Hyper, editadas do artigo criado pela Rocketseat.

O Hyper é um terminal de código aberto multiplataforma, com o intuito de criar uma experiência flexível e bonita para o usuário, possibilitando a utilização de plugins e temas.

Lista de temas e plugins: awesome-hyper


1- Instalando o Omni-theme

hyper install hyper-omni-theme

Ou qualquer outro tema da sua escolha.


2- Instalando o Hyper borders e scrolbar

Edite no arquivo .hyper.js os plugins, e adicione o hyperBoarder dentro de config:

  • Se quiser customizar a cor da borda, basta mudar os valores HEX de borderColors:
module.exports = {
    config: {
        ...
        hyperBorder: {
            borderColors: ['#6514f5','#33d0b9', '#6514f5'],
            borderWidth: '6px'
        }
        ...
plugins: ['hyper-omni-theme', 'hyperborder', 'hyper-dark-scrollbar'],

3- Instalando Oh My Zsh

Primeiro, instale o Zsh

sudo apt install zsh

Cole o comando no console e siga com a instalação

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

4- Instalando a fonte "Fira Code"

Baixe o Fira_Code_v*.zip e instale as fontes.

5- Instalando o Spaceship

5.1 Clone o repositório do tema.

git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"

5.2 Faça um link simbólico do tema na pasta do zsh.

ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

5.3 Agora abra o ~/.zshrc com um editor de sua preferencia e edite o tema para:

ZSH_THEME="spaceship"

5.4 Neste mesmo arquivo, adicione as opções para desabilitar algumas das funções que consomem desempenho e fazer outras customizações.

SPACESHIP_PROMPT_ORDER=(
  user          # Username section
  dir           # Current directory section
  host          # Hostname section
  git           # Git section (git_branch + git_status)
  hg            # Mercurial section (hg_branch  + hg_status)
  node          # node version
  exec_time     # Execution time
  line_sep      # Line break
  vi_mode       # Vi-mode indicator
  jobs          # Background jobs indicator
  exit_code     # Exit code section
  char          # Prompt character
)
SPACESHIP_USER_SHOW=always
SPACESHIP_PROMPT_ADD_NEWLINE=false
SPACESHIP_CHAR_SUFFIX=" "

Se quiser fazer a suas próprias customizações, existe a documentação do Spaceship para consulta.

5.5 Instalando plugins do Zsh
Procure no ~/.zshrc a parte dos plugins e adicione os seguintes:

plugins=(git nvm sudo web-search copypath history)

5.6 Reinicie o terminal para ver a mudança.


6- Instalando plugins Zinit

Antes de instalar os plugins, precisamos do ZI, que facilita a instalação dos mesmos.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install.sh)"

Agora adicionamos os plugins nas ultimas linhas do nosso arquivo ~/.zshrc:

zinit light zdharma/fast-syntax-highlighting
zinit light zsh-users/zsh-autosuggestions
zinit light zsh-users/zsh-completions

7- Instalando Node Version Manager

Execute os seguintes comandos.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

Depois, adicione no final do seu arquivo ~/.zshrc:

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

Opcional

Caso esteja utilizando o WSL, alguns diretórios podem aparecer com um background nas letras, dificultando a leitura. Para consertar isso, adicione no final de seu arquivo ~/.zshrc:

LS_COLORS+=':ow=01;33'

rocketseat-terminal's People

Contributors

luizfranzon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.