Skip to content

Commit 473b1b8

Browse files
committed
Add $SOBOLE_SYNTAX_THEME
1 parent 1457acc commit 473b1b8

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ Here's the [official docs](https://github.com/robbyrussell/oh-my-zsh/wiki/Custom
5050

5151
`virtualenv`, `git`, `ls`, `grep`, `fzf`, syntax highlight, autocomplete colors, pretty error codes, different users, different color modes.
5252

53+
This theme also exports `$SOBOLE_SYNTAX_THEME` variable with either `'GitHub'` for light mode or `'Drakula'` to be used with tools like `bat` or `delta`.
54+
5355

5456
## Configuration
5557

@@ -67,6 +69,8 @@ This theme supports several configuration options, which are provided as `env` v
6769

6870
![sobole-syntax-highlighting-showcase](https://raw.githubusercontent.com/sobolevn/sobole-zsh-theme/master/showcases/highlighting-tweaks.png)
6971

72+
If this setting is set to `'false'`, then `$SOBOLE_SYNTAX_THEME` is not exported.
73+
7074
`$SOBOLE_FZF_THEME` - tweaks `fzf` theme if it installed. Set it to `'false'` if you do not want these tweaks. That's how it looks like:
7175

7276
![sobole-syntax-highlighting-showcase](https://raw.githubusercontent.com/sobolevn/sobole-zsh-theme/master/showcases/fzf-tweaks.png)

docs/index.html

+12-1
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,23 @@ <h3>Still not convinced? Look at the showcase!</h3>
6969
<div class="image-wrapper">
7070
<img
7171
class="image-switchable"
72-
src="https://raw.githubusercontent.com/sobolevn/sobole-zsh-theme/master/showcases/env-and-user.plugin"
72+
src="https://raw.githubusercontent.com/sobolevn/sobole-zsh-theme/master/showcases/env-and-user.png"
7373
data-src="https://raw.githubusercontent.com/sobolevn/sobole-zsh-theme/master/showcases/env-and-user-dark.png"
7474
>
7575
</div>
7676
</div>
7777

78+
<div class="showcase">
79+
<p class="showcase-title"><code>fzf</code> theme</p>
80+
<div class="image-wrapper">
81+
<img
82+
class="image-switchable"
83+
src="https://raw.githubusercontent.com/sobolevn/sobole-zsh-theme/master/showcases/fzf-tweaks.png"
84+
data-src="https://raw.githubusercontent.com/sobolevn/sobole-zsh-theme/master/showcases/fzf-tweaks-dark.png"
85+
>
86+
</div>
87+
</div>
88+
7889
</div>
7990
</section>
8091

showcases/fzf-tweaks-dark.png

378 KB
Loading

sobole.zsh-theme

+6
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ if [[ "$SOBOLE_SYNTAX_HIGHLIGHTING" != 'false' ]]; then
163163
if [[ "$SOBOLE_THEME_MODE" == 'dark' ]]; then
164164
ZSH_HIGHLIGHT_STYLES[path]='fg=white,underline'
165165
fi
166+
167+
if [[ "$SOBOLE_THEME_MODE" == 'dark' ]]; then
168+
export SOBOLE_SYNTAX_THEME=Dracula
169+
else
170+
export SOBOLE_SYNTAX_THEME=GitHub
171+
fi
166172
fi
167173

168174
# ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)