Giter Site home page Giter Site logo

base16-shell's Introduction

Base16 Shell

A shell script to change your shell's default ANSI colors but most importantly, colors 17 to 21 of your shell's 256 colorspace (if supported by your terminal). This script makes it possible honor the original bright colors of your shell (e.g. bright green is still green and so on) whilst providing the additional base16 colors to applications such as Vim.

Base16 Shell

Use Cases

  • You want to use a *.256.* variant of a Terminal theme designed to honor the original bright colors.
  • You prefer to use a script instead of a terminal emulator theme to color your shell.
  • You use this script to have different colorschemes appear on different SSH sessions.

Installation

git clone https://github.com/chriskempson/base16-shell.git ~/.config/base16-shell

Shells

Bash/ZSH

Firstly, place the following lines in ~/.bashrc or ~/.zshrc:

BASE16_SHELL=$HOME/.config/base16-shell/
[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$($BASE16_SHELL/profile_helper.sh)"

Next, open a new shell and type base16 followed by a tab to perform tab completion.

Base16-Vim Users

the profile_helper will update a ~/.vimrc_background file that will have your current the colorscheme, you just need to source this file in your vimrc: i.e. (remove the base16colorspace line if not needed)

if filereadable(expand("~/.vimrc_background"))
  let base16colorspace=256
  source ~/.vimrc_background
endif

Fish

In config.fish place the following lines:

# Base16 Shell
if status --is-interactive
    eval sh $HOME/.config/base16-shell/scripts/base16-default-dark.sh
end

Troubleshooting

Run the included colortest script and check that your colour assignments appear correct. If your teminal does not support the setting of colours in within the 256 colorspace (e.g. Apple Terminal), colours 17 to 21 will appear blue.

setting 256 colourspace not supported

If colortest is run without any arguments e.g. ./colortest the hex values shown will correspond to the default scheme. If you'd like to see the hex values for a particular scheme pass the file name of the theme as the arguement e.g. ./colortest base16-ocean.sh.

base16-shell's People

Contributors

alecmev avatar andrew-ko avatar blueyed avatar chriskempson avatar danielrs avatar diegs avatar dsapala avatar ghprince avatar hashbang173 avatar johnmorales avatar julio-b avatar klebercode avatar mattaw avatar nawetimebomb avatar nomoon avatar sid-maddy avatar sryze avatar tylerball avatar vassilevsky 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.