dotfiles

Cross platform dotfiles for linux, mac and windows

commit 480e22c76d2fda05db3fe81fb0272999521f15b2
parent f1ee596d4b8d54ec2849f7d0ef0521b4c1de3a93
Author: Bharatvaj <bharatvaj@yahoo.com>
Date: Fri, 6 Jan 2023 02:24:15 +0530

Fix lfcd.cmd exiting issue

Implement spot.cmd properly with wmenu.exe

Add unix like aliases for cmd.exe

Export GPGHOME variable for making gpg windows version work properly

Fix command typo in git/config

vim changes
-----------
Add <leader>bc for cleaning a project in vim

Add gitignore plugin for vim

Move gruvbox-material theme into vimcommon/opt

Redirect nvim to init.lua if it accidentally loads vimrc

Disable automatic mru plugin loading

Red status line is back!

Ignore out/** by default and add ** to path
16 files changed, 48 insertions(+), 7 deletions(-)
diff --git a/.config/cmd/aliases.bat b/.config/cmd/aliases.bat
@@ -4,3 +4,11 @@ doskey n=cd $*
 doskey g=git $*
 doskey e=%EDITOR% $*
 doskey l=lfcd.cmd
+doskey ls=dir /B $*
+doskey cp=copy $*
+doskey mv=move $*
+doskey pwd=cd
+doskey rm=del $*
+doskey clear=cls
+doskey lynx=lynx -cfg %USERPROFILE%\.config\lynx\lynx.cfg $*
+doskey cat=type $*
diff --git a/.config/cmd/env.bat b/.config/cmd/env.bat
@@ -6,6 +6,7 @@ set VISUAL=vim
 set EDITOR=%VISUAL%
 
 set GNUPGHOME=%XDG_DATA_HOME%\gnupg
+set GPGHOME=%XDG_DATA_HOME%\gnupg
 set PASSWORD_STORE_DIR=%XDG_DATA_HOME%\pass
 set PASS_BASE_DIR=%XDG_DATA_HOME%\pass
 set NB_PATH=%XDG_DATA_HOME%\notebook
diff --git a/.config/git/config b/.config/git/config
@@ -25,7 +25,7 @@
 	rv = remote --verbose
 	sm = submodule
 	st = status
-	suir = submodule update --init --recursiv
+	suir = submodule update --init --recursive
 	wt = worktree
 	wta = worktree add
 
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
@@ -39,7 +39,6 @@ source $XDG_DATA_HOME/vimcommon/vimrc
 function! s:load_plugins(t) abort
 	packadd fzf.vim
 	packadd gruvbox-material
-	packadd mru
 	packadd nvim-dap
 	packadd nvim-dap-ui
 	packadd vim-fugitive
diff --git a/.config/nvim/lua/keybindings.lua b/.config/nvim/lua/keybindings.lua
@@ -109,6 +109,7 @@ map("n", "<leader>dcb", ":lua require'dap'.ToggleConditionalBreakpoint()")
 -- map("n", "<leader>dtcb", ":call vimspector#CleanLineBreakpoint()<CR>")
 
 map("n", "<leader>bb", ":lua save_and_build()<CR>")
+map("n", "<leader>bc", ":Make clean<CR>")
 
 
 -- development
diff --git a/.config/vim/gvimrc b/.config/vim/gvimrc
@@ -1,2 +1,3 @@
 set guifont=Bitstream\ Vera\ Sans\ Mono
 set guioptions=
+colorscheme gruvbox-material
diff --git a/.config/vim/keybindings.vim b/.config/vim/keybindings.vim
@@ -42,7 +42,11 @@ call SetupCommandAlias("man","help")
 
 nnoremap <leader>tb :call ToggleBackground()<CR>
 nnoremap <leader>tl :call ToggleList()<CR>
+
+" development
 nnoremap <leader>bb :call SaveAndBuild()<CR>
+nnoremap <leader>bc :Make clean<CR>
+
 nnoremap <leader>fmv :call FileMvHelper()<CR>
 
 " Quick save and write
diff --git a/.config/vim/vimrc b/.config/vim/vimrc
@@ -1,4 +1,7 @@
-if !has('nvim')
+if has('nvim')
+	luafile ~/.config/nvim/init.lua
+    finish
+else
 	if has("&viminfofile")
 		set viminfofile=$XDG_CACHE_DIR/vim/viminfo
 	endif

@@ -82,7 +85,6 @@ function! s:load_plugins(t) abort
 	set undodir=$XDG_CACHE_HOME/vim/undo     | call mkdir(&undodir,   'p')
 	packadd vim-tmux-navigator
 	packadd vim-commentary
-	packadd mru
 	packadd vim-surround
 	packadd vim-ninja-feet
 	packadd vim-fugitive
diff --git a/.gitmodules b/.gitmodules
@@ -94,3 +94,6 @@
 [submodule ".local/share/vimcommon/pack/general/opt/fzf.vim"]
 	path = .local/share/vimcommon/pack/general/start/fzf.vim
 	url = https://github.com/junegunn/fzf.vim
+[submodule ".local/share/vimcommon/pack/general/start/gitignore"]
+	path = .local/share/vimcommon/pack/general/start/gitignore
+	url = https://github.com/vim-scripts/gitignore
diff --git a/.local/bin/cmd/lfcd.cmd b/.local/bin/cmd/lfcd.cmd
@@ -10,6 +10,4 @@ lf -last-dir-path=%tmpfile% %*
 if not exist %tmpfile% exit
 set /p dir=<%tmpfile%
 del /f %tmpfile%
-if not exist "%dir%" exit
-if "%dir%" == "%cd%" exit
 cd /d "%dir%"
diff --git a/.local/bin/cmd/spot.cmd b/.local/bin/cmd/spot.cmd
@@ -0,0 +1,19 @@
+@echo off
+setlocal EnableDelayedExpansion
+
+set start_path="C:\ProgramData\Microsoft\Windows\Start Menu"
+cd %start_path%
+
+set row=
+for /f "usebackq tokens=*" %%f in (`dir /b/s *.lnk`) do set row=!row!"%%f";
+
+:s_tmploop
+set s_tmpfile="%tmp%\s_spot.%random%.tmp"
+if exist %s_tmpfile% goto:s_tmploop
+
+wmenu.exe -e %row% | more > "!s_tmpfile!"
+
+set /p c_tmpfile=<!s_tmpfile!
+del /f !s_tmpfile!
+start "%c_tmpfile%" "%c_tmpfile%"
+endlocal
diff --git a/.local/share/vimcommon/commands b/.local/share/vimcommon/commands
diff --git a/.local/share/vimcommon/hyper-red.vim b/.local/share/vimcommon/hyper-red.vim
@@ -6,7 +6,7 @@
 if &background == "dark"
 	hi! LineNr guibg=NONE ctermbg=NONE guifg=DarkGray ctermfg=DarkGray
 	hi! CursorLineNr cterm=NONE gui=NONE guibg=NONE ctermbg=NONE guifg=White ctermfg=White
-	hi! StatusLine cterm=bold gui=bold ctermfg=LightRed ctermbg=Black guifg=LightRed guibg=Black
+	hi! StatusLine cterm=bold gui=bold ctermfg=White ctermbg=Red guifg=White guibg=Red
 	hi! StatusLineNC guibg=LightGray ctermbg=LightGray guifg=Black ctermfg=Black
 	hi! Statement ctermfg=Red guifg=Red
 	hi! Constant ctermfg=LightGreen guifg=LightGreen
diff --git a/.local/share/vimcommon/pack/general/start/gitignore b/.local/share/vimcommon/pack/general/start/gitignore
@@ -0,0 +1 @@
+Subproject commit 061c5c756713f42b92b6b69b0a081075319a60d0
diff --git a/.local/share/vimcommon/pack/themes/opt/gruvbox-material b/.local/share/vimcommon/pack/themes/opt/gruvbox-material
@@ -0,0 +1 @@
+Subproject commit 2807579bd0a9981575dbb518aa65d3206f04ea02
diff --git a/.local/share/vimcommon/vimrc b/.local/share/vimcommon/vimrc
@@ -5,3 +5,6 @@ let g:minisnip_dir=$XDG_DATA_HOME . '/vimcommon/minisnip'
 set background=dark
 
 source $XDG_DATA_HOME/vimcommon/hyper-red.vim
+
+set path+=**
+set wildignore+=**/out/**