diff --git a/.config/git/config b/.config/git/config index c625220..937be6c 100644 --- a/.config/git/config +++ b/.config/git/config @@ -38,6 +38,8 @@ branch = false [grep] lineNumber = true +[log] + date=local [color "status"] added = green @@ -90,9 +92,10 @@ lg = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --graph lo = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --no-merges + lp = log -p --date=local ln = !git --no-pager lo -5 my = lo --author [Jj]anek - standup = lo --since yesterday --author [Jj]anek --all + standup = my --since yesterday --all co-authors = !git log | grep -i Co-Authored | awk '!a[$0]++' when = git for-each-ref --sort=committerdate --format='%(refname:short) * %(authorname) * %(committerdate:relative)' refs/remotes/ # List all branches with their last updates diff --git a/.config/shell/music b/.config/shell/music index 526b372..ed15854 100644 --- a/.config/shell/music +++ b/.config/shell/music @@ -92,6 +92,8 @@ formatsong() { echo "$1" | sed -e 's/\([ ([]\)\(ft\|Ft\|Feat\|featuring\)\([ .]\)/\1feat\3/; s/\([ ([]\)feat /\1feat. /; s/ \((Original Mix)\|(Original)\|(Full Stream)\|.NCS Release.\)//i; + s/ (\(Acoustic\|Live\))/ [\1]/i; + s/ \[\(feat.*\)\]/ (\1)/i; s/ \(\..\{2,4\}\)$/\1/; s/---/ - /; s/^[0-9]\{6\}_//; diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc index 45c1382..9ed1d06 100644 --- a/.config/vifm/vifmrc +++ b/.config/vifm/vifmrc @@ -368,7 +368,7 @@ filextype */ " Displaying pictures in terminal " -" fileviewer *.jpg,*.png shellpic %c +fileviewer *.jpg,*.png shellpic %c " Open all other files with default system programs (you can also remove all " :file[x]type commands above to ensure they don't interfere with system-wide @@ -376,7 +376,7 @@ filextype */ " uncommenting one of lines below will result in ignoring 'vi[x]cmd' option " for unknown file types. " For *nix: -" filetype * xdg-open +filetype * xdg-open " For OS X: " filetype * open " For Windows: diff --git a/.config/yadm/gitconfig b/.config/yadm/gitconfig index f6e2aef..a12c440 100644 --- a/.config/yadm/gitconfig +++ b/.config/yadm/gitconfig @@ -2,4 +2,5 @@ cgit = !yadm cme "config/git:" -- $XDG_CONFIG_HOME/git $CONFIG_SHELLS/git $HOME/.local/bin/scripts/git-* cvim = !yadm cme "config/nvim:" -- $XDG_CONFIG_HOME/nvim/init* cshell = !yadm cme "config/shell:" -- $CONFIG_SHELLS + cf = !yadm cme "bin:" -- $CONFIG_SHELLS/functions $HOME/.local/bin/scripts cbin = !yadm cme "bin:" -- $HOME/.local/bin/scripts diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 472c622..935a2c2 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -13,7 +13,7 @@ fi 2>/dev/null || return 0 # source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" #fi -export PATH=$HOME/.local/bin/scripts:$HOME/.local/bin:$PATH:/opt/android/sdk/platform-tools:$XDG_CONFIG_HOME/emacs/bin +export PATH=$HOME/.local/bin/scripts:$HOME/.local/bin:$PATH:/opt/android-sdk/platform-tools:$XDG_CONFIG_HOME/emacs/bin:$XDG_DATA_HOME/gem/ruby/2.7.0/bin export CONFIG_ZSH="$XDG_CONFIG_HOME/zsh" export CONFIG_SHELLS="$XDG_CONFIG_HOME/shell" diff --git a/.local/bin/scripts/dif b/.local/bin/scripts/dif index 2287416..72f414d 100755 --- a/.local/bin/scripts/dif +++ b/.local/bin/scripts/dif @@ -1,4 +1,6 @@ #!/bin/sh set -o pipefail # interactive diff with pagination -diff --color=always --report-identical-files -U 2 "$@" | diffr --colors refine-added:none:background:0x33,0x66,0x33:bold --colors added:none:background:0x33,0x44,0x33 --colors refine-removed:none:background:0x66,0x33,0x33:bold --colors removed:none:background:0x44,0x33,0x33 | less --RAW-CONTROL-CHARS --quit-on-intr +diff --color=always --report-identical-files -U 2 "$@" | + diffr --colors refine-added:none:background:0x33,0x66,0x33:bold --colors added:none:background:0x33,0x44,0x33 --colors refine-removed:none:background:0x66,0x33,0x33:bold --colors removed:none:background:0x44,0x33,0x33 | + less --RAW-CONTROL-CHARS --quit-on-intr --quit-if-one-screen diff --git a/.local/bin/scripts/git-cdiff b/.local/bin/scripts/git-cdiff index d33e005..09041fe 100755 --- a/.local/bin/scripts/git-cdiff +++ b/.local/bin/scripts/git-cdiff @@ -1,5 +1,5 @@ #!/bin/sh # create a diff of diffs - https://stackoverflow.com/a/23527631 -dif "${@:3}" <(git show $1) <(git show $2) +#dif "${@:3}" <(git show $1) <(git show $2) -#git range-diff $1~..$1 $2~..$2 "${@:3}" +git range-diff $1~..$1 $2~..$2 "${@:3}" diff --git a/.local/bin/scripts/st-diff b/.local/bin/scripts/st-diff index 0540bd8..325422c 100755 --- a/.local/bin/scripts/st-diff +++ b/.local/bin/scripts/st-diff @@ -1,7 +1,6 @@ #!/bin/sh -set -e - dif "$(st-unarchive "$1")" "$@" +test "$?" -eq "2" && exit 1 echo "y to restore" read answer test "$answer" = "y" && st-restore "$1" || exit 0 diff --git a/.local/bin/scripts/st-unarchive b/.local/bin/scripts/st-unarchive index 9497943..9ddf3d6 100755 --- a/.local/bin/scripts/st-unarchive +++ b/.local/bin/scripts/st-unarchive @@ -1,2 +1,13 @@ #!/bin/sh -echo "$1" | cut -d'/' -f3- | sed 's/[[:digit:]]\+\.//' +echo "$1" | + sed 's|\.sync/Archive/\(.\+\)\.[[:digit:]]\+|\1|; + s|\.sync/Archive/||; + s|\.stversions/\(.*\)~[[:digit:]]\+-[[:digit:]]\+|\1|; + s|\.sync-conflict-[[:digit:]]\+-[[:digit:]]\+-[[:alnum:]]\+||' + +# TESTING +# echo "1-projects/.sync/Archive/meetings.1.txt +# 1-projects/.sync/Archive/meetings.txt +# data/.stversions/meeting~2020-01 +# meeting.sync-conflict-2021-1925-P5K +# meeting.sync-conflict-2021-1925-PRK.txt" | diff --git a/.zprofile b/.zprofile index d1a019b..91058a6 100644 --- a/.zprofile +++ b/.zprofile @@ -39,7 +39,7 @@ test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so$ # enable pass extensions export PASSWORD_STORE_ENABLE_EXTENSIONS="true" # fzf defaults -export FZF_DEFAULT_OPTS='--select-1 --exit-0 --tiebreak=end,length --history=/var/tmp/fzf-history --ansi --bind="alt-enter:execute(test -O {} && $EDITOR {} || sudoedit {}),del:execute(gio trash {}),change:top,left-click:execute(xdg-open {})"' +export FZF_DEFAULT_OPTS='--select-1 --exit-0 --tiebreak=end,length --history=/var/tmp/fzf-history --ansi --bind="alt-enter:execute(test -O {} && $EDITOR {} || sudoedit {}),alt-bspace:execute(gio trash {}),change:top,double-click:execute(xdg-open {})"' FD_BASE="fd --hidden --color=always --no-ignore-vcs" export FZF_DEFAULT_COMMAND="$FD_BASE --type file" export FZF_CTRL_T_COMMAND="$FD_BASE -d 7"