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

Addition of a simple bash function #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dungducphan
Copy link

Adding a bash function to quickly choose and change the colorscheme for alacritty.

@Zebradil
Copy link
Contributor

Zebradil commented Jun 8, 2022

Maybe it makes sense to open wiki section and place such snippets there?
I also have something to propose, but it's a bit opinionated:

function chct() (
  local alclr=alacritty-colorscheme
  $alclr list \
    | fzf "$@" --preview "
      $alclr apply {}
      bat --color=always --plain --line-range 52:68 ~/.zshrc
      echo
      exa -l /tmp"
)

This shows a preview window with some colorized output and applies currently selected theme on the fly. Looks like this:

image

@tnagorra
Copy link
Member

@Zebradil It's quite nice to see the preview of the colors but it is indeed quite opinionated.
Not everybody uses zsh and have a .zshrc file. I propose something like this.

alacritty-colorscheme list | fzf "$@" --preview "alacritty-colorscheme apply {}
echo 'Colorscheme yml'
echo
bat --color=always --plain --line-range 1:30 ~/.config/alacritty/colors/{}
echo
echo 'Contents of root'
echo
ls --color"

@Zebradil
Copy link
Contributor

@tnagorra exactly, it won't fit everyone's needs. That's why I'm proposing to open a Wiki in this repo — to be able to collect such kinds of snippets for bash, zsh, fish, or whatever else is used. Adding a bash snippet to the readme could also be helpful for me because I can learn from it and adapt to zsh. But having Wiki open gives more opportunities for people to share their ideas, tips and tricks. Take an example of the fzf's wiki.

@tnagorra
Copy link
Member

@Zebradil Just started the Wiki so that we can add snippets and examples.
https://github.com/toggle-corp/alacritty-colorscheme/wiki

Sorry, it took so long.

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

Successfully merging this pull request may close these issues.

3 participants