• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
    Shell
  • License
    Other
  • Created about 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Base16 for Shells

Base16 Shell

See the Base16 repository for more information. These scripts were built with Base16 Builder PHP.

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 to honor the original bright colors of your shell (e.g. bright green is still green and so on) while providing 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

Configuration

We're going to use the example theme of base16_default for the following instructions. Replace with your desired theme.

Once you have got base16 setup you can try applying themes in your shell by typing base16_, letting autocomplete show you the options, then executing the theme you want to try.

Bash/ZSH

Add following lines to ~/.bashrc or ~/.zshrc:

# Base16 Shell
BASE16_SHELL="$HOME/.config/base16-shell/"
[ -n "$PS1" ] && \
    [ -s "$BASE16_SHELL/profile_helper.sh" ] && \
        source "$BASE16_SHELL/profile_helper.sh"
        
base16_default

If you're using ZSH + plug

You won't need to do the git clone above. Add the below commands to your ~/.zshrc instead. (This will likely work for other plugin managers too).

# before `zplug load`
zplug chriskempson/base16-shell, from:github

# after `zplug load`
base16_materia

Fish

Add following lines to ~/.config/fish/config.fish:

# Base16 Shell
if status --is-interactive
    set BASE16_SHELL "$HOME/.config/base16-shell/"
    source "$BASE16_SHELL/profile_helper.fish"
end

base16_materia

Base16-Vim Users

the BASE16_THEME environment variable will set to your current colorscheme, you just need to add the following to your vimrc: i.e. (remove the base16colorspace line if not needed)

if exists('$BASE16_THEME')
      \ && (!exists('g:colors_name') || g:colors_name != 'base16-$BASE16_THEME')
    let base16colorspace=256
    colorscheme base16-$BASE16_THEME
endif

tmux users

Add the following line to ~/.tmux.config to passthrough color escape sequences. (As of version 3.3 the passthrough of escape sequences is turned off by default)

set -g allow-passthrough 1

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.

Inverted blacks and whites

This is the expected behaviour when using a light theme: https://github.com/chriskempson/base16-shell/issues/150

More Repositories

1

tomorrow-theme

Tomorrow Theme
CSS
13,672
star
2

base16

Not a theme, but a framework
459
star
3

vim-tomorrow-theme

Tomorrow Theme for Vim
Vim Script
284
star
4

base16-vim

Base16 for Vim
Vim Script
117
star
5

textmate-tomorrow-theme

59
star
6

base16-schemes-source

46
star
7

base16-templates-source

A common list of templates for base16-builders
45
star
8

japanese-subtitles-word-kanji-frequency-lists

A word frequency list derived from subtitles from Japanese drama, anime and films.
28
star
9

portable-humble-little-ruby-book

Mr. Neighborly's Humble Little Ruby Book in ePub and Mobi Format
23
star
10

jekyll-emoji

A jekyll plug-in that provides a Liquid filter for emojifying text with https://github.com/github/gemoji. See http://www.emoji-cheat-sheet.com for a full listing of emoji codes.
Ruby
22
star
11

netflix-study-assist

Helps studying a language with Netflix (especially Japanese).
JavaScript
19
star
12

coda-textMate-theme

A TextMate Theme
17
star
13

bushu-anki-deck

Forget the Kanji, remember the Radicals!
16
star
14

base16-default-schemes

The default set of original base16 colours
14
star
15

anime-dl

Download Japanese media with Japanese subtitles
PHP
14
star
16

netcrafter

Minimalist, handcrafted, optionally static, HTML websites.
PHP
13
star
17

base16-builder-php

A PHP implementation of a Base16 Builder
PHP
10
star
18

base16-iterm2

Base16 for iTerm2
9
star
19

base16-textmate

Base16 for TextMate & Sublime
Mustache
8
star
20

tmux-session-manager

Tmux Session Manager in Ruby
Ruby
7
star
21

cpp-connect-four

A game of Connect Four created in C++ with (SDL) Simple DirectMedia Layer.
C++
6
star
22

Ditz-for-Ruby-1.9.2

Just Ditz 0.5 with a few tweaks for Ruby 1.9.2
Ruby
6
star
23

base16-templates

5
star
24

cpp-tic-tac-toe

A game of Tic-Tac-Toe created in C++ with (SDL) Simple DirectMedia Layer.
C++
5
star
25

windows-capslock-key-japanese-input-toggle

Toggle Japanese input with the Caps Lock key and a non-Japanese keyboard
4
star
26

wordpress-editables

Editable Areas for WordPress Developers
PHP
4
star
27

panelsort

A jQuery plugin for sorting elements through a dynamically generated overview panel
JavaScript
3
star
28

erin-dl

Download videos and subtitles from https://www.erin.ne.jp/
PHP
3
star
29

textmate-project-rsync

Texmate Project Rsync
2
star
30

base16-html-previews

HTML Previews for base16
HTML
2
star
31

base16-language-examples

Code examples for scheme and template authors
HTML
1
star
32

php-class-loader

A lightweight class loader that conforms to the PSR-0 standard
1
star
33

kogata

A PHP 5 Gluing Framework
PHP
1
star
34

os-x-palette-tomorrow-theme

1
star
35

iterm-2-tomorrow-theme

Tomorrow Theme for iTerm 2
1
star
36

base16-builders

1
star
37

base16-unclaimed-schemes

A collection of themes that have no repositories for homes :(
1
star
38

retimed-japanese-subtitles

Just a few Japanese subtitles I have retimed.
1
star