Powerlevel9k / powerlevel9k

Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
https://github.com/romkatv/powerlevel10k
MIT License
13.47k stars 947 forks source link

New Terminal Recording / gif for README #370

Closed V1rgul closed 7 years ago

V1rgul commented 7 years ago

As we're looking for a Logo, I thought it might be great to update the screenshots in the Readme.

Some of them are quite old and/or not using a patched-font, which is a plus of p9k. So if somebody changes them, he'll hopefully make them hdpi-ready :)

Ideally, they should be 1776px width for 2x scaling, as Github's Readme width is 888px.

bhilburn commented 7 years ago

Great idea, @V1rgul!

Does anyone have experience recording terminals that can offer some guidance on how to go about it?

polarathene commented 7 years ago

I've done a GIF recording on OSX before for a PR on iTerm2 with a feature I implemented. I don't have a HiDPI screen on me however(nor a Mac, was at previous company), not sure if I can do such a recording.

There is ASCIInema, I haven't tried this yet but seen it around to show off terminal animations. Anything that can record the screen should be fine, you can convert video's into animated gifs easily(Giphy is pretty neat for that I think).

V1rgul commented 7 years ago

I tried redoing the first capture, but I have some annoying glitches with a font that big. How does this image render on your screen at 50% zoom (in a new tab) ? image

polarathene commented 7 years ago

@V1rgul looks fine to me on 1080p display at 100% or 50%. Preview as well.

bhilburn commented 7 years ago

Preview & full image look fine for me (other than the drawing glitch on the right side in the time segment).

bhilburn commented 7 years ago

Looks like a combination of asciinema and this tool will do the trick: https://github.com/tav/asciinema2gif

I might give this a whirl soon.

Thoughts on what segments should be shown off in the gif, anyone (other than the standard dir, vcs, status, time)?

@V1rgul @polarathene

polarathene commented 7 years ago

The current example is quite nice? I swap out the time for an OS icon, which is more an asthetic thing rather than useful ha.

current example

Not sure how much effort would be involved but something like oh my git might be popular?

I'm not sure what other users are doing but I tend to prefer not too many segments, contextual ones are great, but good theme/colours also makes for nice eye candy, which for some themes I've completely dismissed their functionality when browsing through so many :(

bhilburn commented 7 years ago

Okay, so I tried to do this with asciinema, and unfortunately the font isn't rendering correctly. It's the classic "gap between the segments" issue that we see with improperly configured terminals: https://asciinema.org/a/6jebo7t3zff3hpwle1623kn11

It looks like asciinema does support powerline, though, based on these former bugs: https://github.com/asciinema/asciinema.org/issues/116 https://github.com/asciinema/asciinema.org/issues/161

Also, you can see in the video that it is even rendering the awesome font glyphs correctly... it's just those segment separators that aren't getting drawn right. Any help, @sickill, by chance? =)

polarathene commented 7 years ago

Sometimes that issue can be corrected with a different font or font size. I had a similar issue if I recall with iTerm2 and Hack font, I patched the font myself with macOS app Glyphs(free trial).

Alternatively if someone has a HiDPI display they could perhaps do a screen recording, crop it and convert to gif?

ku1ik commented 7 years ago

@bhilburn hey! Can you define "gap between segments"? Where is it occurring on the screen in this asciinema recording?

ku1ik commented 7 years ago

@bhilburn do you refer to this square that's displayed in several places?

bhilburn commented 7 years ago

@sickill - Actually, I'm a little confused at the moment. I really thought when I posted that comment that the recording properly showed the FontAwesome icons, but now they appear to be the squares instead. Did something change just in the last few days?

The original problem, which still exists, is with the triangular segment separator. In the videos, it's either not the right height or there is a "gap" between that character in the one next to it. Here are two images, one at normal zoom and one zoomed in:

gap

zoomed

polarathene commented 7 years ago

That issue is the one I fixed with my patch to the Hack font I use. But it only works for the font size I adjusted it for from memory. This can vary based on terminal used and a few other causes too from memory, so not really fixable for everyone :/

ku1ik commented 7 years ago

@bhilburn well, asciinema never had support for FontAwesome (it supports Poweline-Symbols font though).

As @polarathene wrote, this is really tricky stuff. If you develop desktop terminal emulator it's probably easier to make the font sizes, paddings, alignments right. But on the web, we support all major browsers and many OSes, and they all render fonts in slightly different ways. I'm afraid we can't do much at the moment (rendering to could improve the situation because we would have more precise control on the positions of rendered characters).

bhilburn commented 7 years ago

@sickill - Ah, thanks for providing some input! I really appreciate it!

@polarathene - Makes sense. Based on your & @sickill's response, it sounds like we'll need to find another option.

@V1rgul - What did you use to make your recording? I can give it a go and see if I see the same issues with large fonts.

bhilburn commented 7 years ago

Okay, I proceeded with the release without this update, but now I want to circle back around to this.

So, really what we need is effectively a way to record a screencast and create a gif from it. The original recording was done by @natemccurdy.

What did you use, @natemccurdy, because that seemed to work well?

natemccurdy commented 7 years ago

@bhilburn I used Recordit

http://recordit.co/

dritter commented 7 years ago

I made my screencasts (in #344) with ScreenFlow for Mac. Worked pretty well.

V1rgul commented 7 years ago

Here's mine (taken with http://www.screentogif.com)

V1rgul commented 7 years ago

realised it's too small without using http://userstyles.org/styles/108591/github-wide so remade it

bhilburn commented 7 years ago

So I really like @V1rgul's most recent gif, a lot, with the exception of the poor rendering of the segment transitions in the right prompt - they aren't as visible on the left. Some users might see that and think it's an issue with P9k rather than realizing it's a limitation of the terminal recorder.

Any thoughts on how to remove that effect? Is there a way to specify a font to render with, by chance? :-/

V1rgul commented 7 years ago

@bhilburn It's a screen recording so you can't change the font afterwards. There's always rendering problems on the right-to-left arrows with any of the monospaced fonts I have :/

V1rgul commented 7 years ago

Ok, so changing my font to a Powerline patched (and adjusted) font found here: https://github.com/daagar/powerline-fonts solved the misaligned left arrow problem.

In the Dejavu Sans Mono for Powerline Book there's already a symbol at 0xf321 which is supposed to be VCS_COMMIT_ICON. What I did was edit the awesome-terminal-fonts here: https://github.com/gabrielelana/awesome-terminal-fonts/blob/master/build.sh#L13 to relocate octicons further. I changed

./scripts/fu-relocate ./fonts/octicons-regular.ttf --save-as='.work/octicons-regular-relocated.ttf' --to='0xf300' 2> /dev/null

to

./scripts/fu-relocate ./fonts/octicons-regular.ttf --save-as='.work/octicons-regular-relocated.ttf' --to='0xf330' 2> /dev/null

Now my arrows are aligned correctly and I can still use the fontconfig icons ;)

gif

bhilburn commented 7 years ago

@V1rgul - That is awesome!! That's definitely the quality of recording we can put on the front-page of the project. I see you already put your config on the Wiki, too!

Check out the new README :)

Excellent work, @V1rgul, and thank you.

MachineTruth commented 7 years ago

Hey V1rgul i love how you did your terminal, i try to get my terminal to do the same i end up messing everything up. I was wondering can you help me get my terminal like that? Thank you