Nous faisons voler le terminal (partie 1)


Un matin, alors que je travaillais dans le terminal, j'ai pensé au fait que mon émulateur de terminal n'est pas assez rapide et pratique, j'ai donc décidé de chercher une alternative à l'ancien gnome-terminal. En grimpant la moitié d'Internet, ainsi que les référentiels avec des fichiers dot, j'ai trouvé un remplacement digne, et je suis prêt à dire et à montrer comment passer du gnome-terminal ennuyeux (qui est également lent) à des émulateurs de terminal plus récents.


Où commencer?


, 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.



Comparaison des émulateurs de terminaux sur Slant
Alacritty.yml pour un exemple de
thèmes sur Alacritty

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


All Articles