This commit is contained in:
Daniel Flanagan 2020-02-12 09:46:01 -06:00
parent bdda9479e5
commit 402e42f584
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
9 changed files with 50 additions and 23 deletions

View file

@ -14,17 +14,19 @@
[core]
editor = nvim
pager = diff-so-fancy | less --tabs=2 -RFX
[http "https://gopkg.in"]
followRedirects = true
[diff]
tool = nvimdiff
tool = cat
[difftool]
prompt = false
[multidiff]
tool = nvimdiff -f
[alias]
d = difftool
s = status
@ -48,12 +50,22 @@
prompt = false
[mergetool "nvimdiff"]
cmd = nvim -d $BASE $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
cmd = nvimdiff $BASE $LOCAL $REMOTE $MERGED -c '$wincmd w' -c '$wincmd J'
[mergetool "cat"]
cmd = cat $BASE $LOCAL $REMOTE $MERGED
[mergetool "echo"]
cmd = echo $BASE $LOCAL $REMOTE $MERGED
[mergetool "vimmultidiff"]
cmd = vim-multi-diff-builder $BASE $LOCAL $REMOTE $MERGED
[pager]
branch = false
# remove ansi codes, pad each file's diff with newlines, show as diff, remove top padding
diff = vimpager -c 'silent %sm/\\e[^mK]*[mK]//g' -c 'silent %s/^diff/\\r\\rdiff/' -c 'silent set ft=diff' -c 'silent execute \"normal gg2dd\"'
# diff = vimpager -c 'silent %sm/\\e[^mK]*[mK]//g' -c 'silent %s/^diff/\\r\\rdiff/' -c 'silent set ft=diff' -c 'silent execute \"normal gg2dd\"'
diff = less
[url "git@github.com:postmates"]
insteadOf = https://github.com/postmates
@ -63,17 +75,3 @@
[gpg]
program = gpg2
[color]
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse

View file

@ -1,3 +1,2 @@
pinentry-program /usr/bin/pinentry-curses
max-cache-ttl 60480000
default-cache-ttl 60480000

View file

@ -110,8 +110,8 @@ function g
end
end
alias gs "git status"
alias gd "git diff"
alias gds "git diff --staged"
alias gd "git d"
alias gds "gd --staged"
# alias gdv "git dv" # TODO: what is this?
alias gpl "git pull"
alias gp "git push"

View file

@ -55,6 +55,7 @@ pacaur --needed -S \
swaks `# SMTP CLI` \
time `# GNU time` \
fortune-mod fortune-mod-archlinux `# Fortune` \
diff-so-fancy `# Fancy Diffs` \
--noconfirm --noedit
# install rxvt-unicode script for resizing font on-the-fly

2
bin/nvimdiff Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env sh
nvim -d "$@"

22
bin/vim-multi-diff-builder Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env sh
td="$(mktemp -p "$pdir" -d "tmp_vim_git_multi_diff.XXXXXXXX")"
trap "rm -rf \"$td\"" EXIT
files="$(git diff --name-only "$@")"
for f in $files; do
d="$(dirname "$td/$f")"
rfn="$(basename "$f")"
fn="$rfn._@HEAD"
cfn="$rfn._@DISK"
mkdir -p "$d"
git --no-pager show HEAD:"$f" > "$d/$fn" 2>/dev/null || \
echo "<NO FILE>" > "$d/$fn"
cp "$f" "$d/$cfn"
nvim -d "$d/$fn" "$d/$cfn"
exit 3
done
ls -R "$td"
rm -rf "$td"

View file

@ -2,6 +2,7 @@
autorandr --change
xrandr --output eDP1 --scale-from 1600x900 --filter nearest --mode 3200x1800
"${DOTFILES_PATH}/apps/de/x/loadresources"
xrdb -merge "$ENV_PATH/x/docked.resources"
"${DOTFILES_PATH}/apps/de/bspwm/rc"
restartbar

View file

@ -3,5 +3,5 @@ dpi: 92
*dpi: 92
Xft.dpi: 92
polybar.display_monitor: DP1
polybar.display_monitor: DP1-1-8
polybar.height: 40

View file

@ -1,4 +1,7 @@
#define mono_font iosevka-lyte
#define bar_font_size 12
#define icon_font Font Awesome 5 Free Solid
#define icon_font_size 12
*.font: xft:Iosevka Nerd Font Mono:pixelsize=12,xft:Noto Emoji,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14
*.boldFont: xft:Iosevka Nerd Font Mono:style=bold:pixelsize=12,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14
@ -13,4 +16,5 @@ Xft.dpi: 190
polybar.height: 70
polybar.display_monitor: eDP1
polybar.primary_font: iosevka-lyte:pixelsize=bar_font_size;1
polybar.primary_font: mono_font:pixelsize=bar_font_size;1
polybar.secondary_font: icon_font:style=Regular:pixelsize=icon_font_size;1