Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

two prompts to start #244

Open
patrickhener opened this issue Jul 4, 2024 · 4 comments
Open

two prompts to start #244

patrickhener opened this issue Jul 4, 2024 · 4 comments

Comments

@patrickhener
Copy link

I want to visualize a thing and am getting two prompts in the beginning. After the render goes on it is fine, but the first line will have two prompts and I don't know why.

# The configurations that used for the recording, feel free to edit them
config:
  env:
    recording: true
  cols: 85
  rows: 10
  repeat: 0

  # Quality
  # 1 - 100
  quality: 10

  frameDelay: auto
  maxIdleTime: 2000

  frameBox:
    type: floating
    title: goshs
    style:
      border: 0px black solid
      boxShadow: 10px 10px 3px rgb(0 0 0 / 40%)
      margin: 15px

  watermark:
    imagePath: null
    style:
      position: absolute
      right: 15px
      bottom: 15px
      width: 100px
      opacity: 0.9

  cursorStyle: underline

  # Font family
  # You can use any font that is installed on your machine
  # in CSS-like syntax
  fontFamily: "Ubuntu Mono, Monospace"

  fontSize: 24
  lineHeight: 1
  letterSpacing: 0

  # Theme
  theme:
    background: "transparent"
    foreground: "#afafaf"
    cursor: "#c7c7c7"
    black: "#3B4252"
    red: "#fc4384"
    green: "#b3e33b"
    yellow: "#ffa727"
    blue: "#75dff2"
    magenta: "#ae89fe"
    cyan: "#708387"
    white: "#d5d5d0"
    brightBlack: "#626566"
    brightRed: "#ff7fac"
    brightGreen: "#c8ed71"
    brightYellow: "#ebdf86"
    brightBlue: "#75dff2"
    brightMagenta: "#ae89fe"
    brightCyan: "#b1c6ca"
    brightWhite: "#f9f9f4"

# Records, feel free to edit them
records:
  - delay: 430
    content: "\e]0;patrick@mockingjay:~\e\\\e]7;file://mockingjay/home/patrick\e\\\e[?2004h\e]0;patrick@mockingjay: ~\a\e[01;32mpatrick@mockingjay\e[00m:\e[01;34m~\e[00m$ "
  - delay: 100
    content: g
  - delay: 100
    content: o
  - delay: 100
    content: ' '
  - delay: 100
    content: i
  - delay: 100
    content: 'n'
  - delay: 100
    content: s
  - delay: 100
    content: t
  - delay: 100
    content: a
  - delay: 100
    content: l
  - delay: 100
    content: l
  - delay: 100
    content: ' '
  - delay: 100
    content: g
  - delay: 100
    content: i
  - delay: 100
    content: t
  - delay: 100
    content: h
  - delay: 100
    content: u
  - delay: 100
    content: b
  - delay: 100
    content: .
  - delay: 100
    content: c
  - delay: 100
    content: o
  - delay: 100
    content: m
  - delay: 100
    content: /
  - delay: 100
    content: p
  - delay: 100
    content: a
  - delay: 100
    content: t
  - delay: 100
    content: r
  - delay: 100
    content: i
  - delay: 100
    content: c
  - delay: 100
    content: k
  - delay: 100
    content: h
  - delay: 100
    content: e
  - delay: 100
    content: 'n'
  - delay: 100
    content: e
  - delay: 100
    content: r
  - delay: 100
    content: /
  - delay: 100
    content: g
  - delay: 100
    content: o
  - delay: 100
    content: s
  - delay: 100
    content: h
  - delay: 100
    content: s
  - delay: 100
    content: '@'
  - delay: 100
    content: l
  - delay: 100
    content: a
  - delay: 100
    content: t
  - delay: 100
    content: e
  - delay: 100
    content: s
  - delay: 100
    content: t
  - delay: 100
    content: "\r\n\e[?2004l\r"
  - delay: 700
    content: "\e]0;patrick@mockingjay:~\e\\\e]7;file://mockingjay/home/patrick\e\\\e[?2004h\e]0;patrick@mockingjay: ~\a\e[01;32mpatrick@mockingjay\e[00m:\e[01;34m~\e[00m$ "
  - delay: 700
    content: g
  - delay: 100
    content: o
  - delay: 100
    content: s
  - delay: 100
    content: h
  - delay: 100
    content: s
  - delay: 100
    content: "\r\n\e[?2004l\r"
  - delay: 37
    content: "\e[36mINFO   \e[0m[2024-07-04 12:34:45] Download embedded file at: /example.txt?embedded \r\n\e[36mINFO   \e[0m[2024-07-04 12:34:45] Serving on interface eth0 bound to 10.137.0.27:8000 \r\n\e[36mINFO   \e[0m[2024-07-04 12:34:45] Serving on interface lo bound to 127.0.0.1:8000 \r\n\e[36mINFO   \e[0m[2024-07-04 12:34:45] Serving HTTP from /home/patrick       \r\n"
  - delay: 5000
    content: "\e[36mINFO   \e[0m[2024-07-04 12:34:53] 127.0.0.1:45310 - [\e[1;32m200\e[0m] - \"GET / HTTP/1.1\" \r\n"
  - delay: 2000
    content: "\e[36mINFO   \e[0m[2024-07-04 12:34:55] 127.0.0.1:45342 - [\e[1;32m200\e[0m] - \"GET /some-file.txt HTTP/1.1\" \r\n"
  - delay: 2000
    content: "\e]0;patrick@mockingjay:~\e\\\e]7;file://mockingjay/home/patrick\e\\\e[?2004h\e]0;patrick@mockingjay: ~\a\e[01;32mpatrick@mockingjay\e[00m:\e[01;34m~\e[00m$ "

This is my recording and this is the render:

goshs

You can see clearly that this is not correct.

@corymurphy
Copy link

I'm experiencing the same issue. I ended up just adding an empty record at the beginning to resolve it in the meantime.

records:
  - delay: 1
    content: " "

@patrickhener
Copy link
Author

This indeed does work.

@ofabel
Copy link

ofabel commented Sep 23, 2024

The advice from @corymurphy is great, but adds an extra space to the prompt.

To avoid this, use \r (carriage return) instead of a space character:

records:
  - delay: 1
    content: "\r"

@KarolPWr
Copy link

KarolPWr commented Oct 5, 2024

I'm experiencing the same issue. Workaround does work alright, but it would still look better without it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants