dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

commit 1b95d520fe4d490800635153c764bcbb001f772c
parent 196100ea661784d3147367d85ccb8a0dd1065207
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date:   Sun, 25 Jun 2023 03:37:25 +0530

Add ctags setup to git hooks

...following tpope's recommended ctags setup

Fix continuum issues in `irc`

Support multi key pass repo in `pofs`

Remove all the vim/pack submodules. They are extremely difficult to
maintain.

Diffstat:
M.config/git/config | 3++-
A.config/git/template/hooks/ctags | 5+++++
A.config/git/template/hooks/post-checkout | 2++
A.config/git/template/hooks/post-commit | 2++
A.config/git/template/hooks/post-merge | 2++
A.config/git/template/hooks/post-rewrite | 4++++
M.gitmodules | 78------------------------------------------------------------------------------
M.local/bin/sh/ci | 2+-
M.local/bin/sh/irc | 10+++++++---
M.local/bin/sh/pofs | 2+-
D.local/share/nvim/pack/dev/opt/nvim-dap | 1-
D.local/share/nvim/pack/dev/opt/nvim-dap-ui | 1-
D.local/share/nvim/pack/dev/opt/nvim-lspconfig | 1-
D.local/share/nvim/pack/general/start/nvim-comment | 1-
D.local/share/vim/pack/dev/opt/clang_complete | 1-
D.local/share/vim/pack/dev/opt/swift.vim | 1-
D.local/share/vim/pack/dev/opt/tagbar | 1-
D.local/share/vim/pack/dev/opt/vim-cmake | 1-
D.local/share/vim/pack/dev/opt/vim-msbuild | 1-
D.local/share/vim/pack/dev/opt/vim-xcode | 1-
D.local/share/vim/pack/dev/opt/vimspector | 1-
D.local/share/vim/pack/dev/opt/xcodebuild.vim | 1-
D.local/share/vim/pack/general/opt/vim-better-whitespace | 1-
D.local/share/vim/pack/general/opt/vim-commentary | 1-
D.local/share/vim/pack/general/opt/vim-maildir | 1-
D.local/share/vim/pack/general/opt/vim-ninja-feet/birck.vim | 1-
D.local/share/vim/pack/general/opt/vim-ninja-feet/mru | 1-
D.local/share/vim/pack/general/opt/vim-ninja-feet/vim-fugitive | 1-
D.local/share/vim/pack/general/opt/vim-ninja-feet/vim-ninja-feet | 1-
D.local/share/vim/pack/general/opt/vim-ninja-feet/vim-tmux-navigator | 1-
D.local/share/vim/pack/general/opt/vim-ninja-feet/vim-unimpaired | 1-
D.local/share/vim/pack/general/start/fzf.vim | 1-
D.local/share/vim/pack/general/start/gitignore | 1-
D.local/share/vim/pack/general/start/vim-checklist | 1-
D.local/share/vim/pack/general/start/vim-dispatch | 1-
D.local/share/vim/pack/general/start/vim-minisnip | 1-
D.local/share/vim/pack/general/start/vim-pbxproj | 1-
D.local/share/vim/pack/general/start/vim-repeat | 1-
D.local/share/vim/pack/general/start/vim-submode | 1-
D.local/share/vim/pack/general/start/vim-surround | 1-
D.local/share/vim/pack/general/start/vim-vinegar | 1-
D.local/share/vim/pack/ui/opt/gruvbox-material | 1-
42 files changed, 26 insertions(+), 116 deletions(-)

diff --git a/.config/git/config b/.config/git/config @@ -28,6 +28,7 @@ suir = submodule update --init --recursive wt = worktree wta = worktree add + ctags = !.git/hooks/ctags [push] autoSetupRemote = true @@ -40,4 +41,4 @@ templatedir = ~/.config/git/template [include] - path = config.user + path = ~/.config/git/user diff --git a/.config/git/template/hooks/ctags b/.config/git/template/hooks/ctags @@ -0,0 +1,5 @@ +#!/bin/sh -e + +trap 'rm -f "$$.tags"' EXIT +ctags -f"$$.tags" $(git ls-files) +mv "$$.tags" "tags" diff --git a/.config/git/template/hooks/post-checkout b/.config/git/template/hooks/post-checkout @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/.config/git/template/hooks/post-commit b/.config/git/template/hooks/post-commit @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/.config/git/template/hooks/post-merge b/.config/git/template/hooks/post-merge @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/.config/git/template/hooks/post-rewrite b/.config/git/template/hooks/post-rewrite @@ -0,0 +1,4 @@ +#!/bin/sh +case "$1" in + rebase) exec .git/hooks/post-merge ;; +esac diff --git a/.gitmodules b/.gitmodules @@ -1,52 +1,4 @@ [submodule ".local/share/vim/pack/general/opt/vim-better-whitespace"] - path = .local/share/vim/pack/general/opt/vim-better-whitespace - url = https://git::@github.com/ntpeters/vim-better-whitespace.git -[submodule ".local/share/vim/pack/general/opt/vim-commentary"] - path = .local/share/vim/pack/general/opt/vim-commentary - url = https://git::@github.com/tpope/vim-commentary.git -[submodule ".local/share/vim/pack/general/opt/vim-surround"] - path = .local/share/vim/pack/general/start/vim-surround - url = https://git::@github.com/tpope/vim-surround.git -[submodule ".local/share/vim/pack/general/opt/vim-fugitive"] - path = .local/share/vim/pack/general/opt/vim-ninja-feet/vim-fugitive - url = https://git::@github.com/tpope/vim-fugitive.git -[submodule ".local/share/vim/pack/general/opt/vim-ninja-feet"] - path = .local/share/vim/pack/general/opt/vim-ninja-feet/vim-ninja-feet - url = https://git::@github.com/tommcdo/vim-ninja-feet.git -[submodule ".local/share/vimcommon/pack/ui/opt/gruvbox-material"] - path = .local/share/vim/pack/ui/opt/gruvbox-material - url = https://git::@github.com/sainnhe/gruvbox-material.git -[submodule ".local/share/vim/pack/general/start/vim-unimpaired"] - path = .local/share/vim/pack/general/opt/vim-ninja-feet/vim-unimpaired - url = https://github.com/tpope/vim-unimpaired -[submodule ".local/share/vim/pack/general/start/vim-repeat"] - path = .local/share/vim/pack/general/start/vim-repeat - url = https://git::@github.com/tpope/vim-repeat.git -[submodule ".local/share/vim/pack/general/start/vim-tmux-navigator"] - path = .local/share/vim/pack/general/opt/vim-ninja-feet/vim-tmux-navigator - url = https://github.com/christoomey/vim-tmux-navigator -[submodule ".local/share/vim/pack/general/start/vim-dispatch"] - path = .local/share/vim/pack/general/start/vim-dispatch - url = https://github.com/tpope/vim-dispatch -[submodule ".local/share/vim/pack/general/start/mru"] - path = .local/share/vim/pack/general/opt/vim-ninja-feet/mru - url = https://github.com/yegappan/mru -[submodule ".local/share/nvim/pack/general/start/vim-dispatch-neovim"] - path = .local/share/nvim/pack/general/start/vim-dispatch-neovim - url = https://github.com/radenling/vim-dispatch-neovim -[submodule ".local/share/nvim/pack/development/start/nvim-dap"] - path = .local/share/nvim/pack/dev/opt/nvim-dap - url = https://github.com/mfussenegger/nvim-dap -[submodule ".local/share/nvim/pack/general/start/nvim-comment"] - path = .local/share/nvim/pack/general/start/nvim-comment - url = https://github.com/terrortylor/nvim-comment -[submodule ".local/share/nvim/pack/development/opt/vimspector"] - path = .local/share/vim/pack/dev/opt/vimspector - url = https://github.com/puremourning/vimspector -[submodule ".local/share/vim/pack/general/start/vim-checklist"] - path = .local/share/vim/pack/general/start/vim-checklist - url = https://github.com/evansalter/vim-checklist -[submodule ".config/nvim/vim-vinegar"] path = .config/nvim/vim-vinegar url = https://github.com/tpope/vim-vinegar [submodule ".local/share/nvim/pack/general/start/vim-vinegar"] @@ -58,39 +10,9 @@ [submodule ".local/share/vim/pack/general/opt/vim-maildir"] path = .local/share/vim/pack/general/opt/vim-maildir url = https://github.com/ferranpm/vim-maildir -[submodule ".local/share/vimcommon/pack/general/start/vim-minisnip"] - path = .local/share/vim/pack/general/start/vim-minisnip - url = https://github.com/joereynolds/vim-minisnip/ -[submodule ".local/share/vimcommon/pack/dev/opt/clang_complete"] - path = .local/share/vim/pack/dev/opt/clang_complete - url = https://github.com/xavierd/clang_complete -[submodule ".local/share/vimcommon/pack/dev/opt/swift.vim"] - path = .local/share/vim/pack/dev/opt/swift.vim - url = https://github.com/keith/swift.vim -[submodule ".local/share/vimcommon/pack/dev/opt/tagbar"] - path = .local/share/vim/pack/dev/opt/tagbar - url = https://github.com/preservim/tagbar -[submodule ".local/share/vimcommon/pack/general/start/vim-pbxproj"] - path = .local/share/vim/pack/general/start/vim-pbxproj - url = https://github.com/cfdrake/vim-pbxproj -[submodule ".local/share/vimcommon/pack/dev/opt/vim-submode"] - path = .local/share/vim/pack/general/start/vim-submode - url = https://github.com/kana/vim-submode -[submodule ".local/share/vimcommon/pack/dev/opt/xcodebuild.vim"] - path = .local/share/vim/pack/dev/opt/xcodebuild.vim - url = https://github.com/jerrymarino/xcodebuild.vim [submodule ".local/share/nvim/pack/dev/opt/nvim-dap-ui"] path = .local/share/nvim/pack/dev/opt/nvim-dap-ui url = https://github.com/rcarriga/nvim-dap-ui -[submodule ".local/share/vimcommon/pack/dev/opt/vim-xcode"] - path = .local/share/vim/pack/dev/opt/vim-xcode - url = https://github.com/gfontenot/vim-xcode -[submodule ".local/share/vimcommon/pack/general/opt/fzf.vim"] - path = .local/share/vim/pack/general/start/fzf.vim - url = https://github.com/junegunn/fzf.vim -[submodule ".local/share/vimcommon/pack/general/start/gitignore"] - path = .local/share/vim/pack/general/start/gitignore - url = https://github.com/vim-scripts/gitignore [submodule ".local/share/nvim/pack/dev/start/nvim-lspconfig"] path = .local/share/nvim/pack/dev/opt/nvim-lspconfig url = https://github.com/neovim/nvim-lspconfig diff --git a/.local/bin/sh/ci b/.local/bin/sh/ci @@ -1,7 +1,7 @@ #!/bin/sh # ci - computer index -s_db=~/.local/share/personal/systems.json +s_db="$XDG_DATA_HOME/personal/systems.json" s_system=$(jq -r 'keys[]' "$s_db" | fzf) s_addr=$(jq -r ".$s_system" "$s_db") diff --git a/.local/bin/sh/irc b/.local/bin/sh/irc @@ -2,10 +2,13 @@ test -z "${FUZZER}" && { printf "FUZZER not set\n"; exit 1; } -CHATS="irc.freenode.net\nirc.libera.chat" +type ii || exit 1 + +CHATS="irc.freenode.net +irc.libera.chat" startii() { - pick=`echo ${CHATS} | ${FUZZER}` + pick=`echo "${CHATS}" | ${FUZZER}` ii -s "${pick}" -n $IRC_NICK & } @@ -18,8 +21,9 @@ iipid="$(pgrep ii)" if [ -n "${iipid}" ]; then printf "ii is already running with pid: %s\n" "${iipid}" + startvim else startii + startvim fi -startvim diff --git a/.local/bin/sh/pofs b/.local/bin/sh/pofs @@ -4,6 +4,6 @@ cd "${PASSWORD_STORE_DIR}" || exit 1 -selection="$(find -L totp -name "*.gpg" | sed 's/.gpg$//g' | ${FUZZER} -q "$*")" +selection="$(find -L . -wholename "./*totp/*.gpg" | sed 's/.gpg$//g' | ${FUZZER} -q "$*")" test -z "${selection}" || pass otp "${selection}" diff --git a/.local/share/nvim/pack/dev/opt/nvim-dap b/.local/share/nvim/pack/dev/opt/nvim-dap @@ -1 +0,0 @@ -Subproject commit 61643680dcb771a29073cd432894e2f81a7c2ae3 diff --git a/.local/share/nvim/pack/dev/opt/nvim-dap-ui b/.local/share/nvim/pack/dev/opt/nvim-dap-ui @@ -1 +0,0 @@ -Subproject commit 0f385f7f5268f408a546772c049271121b0d71c9 diff --git a/.local/share/nvim/pack/dev/opt/nvim-lspconfig b/.local/share/nvim/pack/dev/opt/nvim-lspconfig @@ -1 +0,0 @@ -Subproject commit 7b98aadc6e85db4fc3af6c1ec22c4774d965506e diff --git a/.local/share/nvim/pack/general/start/nvim-comment b/.local/share/nvim/pack/general/start/nvim-comment @@ -1 +0,0 @@ -Subproject commit 861921706a39144ea528a6200a059a549b02d8f0 diff --git a/.local/share/vim/pack/dev/opt/clang_complete b/.local/share/vim/pack/dev/opt/clang_complete @@ -1 +0,0 @@ -Subproject commit e25b6a54e5cf648eb36d5be5b82c1bbb22260fde diff --git a/.local/share/vim/pack/dev/opt/swift.vim b/.local/share/vim/pack/dev/opt/swift.vim @@ -1 +0,0 @@ -Subproject commit 3e0529e1a97e3da24aabd18daf8ed92c6da8c68b diff --git a/.local/share/vim/pack/dev/opt/tagbar b/.local/share/vim/pack/dev/opt/tagbar @@ -1 +0,0 @@ -Subproject commit 83933d557409639df53fd2ca21484279b5854c1e diff --git a/.local/share/vim/pack/dev/opt/vim-cmake b/.local/share/vim/pack/dev/opt/vim-cmake @@ -1 +0,0 @@ -Subproject commit 844b85677d52d932432eb115236d9173ebe3664d diff --git a/.local/share/vim/pack/dev/opt/vim-msbuild b/.local/share/vim/pack/dev/opt/vim-msbuild @@ -1 +0,0 @@ -Subproject commit 4766d9a225c433e7ce2625bcc6263bfd028c4a50 diff --git a/.local/share/vim/pack/dev/opt/vim-xcode b/.local/share/vim/pack/dev/opt/vim-xcode @@ -1 +0,0 @@ -Subproject commit 2adc409bd7bb58499218f4f487c825e55306e46d diff --git a/.local/share/vim/pack/dev/opt/vimspector b/.local/share/vim/pack/dev/opt/vimspector @@ -1 +0,0 @@ -Subproject commit 5c328b513485675c061558d2f25a98ee503cb243 diff --git a/.local/share/vim/pack/dev/opt/xcodebuild.vim b/.local/share/vim/pack/dev/opt/xcodebuild.vim @@ -1 +0,0 @@ -Subproject commit d62fa4cf952b4b8a1650778bdec284c35e468279 diff --git a/.local/share/vim/pack/general/opt/vim-better-whitespace b/.local/share/vim/pack/general/opt/vim-better-whitespace @@ -1 +0,0 @@ -Subproject commit c5afbe91d29c5e3be81d5125ddcdc276fd1f1322 diff --git a/.local/share/vim/pack/general/opt/vim-commentary b/.local/share/vim/pack/general/opt/vim-commentary @@ -1 +0,0 @@ -Subproject commit 349340debb34f6302931f0eb7139b2c11dfdf427 diff --git a/.local/share/vim/pack/general/opt/vim-maildir b/.local/share/vim/pack/general/opt/vim-maildir @@ -1 +0,0 @@ -Subproject commit 5fffc4b5ef0059dc07ed06970d7b14a581a3e35c diff --git a/.local/share/vim/pack/general/opt/vim-ninja-feet/birck.vim b/.local/share/vim/pack/general/opt/vim-ninja-feet/birck.vim @@ -1 +0,0 @@ -Subproject commit e316a915b34f42f448966df7f79d10d8a49706c5 diff --git a/.local/share/vim/pack/general/opt/vim-ninja-feet/mru b/.local/share/vim/pack/general/opt/vim-ninja-feet/mru @@ -1 +0,0 @@ -Subproject commit 8e8220a005d070dbd01caae86e3139d83fc444c4 diff --git a/.local/share/vim/pack/general/opt/vim-ninja-feet/vim-fugitive b/.local/share/vim/pack/general/opt/vim-ninja-feet/vim-fugitive @@ -1 +0,0 @@ -Subproject commit 6f07d7e6cd23b7a76dc461fdfb1984717d233806 diff --git a/.local/share/vim/pack/general/opt/vim-ninja-feet/vim-ninja-feet b/.local/share/vim/pack/general/opt/vim-ninja-feet/vim-ninja-feet @@ -1 +0,0 @@ -Subproject commit cb9b448dd468a338255aed474e6113ed115612c1 diff --git a/.local/share/vim/pack/general/opt/vim-ninja-feet/vim-tmux-navigator b/.local/share/vim/pack/general/opt/vim-ninja-feet/vim-tmux-navigator @@ -1 +0,0 @@ -Subproject commit afb45a55b452b9238159047ce7c6e161bd4a9907 diff --git a/.local/share/vim/pack/general/opt/vim-ninja-feet/vim-unimpaired b/.local/share/vim/pack/general/opt/vim-ninja-feet/vim-unimpaired @@ -1 +0,0 @@ -Subproject commit e4006d68cd4f390efef935bc09be0ce3bd022e72 diff --git a/.local/share/vim/pack/general/start/fzf.vim b/.local/share/vim/pack/general/start/fzf.vim @@ -1 +0,0 @@ -Subproject commit 9ceac718026fd39498d95ff04fa04d3e40c465d7 diff --git a/.local/share/vim/pack/general/start/gitignore b/.local/share/vim/pack/general/start/gitignore @@ -1 +0,0 @@ -Subproject commit 061c5c756713f42b92b6b69b0a081075319a60d0 diff --git a/.local/share/vim/pack/general/start/vim-checklist b/.local/share/vim/pack/general/start/vim-checklist @@ -1 +0,0 @@ -Subproject commit a63f22fdd1acfff7f4db3f79641135b9dc9a36fb diff --git a/.local/share/vim/pack/general/start/vim-dispatch b/.local/share/vim/pack/general/start/vim-dispatch @@ -1 +0,0 @@ -Subproject commit 00e77d90452e3c710014b26dc61ea919bc895e92 diff --git a/.local/share/vim/pack/general/start/vim-minisnip b/.local/share/vim/pack/general/start/vim-minisnip @@ -1 +0,0 @@ -Subproject commit 1897727298c658dde9ec9deda0e56b608c8b2f32 diff --git a/.local/share/vim/pack/general/start/vim-pbxproj b/.local/share/vim/pack/general/start/vim-pbxproj @@ -1 +0,0 @@ -Subproject commit d230f2cc70faf47ec0b97ffefa8235991438aca8 diff --git a/.local/share/vim/pack/general/start/vim-repeat b/.local/share/vim/pack/general/start/vim-repeat @@ -1 +0,0 @@ -Subproject commit 24afe922e6a05891756ecf331f39a1f6743d3d5a diff --git a/.local/share/vim/pack/general/start/vim-submode b/.local/share/vim/pack/general/start/vim-submode @@ -1 +0,0 @@ -Subproject commit d29de4f55c40a7a03af1d8134453a703d6affbd2 diff --git a/.local/share/vim/pack/general/start/vim-surround b/.local/share/vim/pack/general/start/vim-surround @@ -1 +0,0 @@ -Subproject commit f51a26d3710629d031806305b6c8727189cd1935 diff --git a/.local/share/vim/pack/general/start/vim-vinegar b/.local/share/vim/pack/general/start/vim-vinegar @@ -1 +0,0 @@ -Subproject commit bb1bcddf43cfebe05eb565a84ab069b357d0b3d6 diff --git a/.local/share/vim/pack/ui/opt/gruvbox-material b/.local/share/vim/pack/ui/opt/gruvbox-material @@ -1 +0,0 @@ -Subproject commit 2807579bd0a9981575dbb518aa65d3206f04ea02