# Environment variables $env:XDG_CONFIG_HOME=$(Join-Path "C:" $env:HOMEPATH "\.config") $env:XDG_DATA_HOME=$(Join-Path "C:" $env:HOMEPATH "\.local\share") $env:XDG_STATE_HOME=$(Join-Path "C:" $env:HOMEPATH "\.local\state") $env:EDITOR="nvim" # Use some cool icons Import-Module -Name Terminal-Icons # Git autocompletion for Powershell Import-Module -Name posh-git # Fuzzy find my project files (this is really slow, find better implementation later) Set-PSReadlineKeyHandler -Key "Ctrl+f" -ScriptBlock { $codepathdata = $(Join-Path "C:" $env:HOMEPATH "\Repos\data") $codepathportal = $(Join-Path "C:" $env:HOMEPATH "\Repos\portal") $codepathautomation = $(Join-Path "C:" $env:HOMEPATH "\Repos\automation") $codepathcelery = $(Join-Path "C:" $env:HOMEPATH "\Repos\celery") $configpath = $(Join-Path "C:" $env:HOMEPATH "\.config\") $localsharepath = $(Join-Path "C:" $env:HOMEPATH "\.local\share\") $obsidianvaultpath = $(Join-Path "C:" $env:HOMEPATH "\Documents\Vaults\") Invoke-Expression "cd $(fd . $codepathdata $codepathportal $codepathautomation $codepathcelery $localsharepath $configpath $obsidianvaultpath -t d -d 1 | fzf)" # Next two lines sends an 'enter' key Add-Type -AssemblyName System.Windows.Forms [System.Windows.Forms.SendKeys]::SendWait("{ENTER}") } # Aliases if (Get-Command -Name 'nvim' -CommandType 'Application' -ErrorAction SilentlyContinue) { if (Get-Command -Name 'poetry' -CommandType 'Application' -ErrorAction SilentlyContinue) { # Can't create an "alias" with CLI args function pn() { & poetry run nvim . } function prun() { & poetry run } function pis() { & poetry install --with dev --sync} } } # Load Starship prompt Invoke-Expression (&starship init powershell)