Code Monkey home page Code Monkey logo

vivid-zsh's Introduction

vivid-zsh

vivid LS_COLORS as zsh plugins.

installable anywhere that supports git repositories as plugins.

why do i need this?

simply put, this is faster than calling an external CLI.

benchmark results via hyperfine

Command Mean [ms] Min [ms] Max [ms] Relative
plugin 0.2 ± 0.4 0.0 3.1 1.00
cli 3.8 ± 2.4 1.9 27.3 16.36 ± 27.48
$ hyperfine --shell "zsh" --warmup=5 'vivid_theme=nord source vivid-zsh.plugin.zsh' -n plugin 'export LS_COLORS="$(vivid generate nord)"' -n cli

yes, this is faster than rust. insane.

how do i install this?

it depends on what you are using for managing your zsh plugins.

antidote

  1. add ryanccn/vivid-zsh to your .zsh_plugins.txt
  2. set
    vivid_theme="<name of theme>"
    before antidote load

antigen

  1. antigen bundle ryanccn/vivid-zsh
  2. set
    vivid_theme="<name of theme>"
    in your ~/.zshrc before antigen loads

oh my zsh

  1. clone the repo into the oh my zsh directory
    $ git clone https://github.com/ryanccn/vivid-zsh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/vivid-zsh
  2. add the plugin to your ~/.zshrc
    plugins=(
       # other plugins...
       vivid-zsh
    )
  3. configure vivid_theme="<name of theme>" before oh my zsh is initialized

manual (no plugin manager)

  1. clone the repo
    $ mkdir -p ~/.zsh
    $ git clone https://github.com/ryanccn/vivid-zsh.git ~/.zsh/vivid-zsh
  2. add this to your .zshrc
    vivid_theme="<name of theme>"
    source ~/.zsh/vivid-zsh/vivid-zsh.zsh
  3. restart your shell

how does this work?

  • gets list of themes from vivid
  • gets each theme from vivid
  • puts them in their own zsh file with export LS_COLORS=
  • sources one of them depending on what you set

how do i build themes locally?

  1. install vivid
  2. run ./build.sh

license

mit

vivid-zsh's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vivid-zsh's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.