2023-06-09 17:49:42 -07:00
|
|
|
### Env
|
2022-11-29 23:52:39 -08:00
|
|
|
$env:EDITOR = 'code --wait'
|
|
|
|
$env:GIT_SSH = "C:\Windows\system32\OpenSSH\ssh.exe"
|
|
|
|
|
2023-06-09 17:49:42 -07:00
|
|
|
### Set PowerShell to UTF-8
|
Update dotfiles/.config/kitty/kitty.conf, dotfiles/.config/kitty/Betelgeuse-dark.conf, dotfiles/.config/kitty/Betelgeuse-light.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/kitty.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/Betelgeuse-dark.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/Betelgeuse-light.conf, dotfiles/.local/share/chezmoi/private_dot_config/ngrok/ngrok.yml.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/slack-term/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/tabby/config.yaml.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/terminator/config, dotfiles/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml, dotfiles/.local/share/chezmoi/private_dot_config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml, dotfiles/.local/share/chezmoi/private_dot_config/xfce4/terminal/terminalrc, dotfiles/.config/xsettingsd/xsettingsd.conf, dotfiles/.local/share/chezmoi/private_dot_config/xsettingsd/xsettingsd.conf, dotfiles/.local/share/chezmoi/private_dot_config/gtk-3.0/settings.ini
2022-11-21 17:43:46 -08:00
|
|
|
[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
|
|
|
|
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
### Oh My Posh
|
2022-11-29 23:52:39 -08:00
|
|
|
Install-Module posh-git
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
oh-my-posh init pwsh --config "$env:HOME/.config/oh-my-posh/Betelgeuse.omp.json" | Invoke-Expression
|
|
|
|
|
2023-05-14 17:41:51 -07:00
|
|
|
### Docker Completion
|
|
|
|
Import-Module "$env:HOME/.local/share/powershell/docker/DockerCompletion/DockerCompletion"
|
|
|
|
|
Update dotfiles/.bashrc, dotfiles/.local/share/chezmoi/dot_bashrc.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/dot_ssh/id_rsa.pub, dotfiles/.local/share/chezmoi/dot_ssh/authorized_keys.github.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/brew/Brewfile.tmpl, dotfiles/.local/share/chezmoi/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/dot_profile.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/mimeapps.list, dotfiles/.local/share/chezmoi/private_dot_config/chromium-flags.conf, dotfiles/.local/share/chezmoi/private_dot_config/pgcli/config, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions.json, dotfiles/.vscode/settings.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg, dotfiles/.local/share/chezmoi/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
Deleted dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json
2022-11-22 02:33:57 -08:00
|
|
|
# Import-Module -Name Terminal-Icons
|
Update dotfiles/.config/kitty/kitty.conf, dotfiles/.config/kitty/Betelgeuse-dark.conf, dotfiles/.config/kitty/Betelgeuse-light.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/kitty.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/Betelgeuse-dark.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/Betelgeuse-light.conf, dotfiles/.local/share/chezmoi/private_dot_config/ngrok/ngrok.yml.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/slack-term/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/tabby/config.yaml.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/terminator/config, dotfiles/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml, dotfiles/.local/share/chezmoi/private_dot_config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml, dotfiles/.local/share/chezmoi/private_dot_config/xfce4/terminal/terminalrc, dotfiles/.config/xsettingsd/xsettingsd.conf, dotfiles/.local/share/chezmoi/private_dot_config/xsettingsd/xsettingsd.conf, dotfiles/.local/share/chezmoi/private_dot_config/gtk-3.0/settings.ini
2022-11-21 17:43:46 -08:00
|
|
|
|
2023-06-09 17:49:42 -07:00
|
|
|
### PSReadLine
|
2023-06-09 17:54:02 -07:00
|
|
|
Set-PSReadLineOption -EditMode Vi
|
Update dotfiles/.config/kitty/kitty.conf, dotfiles/.config/kitty/Betelgeuse-dark.conf, dotfiles/.config/kitty/Betelgeuse-light.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/kitty.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/Betelgeuse-dark.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/Betelgeuse-light.conf, dotfiles/.local/share/chezmoi/private_dot_config/ngrok/ngrok.yml.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/slack-term/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/tabby/config.yaml.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/terminator/config, dotfiles/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml, dotfiles/.local/share/chezmoi/private_dot_config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml, dotfiles/.local/share/chezmoi/private_dot_config/xfce4/terminal/terminalrc, dotfiles/.config/xsettingsd/xsettingsd.conf, dotfiles/.local/share/chezmoi/private_dot_config/xsettingsd/xsettingsd.conf, dotfiles/.local/share/chezmoi/private_dot_config/gtk-3.0/settings.ini
2022-11-21 17:43:46 -08:00
|
|
|
Set-PSReadLineOption -BellStyle None
|
|
|
|
Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -Function DeleteChar
|
|
|
|
Set-PSReadLineOption -PredictionSource History
|
|
|
|
|
2023-06-09 17:49:42 -07:00
|
|
|
### Fzf
|
2023-06-09 17:54:02 -07:00
|
|
|
# Note: This was not working under PowerShell via VSCode on macOS
|
2023-06-09 17:56:25 -07:00
|
|
|
# The specified module 'PSFzf' was not loaded because no valid module file was found in any module directory.
|
2023-06-09 17:54:02 -07:00
|
|
|
# Import-Module PSFzf
|
|
|
|
# Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r'
|
Update dotfiles/.config/kitty/kitty.conf, dotfiles/.config/kitty/Betelgeuse-dark.conf, dotfiles/.config/kitty/Betelgeuse-light.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/kitty.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/Betelgeuse-dark.conf, dotfiles/.local/share/chezmoi/private_dot_config/kitty/Betelgeuse-light.conf, dotfiles/.local/share/chezmoi/private_dot_config/ngrok/ngrok.yml.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/powershell/user_profile.ps1, dotfiles/.local/share/chezmoi/private_dot_config/powershell/takuya.omp.json, dotfiles/.local/share/chezmoi/private_dot_config/slack-term/config.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/tabby/config.yaml.tmpl, dotfiles/.local/share/chezmoi/private_dot_config/terminator/config, dotfiles/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml, dotfiles/.local/share/chezmoi/private_dot_config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml, dotfiles/.local/share/chezmoi/private_dot_config/xfce4/terminal/terminalrc, dotfiles/.config/xsettingsd/xsettingsd.conf, dotfiles/.local/share/chezmoi/private_dot_config/xsettingsd/xsettingsd.conf, dotfiles/.local/share/chezmoi/private_dot_config/gtk-3.0/settings.ini
2022-11-21 17:43:46 -08:00
|
|
|
|
|
|
|
### zoxide
|
|
|
|
Invoke-Expression (& {
|
|
|
|
$hook = if ($PSVersionTable.PSVersion.Major -lt 6) { 'prompt' } else { 'pwd' }
|
|
|
|
(zoxide init --hook $hook powershell | Out-String)
|
|
|
|
})
|
|
|
|
|
|
|
|
### Aliases
|
|
|
|
Set-Alias grep findstr
|
|
|
|
|
|
|
|
### Utilities
|
|
|
|
function which ($command) {
|
|
|
|
Get-Command -Name $command -ErrorAction SilentlyContinue |
|
|
|
|
Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue
|
|
|
|
}
|