Apply onedark colorscheme to your fish shell terminal with set_onedark
command.
It is similar to fish-vimcolor, but set_onedark
also overwrites the terminal's color palette, text color, or background color (This process is based on base16-shell).
fisher rkbk60/onedark-fish
Add following lines to ~/.confing/fish/config.fish
:
if status is-interactive
set -l onedark_options '-b'
if set -q VIM
# Using from vim/neovim.
set onedark_options "-256"
else if string match -iq "eterm*" $TERM
# Using from emacs.
function fish_title; true; end
set onedark_options "-256"
end
set_onedark $onedark_options
end
You can overwrite color definition with set_onedark_color
:
# change 'brblue' color.
set_onedark_color brblue 529CFA 69
# make 256 color closer to default 24bit color.
set_onedark_color bryellow default 222
set_onedark_color brcyan default 80
# you must execute 'set_onedark' to apply change.
set_onedark -b -256
Name: set_onedark - Apply onedark colorscheme to your terminal.
Usage:
set_onedark [options]
Options
-256, --use-256-color use 256 color
-b, --set-background set background color
-h, --help show this help message
Name: set_onedark_color - Define color for onedark
Usage:
set_onedark_color COLOR RGB-HEX INDEX-256
set_onedark_color [-h|--help]
Arguments:
COLOR
Target color name that can use builtin 'set_color'.
(Ex: black green brmagenta brwhite ...)
RGB-HEX
24bit RGB color code, like 'a3ff00', '0C060F'.
It can use full size only, cannot use short style like '88D'.
If you want not to change value, then set 'current',
or you want to use preset value, then set 'default'.
INDEX-256
Index of 256 color, in the range from 16 to 255.
If you want not to change value, then set 'current',
or you want to use preset value, then set 'default'.
Examples:
Define custom black color:
$ set_onedark_color black 0a0400 231
Overwrite only white 256 color index:
$ set_onedark_color white current 255
Color name | Default | 256 color | Using on commandline as ($fish_color_ ) |
---|---|---|---|
black(0) | #282C34 | 235 (#262626, Lv4) | (terminal background) |
red(1) | #BE5046 | 196 (#FF0000, r5:g0:b0) | |
green(2) | #699959 | 71 (#5FAF5F, r1:g3:b1) | |
yellow(3) | #D19A66 | 173 (#D7AF5F, r4:g3:b1) | |
blue(4) | #2E6399 | 25 (#005FAF, r0:g1:b3) | search-match(background) |
magenta(5) | #991BA6 | 90 (#AF00AF, r2:g0:b2) | |
cyan(6) | #23878C | 30 (#005F5F, r0:g2:b2) | |
white(7) | #ABB2BF | 145 (#AFAFAF, r3:g3:b3) | base foreground color |
brblack(8) | #5C6370 | 59 (#5F5F5F, r1:g1:b1) | comment, selection(background) |
brred(9) | #E06C75 | 204 (#FF5F87, r5:g1:b2) | error, param, cwd |
brgreen(10) | #98C379 | 114 (#87D787, r2:g4:b2) | quote, pager-prefix, user |
bryellow(11) | #E5C07B | 180 (#D7AF87, r4:b3:g2) | |
brblue(12) | #61AFEF | 39 (#00AFFF, r0:g3:b5) | host |
brmagenta(13) | #C678DD | 170 (#D75FD7, r4:g1:b4) | command, operator |
brcyan(14) | #56B6C2 | 38 (#00AFD7, r0:g3:b4) | redirection, match, escape, history-current |
brwhite(15) | #CFD7E6 | 253 (#DADADA, Lv22) |
green/blue/magenta/cyan are defined for this plugin. The other colors are matched one that defined on original atom onedark or onedark.vim.
- add completions
- add function to overwrite color definition
- add option to
set_onedark
to use 256 color - add option to overweite colors with each saturation level (for chromatic) or brightness level (for monochromatic)
- make dark or bright green/blue/magenta/cyan