Skip to content

Commit

Permalink
Update git-delta, VS Code and Sublime to automatically adjust the col…
Browse files Browse the repository at this point in the history
…or theme, add Dunkel.tmTheme.
  • Loading branch information
cpojer committed Sep 20, 2022
1 parent a613740 commit adde6c9
Show file tree
Hide file tree
Showing 13 changed files with 1,539 additions and 45 deletions.
742 changes: 742 additions & 0 deletions config.symlink/bat/themes/Dunkel.tmTheme

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions config.symlink/fish/config.fish
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set -gx PATH /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt $HOME/.home/bin /usr/local/sbin $HOME/.cargo/bin $PATH
set -gx PATH /opt/homebrew/bin /opt/homebrew/sbin $HOME/.home/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt /usr/local/sbin $HOME/.cargo/bin $PATH
set -Ux EDITOR vim
source ~/.iterm2_shell_integration.fish

Expand Down Expand Up @@ -27,10 +27,6 @@ if type -q exa
abbr --add lt 'exa -al --icons --no-user --no-time --tree -L2'
end

if type -q bat
abbr --add cat bat
end

set fish_color_cwd '3d87f5'
set fish_color_search_match --background='C2E8FF'
set fish_color_escape 4271ae
Expand Down
1 change: 0 additions & 1 deletion config.symlink/fish/fish_plugins
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
jorgebucaran/fisher
jethrokuan/z
38 changes: 15 additions & 23 deletions config.symlink/fish/fish_variables
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ SETUVAR Z_EXCLUDE:\x5e/Users/cpojer\x24
SETUVAR __fish_initialized:3400
SETUVAR _fish_abbr_am:git\x20amend
SETUVAR _fish_abbr_c:code\x20\x2e
SETUVAR _fish_abbr_cat:bat
SETUVAR _fish_abbr_g:git
SETUVAR _fish_abbr_gb:git\x20br\x20cnakazawa/
SETUVAR _fish_abbr_gbr:git\x20br
Expand All @@ -28,33 +27,26 @@ SETUVAR _fish_abbr_map:xargs\x20\x2dn1
SETUVAR _fish_abbr_nsize:du\x20\x2dsh\x20\x2e/node_modules/\x2a\x20\x7c\x20sort\x20\x2dnr\x20\x7c\x20grep\x20\x22\x5cdM\x2e\x2a\x22
SETUVAR _fish_abbr_o:open
SETUVAR _fish_abbr_p:pnpm
SETUVAR fish_color_autosuggestion:8e908c
SETUVAR fish_color_cancel:normal
SETUVAR fish_color_command:8959a8
SETUVAR fish_color_comment:eab700
SETUVAR fish_color_cwd:3d87f5
SETUVAR fish_color_cwd_root:800000
SETUVAR fish_color_end:8959a8
SETUVAR fish_color_error:c82829
SETUVAR fish_color_escape:4271ae
SETUVAR fish_color_history_current:normal
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:blue
SETUVAR fish_color_comment:red
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:green
SETUVAR fish_color_error:brred
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_match:normal
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:4271ae
SETUVAR fish_color_param:4271ae
SETUVAR fish_color_quote:718c00
SETUVAR fish_color_redirection:3e999f
SETUVAR fish_color_search_match:\x2d\x2dbackground\x3dC2E8FF
SETUVAR fish_color_selection:c0c0c0
SETUVAR fish_color_param:cyan
SETUVAR fish_color_quote:yellow
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:green
SETUVAR fish_color_valid_path:normal
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di
SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR fish_user_paths:/opt/homebrew/bin
10 changes: 5 additions & 5 deletions config.symlink/fish/functions/__z.fish
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ function __z -d "Jump to a recent directory."
printf "%-10s %s\n", matches[x], x | cmd
}
}
if( common ) {
printf "%-10s %s\n", "common:", common > "/dev/stderr"
}
} else {
if( common ) best_match = common
print best_match
Expand Down Expand Up @@ -157,8 +154,11 @@ function __z -d "Jump to a recent directory."
if set -q _flag_echo
printf "%s\n" "$target"
else if set -q _flag_directory
# Be careful, in msys2, explorer always return 1
if test "$OS" = Windows_NT
if test -n "$ZO_METHOD"
type -q "$ZO_METHOD"; and "$ZO_METHOD" "$target"; and return $status
echo "Cannot open with ZO_METHOD set to $ZO_METHOD"; and return 1
else if test "$OS" = Windows_NT
# Be careful, in msys2, explorer always return 1
type -q explorer; and explorer "$target"
return 0
echo "Cannot open file explorer"
Expand Down
2 changes: 1 addition & 1 deletion config.symlink/fish/functions/__z_add.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function __z_add -d "Add PATH to .z file"
set -q fish_private_mode; and return 0
test -n "$fish_private_mode"; and return 0

for i in $Z_EXCLUDE
if string match -r $i $PWD >/dev/null
Expand Down
4 changes: 0 additions & 4 deletions config.symlink/fish/functions/__z_complete.fish
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
function __z_complete -d "add completions"
function __z_marks
printf "%s\n" (string replace -r '\|.*' '' < $Z_DATA)
end

complete -c $Z_CMD -a "(__z -l | string replace -r '^\\S*\\s*' '')" -f -k
complete -c $ZO_CMD -a "(__z -l | string replace -r '^\\S*\\s*' '')" -f -k

Expand Down
3 changes: 3 additions & 0 deletions config.symlink/fish/functions/bat.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function cat --description 'Use bat instead of cat'
bat --theme=(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo Dunkel || echo Licht) $argv
end
23 changes: 20 additions & 3 deletions git/gitconfig.symlink
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
[core]
excludesfile = ~/.gitignore-global
autocrlf = input
pager = delta
pager = delta --features "$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo dunkel-theme || echo licht-theme)"
[log]
date = relative
[push]
default = current
autoSetupRemote = true
[branch]
autosetuprebase = always
[remote "origin"]
Expand All @@ -29,7 +30,7 @@
defaultBranch = main
[interactive]
diffFilter = delta --color-only
[delta]
[delta "licht-theme"]
light = true
side-by-side = true
file-style = "bold #111111"
Expand All @@ -50,9 +51,25 @@
bold blue => syntax "#e5dff6", \
bold cyan => syntax "#d8fdf6", \
bold yellow => syntax "#f4ffe0"
[delta "dunkel-theme"]
light = false
side-by-side = true
file-style = "bold #c8c8c8"
file-decoration-style = "#c8c8c8 ul"
grep-file-style = "bold #c8c8c8"
grep-line-number-style = "#adadad"
hunk-header-decoration-style = "#adadad ul ol"
hunk-header-line-number-style = "#c8c8c8"
line-numbers = true
line-numbers-left-style = "#adadad"
line-numbers-right-style = "#adadad"
line-numbers-zero-style = "#adadad"
navigate = true
syntax-theme = Dunkel
tabs = 2
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
[add.interactive]
useBuiltin = false
useBuiltin = false
Loading

0 comments on commit adde6c9

Please sign in to comment.