Merge branch 'master' of gitee.com:klesh/dotfiles

This commit is contained in:
Klesh Wong 2020-08-05 23:59:30 +08:00
commit 8b3ae7f902
5 changed files with 27 additions and 8 deletions

3
config/nvim/ginit.vim Normal file
View File

@ -0,0 +1,3 @@
Guifont 等距更纱黑体 T SC:h12
source $VIMRUNTIME/mswin.vim
set mouse=a

View File

@ -23,9 +23,9 @@ trusted-host = pypi.doubanio.com
EOF EOF
# docker accelerator # docker accelerator
if [ -d /etc/docker ]; then$ if [ -d /etc/docker ]; then
dj='{}'$ dj='{}'
[ -f /etc/docker/daemon.json ] && dj=$(cat /etc/docker/daemon.json)$ [ -f /etc/docker/daemon.json ] && dj=$(cat /etc/docker/daemon.json)
echo $dj | jq '. + {"registry-mirrors": ["https://izuhlbap.mirror.aliyuncs.com"]}' > /etc/docker/daemon.json$ echo $dj | jq '. + {"registry-mirrors": ["https://izuhlbap.mirror.aliyuncs.com"]}' > /etc/docker/daemon.json
systemctl restart docker$ systemctl restart docker
fi$ fi

7
win/npd.vbs Normal file
View File

@ -0,0 +1,7 @@
Set WshShell = WScript.CreateObject("WScript.Shell")
If wscript.arguments.count <2 then
WshShell.run "nvim-qt.exe"
Else
sCmd = "nvim-qt.exe " & """" & wscript.arguments(1) & """"
WshShell.run sCmd
End If

View File

@ -5,8 +5,13 @@
Set-PSReadLineOption -EditMode Emacs Set-PSReadLineOption -EditMode Emacs
$Env:Path += ";$PSScriptRoot\bin" $Env:Path += ";$PSScriptRoot\bin"
$Env:KUBE_EDITOR = 'nvim'
$Env:EDITOR = 'nvim'
Set-Alias -Name k kubectl Set-Alias -Name k kubectl
Set-Prompt $isPs7 = $host.Version.Major -ge 7
if ( $isPs7 ) {
Set-Prompt
}
function kcc { k config get-contexts $args } function kcc { k config get-contexts $args }
function kcu { k config use-context $args} function kcu { k config use-context $args}

View File

@ -25,3 +25,7 @@ if (-not (Get-ScheduledTask -TaskName "Wubi No Shift")) {
Install-Module posh-git Install-Module posh-git
Install-Module oh-my-posh Install-Module oh-my-posh
# replace notepad with nvim-qt
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "${dotfiles}\win\npd.vbs" /f