Skip to content

Commit 7f91125

Browse files
authored
Simplify delta theme configuration (#57)
`Delta` now automatically detects light/dark theme based on the terminal background color. This change was done in dandavison/delta#1615 and released in `0.17.0`. This means that the git config theme detection can be significantly simplified. Another benefit is that it now works across different systems which don't use `gsettings` (WSL, Windows, etc.).
1 parent d91b772 commit 7f91125

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

home/dot_config/git/config.tmpl

+2-11
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
[core]
213213
editor = nano
214214
excludesfile = ~/.config/git/ignore
215-
pager = delta --features="$(case $(echo $(gsettings get org.gnome.desktop.interface gtk-theme) | tr '[:upper:]' '[:lower:]') in *dark*) echo dark-mode ;; *) echo light-mode ;; esac)"
215+
pager = delta
216216
commitGraph = true
217217

218218
[init]
@@ -221,7 +221,7 @@
221221

222222
[interactive]
223223
singlekey = true
224-
diffFilter = delta --color-only --features="interactive $(case $(echo $(gsettings get org.gnome.desktop.interface gtk-theme) | tr '[:upper:]' '[:lower:]')" in *dark*) echo dark-mode ;; *) echo light-mode ;; esac)"
224+
diffFilter = delta --color-only
225225

226226
[log]
227227
abbrevCommit = true
@@ -354,12 +354,3 @@
354354
navigate = true
355355
side-by-side = true
356356
true-color = always
357-
358-
[delta "interactive"]
359-
keep-plus-minus-markers = false
360-
361-
[delta "light-mode"]
362-
light = true
363-
364-
[delta "dark-mode"]
365-
dark = true

0 commit comments

Comments
 (0)