Default colorschemes for light terminals
Hi! I just found this tool and it would be super nice if there was a way to use it for terminals with a light background color (e.g. solarized light). I'm just hoping there's a quick way to provide a dark colorscheme by default.
Thanks alot for making this!
Thank you for the feedback.
Yes, there should be a way to easily configure the highlighting theme (see also #1).
In the meantime, you could try to do this (see "Customization" section in the README):
# Get theme
mkdir -p ~/.config/bat/themes
cd ~/.config/bat/themes
git clone https://github.com/braver/Solarized
ln -sf "Solarized/Solarized (light).tmTheme" Default.tmTheme
# Get language definition files
mkdir -p ~/.config/bat/syntaxes
cd ~/.config/bat/syntaxes
git clone https://github.com/sublimehq/Packages/
rm -rf Packages/Markdown
git clone https://github.com/jonschlinkert/sublime-markdown-extended
# Initialize cache
bat cache --init
Wow thank you this worked perfectly :smiley:
Thanks! Tried this, two errors with the 0.2.3 binary Mac release:
- Init-cache seems to use ~/L/P/bat, not .config?
⋊> ~ bat init-cache 10:09:20
[bat error]: Could not load themes from '/Users/nevyn/Library/Preferences/bat/themes'
- Tried remedying with
ln -s ~/.config/bat/themes ~/Library/Preferences/bat/themes. Now I no longer have syntax highlighting, everything's rendering gray o_O
Init-cache seems to use ~/L/P/bat, not .config?
On macOS - yes. I should update this in the README.
Tried remedying with ln -s ~/.config/bat/themes ~/Library/Preferences/bat/themes. Now I no longer have syntax highlighting, everything's rendering gray o_O
You can always reset everything by removing the cache folder (~/Library/Caches/bat).
Even without customization, you should now be able to use
bat --theme="Monokai Extended Light" README.md
In the script described above, I had to replace ~/.config/bat/syntax by ~/.config/bat/syntaxes, as described in the README.
@pylipp Thanks. I have adapted my comment above.
For anyone coming here and cloning the braver/Solarized repo, note that they’ve converted to sublime-theme format. You can clone the older tmTheme version by git checkout 87e01090cf after you clone the repo.
Another way of handing what @jeffbyrnes brings up: git checkout -b b1.6.0 1.6.0 that way you use the tag they have in the repo.
bat cache --init no longer works and should be replaced by bat cache --build
A solarized light theme is now available in the standard install and can be used with --theme="Solarized (light)".