diff --git a/config/nvim/ginit.vim b/config/nvim/ginit.vim new file mode 100644 index 0000000..b19319e --- /dev/null +++ b/config/nvim/ginit.vim @@ -0,0 +1,3 @@ +Guifont 等距更纱黑体 T SC:h12 +source $VIMRUNTIME/mswin.vim +set mouse=a diff --git a/ubuntu/install-sources.sh b/ubuntu/install-sources.sh index b2175da..e26237f 100755 --- a/ubuntu/install-sources.sh +++ b/ubuntu/install-sources.sh @@ -23,9 +23,9 @@ trusted-host = pypi.doubanio.com EOF # docker accelerator -if [ -d /etc/docker ]; then$ - dj='{}'$ - [ -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$ - systemctl restart docker$ -fi$ +if [ -d /etc/docker ]; then + dj='{}' + [ -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 + systemctl restart docker +fi diff --git a/win/npd.vbs b/win/npd.vbs new file mode 100644 index 0000000..90a4aaa --- /dev/null +++ b/win/npd.vbs @@ -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 diff --git a/win/profile.ps1 b/win/profile.ps1 index 9bf69cb..2f3632a 100644 --- a/win/profile.ps1 +++ b/win/profile.ps1 @@ -5,8 +5,13 @@ Set-PSReadLineOption -EditMode Emacs $Env:Path += ";$PSScriptRoot\bin" +$Env:KUBE_EDITOR = 'nvim' +$Env:EDITOR = 'nvim' 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 kcu { k config use-context $args} @@ -70,4 +75,4 @@ function ssh-copy-id { ) Get-Content $IdentityFile | ssh $UserHost "umask 077; mkdir -p .ssh ; cat >> .ssh/authorized_keys" -} \ No newline at end of file +} diff --git a/win/setup.ps1 b/win/setup.ps1 index 410971a..8ae81c2 100644 --- a/win/setup.ps1 +++ b/win/setup.ps1 @@ -25,3 +25,7 @@ if (-not (Get-ScheduledTask -TaskName "Wubi No Shift")) { Install-Module posh-git 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 +