Nós fazemos o terminal voar (parte 1)


Uma manhã, enquanto trabalhava no terminal, pensei no fato de que meu emulador de terminal não era rápido o suficiente e conveniente, então decidi procurar uma alternativa ao antigo terminal gnome. Subindo metade da Internet, assim como os repositórios com dotfiles, encontrei um substituto digno e estou pronto para contar e mostrar como alternar do irritante terminal-gnome (que também é lento) para os emuladores de terminal mais recentes.


Onde começar?


, 3 Linux — . . - .json, .cson, .vimrc, . , — . ( ) , .


Gnome-terminal?


: , , , . , , . , . Vim, , .



1 1,000,000 ( , ± .


Alacritty ( tmux + zsh)



Gnome-terminal + zsh



Hyper + zsh




Gnome-terminal , 20 .
zsh , gnome'a , .



( ), gnome-terminal . , , . tmux+zsh.


Hyper


Hyper — , -. CSS. .



Hyper


Alacritty


Alacritty — , ( ). , ( , tmux + zsh , gnome + zsh)



Alacritty



Github , ( ) , , - . . pull-, . — , , , , " ".


fastconfig.sh fastconfig_arch.sh. 1- Debian/Ubuntu, Arch/Manjaro.



Alacritty.


# ,        
save_to_clipboard: true #  false

window: 
  padding:
#       x,y.    .
    x: 0 
    y: 0
  dynamic_padding: false
#       (transparent   )
  decorations: full 

  startup_mode: Fullscreen # Windowed - , Maximized -    , Fullscreen -   

# # # # # # # # # # # # # # # # # #        # # # # # # # # # # # # # # # # # #
scrolling:
          history: 10000
          multiplier: 3 #        
          faux_multiplier: 3
          auto_scroll: true #      ,   

#####################         #####################
font:
    normal:
      family: "Fira Code"
    bold:
      family: "Fira Code"
    italic:
      family: "Fira Code"

    size: 15.0 #  

#  
    offset:
      x: 0
      y: 0

    glyph_offset:
      x: 0
      y: 0

    #     
    draw_bold_text_with_bright_colors: true

###########################        ##########################
#     https://github.com/eendroroy/alacritty-theme

# (Base16 Default Dark) 
  colors:
    # Default colors
    primary:
      background: '0x181818'
      foreground: '0xd8d8d8'

    # Colors the cursor will use if `custom_cursor_colors` is true
    cursor:
      text: '0xd8d8d8'
      cursor: '0xd8d8d8'

    # Normal colors
    normal:
      black:   '0x181818'
      red:     '0xab4642'
      green:   '0xa1b56c'
      yellow:  '0xf7ca88'
      blue:    '0x7cafc2'
      magenta: '0xba8baf'
      cyan:    '0x86c1b9'
      white:   '0xd8d8d8'

    # Bright colors
    bright:
      black:   '0x585858'
      red:     '0xab4642'
      green:   '0xa1b56c'
      yellow:  '0xf7ca88'
      blue:    '0x7cafc2'
      magenta: '0xba8baf'
      cyan:    '0x86c1b9'
      white:   '0xf8f8f8'

########################        ##########################
shell:
          program: /bin/bash
          args:
                  - -c
                  - tmux

#######################        ##########################
key_bindings:
  - { key: V,        mods: Command,       action: Paste                        }
  - { key: C,        mods: Command,       action: Copy                         }
  - { key: Q,        mods: Command,       action: Quit                         }
  - { key: N,        mods: Command,       action: SpawnNewInstance             }
  - { key: Return,   mods: Command,       action: ToggleFullscreen             }

  - { key: Home,                          chars: "\x1bOH",   mode: AppCursor   }
  - { key: Home,                          chars: "\x1b[H",   mode: ~AppCursor  }
  - { key: End,                           chars: "\x1bOF",   mode: AppCursor   }
  - { key: End,                           chars: "\x1b[F",   mode: ~AppCursor  }
  - { key: Equals,   mods: Command,       action: IncreaseFontSize             }
  - { key: Minus,    mods: Command,       action: DecreaseFontSize             }
  - { key: Minus,    mods: Command|Shift, action: ResetFontSize                }
  - { key: PageUp,   mods: Shift,         chars: "\x1b[5;2~"                   }
  - { key: PageUp,   mods: Control,       chars: "\x1b[5;5~"                   }
  - { key: PageUp,                        chars: "\x1b[5~"                     }
  - { key: PageDown, mods: Shift,         chars: "\x1b[6;2~"                   }
  - { key: PageDown, mods: Control,       chars: "\x1b[6;5~"                   }
  - { key: PageDown,                      chars: "\x1b[6~"                     }
  - { key: Left,     mods: Shift,         chars: "\x1b[1;2D"                   }
  - { key: Left,     mods: Control,       chars: "\x1b[1;5D"                   }
  - { key: Left,     mods: Alt,           chars: "\x1b[1;3D"                   }
  - { key: Left,                          chars: "\x1b[D",   mode: ~AppCursor  }
  - { key: Left,                          chars: "\x1bOD",   mode: AppCursor   }
  - { key: Right,    mods: Shift,         chars: "\x1b[1;2C"                   }
  - { key: Right,    mods: Control,       chars: "\x1b[1;5C"                   }
  - { key: Right,    mods: Alt,           chars: "\x1b[1;3C"                   }
  - { key: Right,                         chars: "\x1b[C",   mode: ~AppCursor  }
  - { key: Right,                         chars: "\x1bOC",   mode: AppCursor   }
  - { key: Up,       mods: Shift,         chars: "\x1b[1;2A"                   }
  - { key: Up,       mods: Control,       chars: "\x1b[1;5A"                   }
  - { key: Up,       mods: Alt,           chars: "\x1b[1;3A"                   }
  - { key: Up,                            chars: "\x1b[A",   mode: ~AppCursor  }
  - { key: Up,                            chars: "\x1bOA",   mode: AppCursor   }
  - { key: Down,     mods: Shift,         chars: "\x1b[1;2B"                   }
  - { key: Down,     mods: Control,       chars: "\x1b[1;5B"                   }
  - { key: Down,     mods: Alt,           chars: "\x1b[1;3B"                   }
  - { key: Down,                          chars: "\x1b[B",   mode: ~AppCursor  }
  - { key: Down,                          chars: "\x1bOB",   mode: AppCursor   }
  - { key: Tab,      mods: Shift,         chars: "\x1b[Z"                      }
  - { key: F1,                            chars: "\x1bOP"                      }
  - { key: F2,                            chars: "\x1bOQ"                      }
  - { key: F3,                            chars: "\x1bOR"                      }
  - { key: F4,                            chars: "\x1bOS"                      }
  - { key: F5,                            chars: "\x1b[15~"                    }
  - { key: F6,                            chars: "\x1b[17~"                    }
  - { key: F7,                            chars: "\x1b[18~"                    }
  - { key: F8,                            chars: "\x1b[19~"                    }
  - { key: F9,                            chars: "\x1b[20~"                    }
  - { key: F10,                           chars: "\x1b[21~"                    }
  - { key: F11,                           chars: "\x1b[23~"                    }
  - { key: F12,                           chars: "\x1b[24~"                    }
  - { key: Back,                          chars: "\x7f"                        }
  - { key: Back,     mods: Alt,           chars: "\x1b\x7f"                    }
  - { key: Insert,                        chars: "\x1b[2~"                     }
  - { key: Delete,                        chars: "\x1b[3~"                     }

XTerm Hyper. Tmux Vim.



Comparação de emuladores de terminal no Slant
Alacritty.yml para um exemplo
Temas sobre Alacritty

Source: https://habr.com/ru/post/undefined/


All Articles