add windows config

This commit is contained in:
reeink 2024-03-07 22:13:43 +08:00
parent 753e2a2da0
commit 6d8603f31f
No known key found for this signature in database
2 changed files with 33 additions and 0 deletions

View file

@ -1 +1,9 @@
README.md
{{ if ne .chezmoi.os "windows" }}
Documents
{{ end }}
{{ if ne .chezmoi.os "linux" }}
.zshrc
{{ end }}

View file

@ -0,0 +1,25 @@
# init
Invoke-Expression (&starship init powershell) # starship
# micromamba
#region mamba initialize
# !! Contents within this block are managed by 'mamba shell init' !!
$Env:MAMBA_ROOT_PREFIX = "C:\Users\remon\.micromamba"
$Env:MAMBA_EXE = "C:\Users\remon\AppData\Local\micromamba\micromamba.exe"
(& $Env:MAMBA_EXE 'shell' 'hook' -s 'powershell' -p $Env:MAMBA_ROOT_PREFIX) | Out-String | Invoke-Expression
#endregion
# Alias
Set-Alias -Name ls -Value eza
Set-Alias -Name mm -Value micromamba
Set-Alias -Name dotfiles -Value chezmoi
function ya {
$tmp = [System.IO.Path]::GetTempFileName()
yazi $args --cwd-file="$tmp"
$cwd = Get-Content -Path $tmp
if (-not [String]::IsNullOrEmpty($cwd) -and $cwd -ne $PWD.Path) {
Set-Location -Path $cwd
}
Remove-Item -Path $tmp
}