Giter Site home page Giter Site logo

silver's Introduction

silver

A cross-shell customizable powerline-like prompt heavily inspired by Agnoster. The faster rust port of bronze.

How does it work?

Unlike most shell prompts, silver is not written in shell script, but entirely in Rust.

When silver init is run, it outputs shell code that sets your prompt to run silver prompt, which outputs the actual prompt. The silver prompt command relies on environment variables for configuration.

Getting started

Since silver is not written in shell script, it should theoretically be compatible with any shell, but the three supported shells are Bash, Zsh, and fish.

Icons

To be able to use the custom icons (which are enabled by default), you must patch your font or install a pre-patched font from Nerd Fonts.

Installation

From source

  • install and setup Rust
  • run cargo install silver

From pre-compiled binary

  • download a binary on the releases page
  • add binary to PATH environment variable

macOS

On macOS, you will have to do a bit more:

  • install Homebrew
  • run brew install coreutils
  • add alias date="gdate" to your shell rc

Configuration

Now that you have silver installed, you need to configure it. To have your prompt look like the one in the screenshot above, add this to your ~/.bashrc/~/.zshrc:

SILVER=(status:black:white dir:blue:black git:green:black cmdtime:magenta:black)
export SILVER_SHELL=$0 # bash, zsh, or fish

Or add the following to your ~/.config/fish/config.fish:

set SILVER status:black:white dir:blue:black git:green:black cmdtime:magenta:black
set -x SILVER_SHELL fish

Now that silver is configured, you need to evaluate its bootstrap code.

~/.bashrc/~/.zshrc:

eval "$(silver init)"

~/.config/fish/config.fish:

eval (silver init)

Documentation

Documentation is available on the wiki.

Project structure

silver's People

Contributors

andoriyu avatar cuviper avatar eclipseo avatar ignatenkobrain avatar lzybkr avatar messense avatar nobles5e avatar reujab avatar xasx avatar

Watchers

 avatar

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.