Skip to content

Terminal (emulator)

GradedJestRisk edited this page Jul 11, 2021 · 8 revisions

Table of Contents

Overview

It emulates a video terminal.

List:

  • get current terminal: ps -p $(ps -p $$ -o ppid=) o args=
    • gnome: gnome-terminal
    • terminator: terminator
    • XFCE: xfce4-terminal
  • set default terminal: sudo update-alternatives --config x-terminal-emulator
Terminals: Shortcuts:
  • on copy/paste between UI and terminal, see here
  • on cursor move, see here

Gnome terminal

shortcuts

Full list

List:

  • new terminal: Ctrl Alt T
  • new tab: Ctrl Shift T
  • focus on tab: Ctrl PageUp/Down
  • focus on tab: Alt (to get N, you'll need Shift)
  • close tab: Ctrl Shift W
Text:
  • copy: Shift Ctrl C or mouse selection
  • paste: Shift Ctrl C or mouse middle button

Terminator

Config file: /home/<USER>/.config/terminator

shortcuts

cheat sheet

List:

  • New terminal: Ctrl Alt T
  • New terminal tab: Ctrl Shift T
  • Focus on tab: Ctrl PageUp/Down
Split:
  • vertical: Ctrl Shift E
  • horizontal: Ctrl Shift O
  • navigate: Alt + Arrows

Settings

List:

  • infinite scrollback:
  [[default]]
    scrollback_infinite = True

Create layout using yaml here

run command on startup

Create a layout with custom command, then - to launch it, run terminator -l <LAYOUT_NAME> - set it as the default layout

If you need to interrupt custom command without closing the terminal, see here

Add to zshrc

echo $INIT_CMD
if [ ! -z "$INIT_CMD" ]; then
    OLD_IFS=$IFS
    setopt shwordsplit
    IFS=';'
    for cmd in $INIT_CMD; do
        print -s "$cmd"  # add to history
        eval $cmd
    done
    unset INIT_CMD
    IFS=$OLD_IFS
fi

Change your custom command to

env INIT_CMD="put your command here" zsh

Tilix

See here

Clone this wiki locally