dotfiles

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

commit edc681bf46724ae0fdbf159c1888d1df27cef85d
parent 4ae27d005a65c3cf26278ebe31cc1205278b229f
Author: Bharatvaj <bharatvaj@yahoo.com>
Date:   Sun,  3 Jul 2022 07:36:26 +0530

Merge branch 'windows_leftovers' of getsh.org:dotfiles into macos_leftovers

Diffstat:
M.config/.gitignore | 5++++-
A.config/clink/clink_settings | 2++
A.config/cmd/aliases.bat | 8++++++++
D.config/cmd/aliases.cmd | 5-----
A.config/cmd/environment.bat | 9+++++++++
M.config/cmd/profile.cmd | 9++-------
A.config/cmd/setup.cmd | 13+++++++++++++
M.config/cmd/setup.ps1 | 6+++---
A.config/vim/gvimrc | 2++
M.config/vim/vimrc | 15++++++++-------
M.gitattributes | 2++
M.gitmodules | 3+++
A.local/share/vim/pack/general/start/mru | 1+
13 files changed, 57 insertions(+), 23 deletions(-)

diff --git a/.config/.gitignore b/.config/.gitignore @@ -5,9 +5,10 @@ !X11 !alacritty/ !alacritty/** -alacritty/windows.yml !bash/ !bash/** +!clink +!clink/clink_settings !cmd/ !cmd/** !git/ @@ -28,3 +29,5 @@ alacritty/windows.yml !vim/ !vim/** !wgetrc + +alacritty/windows.yml diff --git a/.config/clink/clink_settings b/.config/clink/clink_settings @@ -0,0 +1,2 @@ +clink.autostart=%XDG_CONFIG_HOME%\cmd\profile.cmd +clink.logo=none diff --git a/.config/cmd/aliases.bat b/.config/cmd/aliases.bat @@ -0,0 +1,8 @@ +doskey v=vim $* +doskey vi=vim $* +doskey n=nvim $* +doskey g=git $* +doskey e=%EDITOR% $* +doskey l=%USERPROFILE%\.config\cmd\lfcd.cmd + +set SOURCE_DEV_TOOLS="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" diff --git a/.config/cmd/aliases.cmd b/.config/cmd/aliases.cmd @@ -1,5 +0,0 @@ -doskey v=vim $* -doskey vi=vim $* -doskey n=nvim $* -doskey g=git $* -doskey l=%USERPROFILE%\.config\cmd\lfcd.cmd diff --git a/.config/cmd/environment.bat b/.config/cmd/environment.bat @@ -0,0 +1,9 @@ +set VISUAL=vim +set EDITOR=%VISUAL% +set XDG_CONFIG_HOME=%USERPROFILE%\.config +set XDG_DATA_HOME=%USERPROFILE%\.local\share +set XDG_CACHE_HOME=%USERPROFILE%\.cache + +set MYVIMRC=%XDG_CONFIG_HOME%\vim\vimrc +set VIMINIT=source $MYVIMRC + diff --git a/.config/cmd/profile.cmd b/.config/cmd/profile.cmd @@ -3,10 +3,5 @@ cd %USERPROFILE% prompt $P ∆ -set VISUAL=vim -set EDITOR=%VISUAL% -set XDG_CONFIG_HOME=%USERPROFILE%\.config -set XDG_DATA_HOME=%USERPROFILE%\.local\share -set XDG_CACHE_HOME=%USERPROFILE%\.cache - -%USERPROFILE%\.config\cmd\aliases.cmd +@call %XDG_CONFIG_HOME%\cmd\environment.bat +@call %XDG_CONFIG_HOME%\cmd\aliases.bat diff --git a/.config/cmd/setup.cmd b/.config/cmd/setup.cmd @@ -0,0 +1,13 @@ +@echo off +powershell %XDG_CONFIG_HOME%\cmd\setup.ps1 +@call %XDG_CONFIG_HOME%\cmd\environment.bat + +:: Apply config patches +:: TODO Use mklink instead of xcopy, it will prevent overriding changed files in the destination dir. +xcopy /Y %USERPROFILE%\.config\cmd\patch %USERPROFILE%\ /S /E + +IF NOT EXIST %USERPROFILE%\.config\vim\vimrc mklink %USERPROFILE%\_vimrc %USERPROFILE%\.config\vim\vimrc + +mkdir %SYSTEMDRIVE%\bin +cp %SCOOP%\apps\busybox\current\busybox.exe %SYSTEMDRIVE%\bin +cp %SCOOP%\shims\sh.* %SYSTEMDRIVE%\bin diff --git a/.config/cmd/setup.ps1 b/.config/cmd/setup.ps1 @@ -1,10 +1,10 @@ Set-ExecutionPolicy RemoteSigned -scope CurrentUser -# TODO Handle Admin user check +#TODO Make this work for Administrator accounts Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') # Install the absolute essentials scoop install $(gc ~/.config/cmd/packages.txt) -# Apply config patches -xcopy %USERPROFILE%\.config\cmd\patch %USERPROFILE% /E +# Setup clink +clink autorun set "clink inject --profile %XDG_CONFIG_HOME%\clink" diff --git a/.config/vim/gvimrc b/.config/vim/gvimrc @@ -0,0 +1,2 @@ +set guifont=Fira\ Code\ SemiBold +set guioptions= diff --git a/.config/vim/vimrc b/.config/vim/vimrc @@ -84,14 +84,15 @@ augroup user_cmds autocmd VimEnter * call timer_start(20, function('s:load_plugins')) augroup END +if has("gui") + source $XDG_CONFIG_HOME/vim/gvimrc +endif + if has("win32") - if executable("pwsh") - set shell=pwsh - set shellcmdflag=-ExecutionPolicy\ RemoteSigned\ -Command - set shellquote=\" - " shellxquote must be a literal space character. - set shellxquote= - endif + set shell=cmd + set shellquote=\" + " shellxquote must be a literal space character. + set shellxquote= endif set fillchars+=eob:\ diff --git a/.gitattributes b/.gitattributes @@ -1 +1,3 @@ * text eol=lf +*.cmd text eol=crlf +*.bat text eol=crlf diff --git a/.gitmodules b/.gitmodules @@ -58,3 +58,6 @@ [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/start/mru + url = https://github.com/yegappan/mru diff --git a/.local/share/vim/pack/general/start/mru b/.local/share/vim/pack/general/start/mru @@ -0,0 +1 @@ +Subproject commit 8e8220a005d070dbd01caae86e3139d83fc444c4