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

[FEAT] animated logos #1423

Closed
acxz opened this issue Dec 1, 2024 · 10 comments
Closed

[FEAT] animated logos #1423

acxz opened this issue Dec 1, 2024 · 10 comments
Labels
question The issue is a question or a discussion

Comments

@acxz
Copy link

acxz commented Dec 1, 2024

Be sure to read FAQ before submitting a new issue.

Wanted features:

Right now we support static logos of various formats. It would be wonderful to support animated logos such as .gif files.

Motivation:

The motivation here is that I have a shell script, pokeshell, which supports the output of both static and animated images to the terminal via chafa. I can pipe the static output just fine with pokeshell pikachu | fastfetch --file-raw -, but pokeshell -a pikachu | fastfetch --file-raw - just clears the current terminal screen. (i.e. pikachu.gif | fastfetch --file-raw -)

pokeshell pikachu | fastfetch --file-raw -:
image

Here is the animated file that I would like to show in fastfetch:
pikachu.gif

How it looks by itself:

pokeshell_pikachu.mp4

And when trying to use the file with fastfetch:
image

@acxz acxz added the enhancement New feature or request label Dec 1, 2024
@CarterLi
Copy link
Member

CarterLi commented Dec 2, 2024

gifs only work with iTerm image protocol. In WSL2, you may install Wezterm inside Linux and use

{
  "logo": {
    "padding": {
      "top": 2
    },
    "source": "/path/to/pikachu.gif",
    "type": "iterm",
    "width": 20
  }
}
2024-12-02.08.53.11.mov

@CarterLi CarterLi added question The issue is a question or a discussion and removed enhancement New feature or request labels Dec 2, 2024
@CarterLi
Copy link
Member

CarterLi commented Dec 2, 2024

How it looks by itself:

I assume the program supports the animation by drawing every frame manually. This method doesn't work with fastfetch because fastfetch exits immediately after all modules are printed.

@CarterLi CarterLi closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2024
@CarterLi
Copy link
Member

CarterLi commented Dec 2, 2024

I tested your script and confirmed your script keeps running if I enables animation mode. You may take a look at the iterm image protocol which provides much higher resolution and is much simpler to use.

@acxz
Copy link
Author

acxz commented Dec 2, 2024

I didn't think to check iterm... Thanks for that. Is there no plan to support other animation protocols, like kitty or with native chafa output (via redrawing fastfetch output, maybe)?

@acxz
Copy link
Author

acxz commented Dec 2, 2024

The script actually uses chafa or timg, both of which have support for iterm. I'm testing with a limited character set right now.

@CarterLi
Copy link
Member

CarterLi commented Dec 2, 2024

Is there no plan to support other animation protocols, like kitty or with native chafa output (via redrawing fastfetch output, maybe)?

No plan. Fastfetch is designed to exit as fast as possible. Redrawing is not an option here.

native chafa output

chafa is not an image protocol. It just print regular texts.

@acxz
Copy link
Author

acxz commented Dec 2, 2024

also side note, in the config file could I list an arbritary command that outputs a filename? i.e. say if I had a pokeshell --filename pikachu which outputs ~/.cache/pokeshell/pikachu.gif.
Could I do "source": "pokeshell --filename pikachu"?

@acxz
Copy link
Author

acxz commented Dec 2, 2024

Does kitty require redrawing? I thought it was more similar to iterm in that regards?

@CarterLi
Copy link
Member

CarterLi commented Dec 2, 2024

Could I do "source": "pokeshell --filename pikachu"?

You may use command substitution. For example "source": "$(pokeshell --filename pikachu)"

See also https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options

@CarterLi
Copy link
Member

CarterLi commented Dec 2, 2024

Does kitty require redrawing? I thought it was more similar to iterm in that regards?

Kitty has its own animation protocol that I didn't investigate. I tested this command with 0.37.0 and it works for me

kitten icat -n --align left ~/pikachu.gif | fastfetch --raw -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue is a question or a discussion
Projects
None yet
Development

No branches or pull requests

2 participants