mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(wezterm): add wezterm config
This commit is contained in:
parent
8bb2d9fbe8
commit
baf0ee5255
7 changed files with 142 additions and 8 deletions
10
tools/powershell/Completions.ps1
Normal file
10
tools/powershell/Completions.ps1
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
function Invoke-Completion {
|
||||
param ([string]$command)
|
||||
switch ($command) {
|
||||
'docker' { docker completion powershell | Out-String | Invoke-Expression }
|
||||
'git' { Import-Module Posh-Git }
|
||||
'hugo' { hugo completion powershell | Out-String | Invoke-Expression }
|
||||
'pip' { pip completion --powershell | Out-String | Invoke-Expression }
|
||||
'wezterm' { wezterm shell-completion --shell power-shell | Out-String | Invoke-Expression }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,18 @@
|
|||
# Use XDG Base Directory Specification and its similar structure for Windows
|
||||
|
||||
# wget
|
||||
${function:wget} = {wget --hsts-file $XDG_CACHE_HOME/wget-hsts $args}
|
||||
if (Get-Command wget -ErrorAction SilentlyContinue) {
|
||||
${function:wget} = {wget --hsts-file $XDG_CACHE_HOME/wget-hsts $args}
|
||||
}
|
||||
|
||||
# yarn v1
|
||||
${function:yarn} = {yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config.yaml $args}
|
||||
if (Get-Command yarn -ErrorAction SilentlyContinue) {
|
||||
${function:yarn} = {yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config.yaml $args}
|
||||
}
|
||||
|
||||
if ($Env:WEZTERM) { # Environment variable injected by wezterm/wezterm.lua
|
||||
${function:icat} = {wezterm imgcat $args}
|
||||
}
|
||||
elseif ($Env:KITTY) {
|
||||
${function:icat} = {kitty +kitten icat $args}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Import-Module -Name Terminal-Icons
|
||||
# Import-Module -Name Terminal-Icons
|
||||
Import-Module -Name CompletionPredictor
|
||||
if ($IsWindows) {
|
||||
# Chocolatey
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# Use starship to set prompt
|
||||
$ENV:STARSHIP_CONFIG = Join-Path $DOTFILES "tools" "starship" "starship_pwsh.toml"
|
||||
|
||||
# Invoke-Expression (&starship init powershell)
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
# Below is the backup of original prompt function
|
||||
# $promptTime = $true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue