diff options
| author | Ibrahim Muftee <ibrahim@muftee.net> | 2024-04-11 23:20:57 -0500 |
|---|---|---|
| committer | Ibrahim Muftee <ibrahim@muftee.net> | 2026-07-01 00:23:31 -0400 |
| commit | a99b211b3bec43ebe3cdfa1899cba227d1d569a4 (patch) | |
| tree | a648712a5fa523f04670c32dd8eff6c2138b6669 /dot_config/powershell/Microsoft.PowerShell_profile.ps1 | |
Initial commit
Diffstat (limited to 'dot_config/powershell/Microsoft.PowerShell_profile.ps1')
| -rw-r--r-- | dot_config/powershell/Microsoft.PowerShell_profile.ps1 | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/dot_config/powershell/Microsoft.PowerShell_profile.ps1 b/dot_config/powershell/Microsoft.PowerShell_profile.ps1 new file mode 100644 index 0000000..6d10e30 --- /dev/null +++ b/dot_config/powershell/Microsoft.PowerShell_profile.ps1 @@ -0,0 +1,39 @@ +# # Ask if using VPN +# $usingvpn = Read-Host -Prompt "Are you using the VPN? (y/n)" +# if ($usingvpn -eq 'y') { +# $env:HTTP_PROXY="http://proxy.cat.com:80" +# $env:HTTPS_PROXY="http://proxy.cat.com:80" +# } else { +# $env:HTTP_PROXY="" +# $env:HTTPS_PROXY="" +# } +# + + +# Load Oh-My-Posh theme +# oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression + # oh-my-posh init pwsh --config "C:\Users\muftei\AppData\Local\Programs\oh-my-posh\themes\kali.omp.json" | Invoke-Expression + +# Use some cool icons +Import-Module -Name Terminal-Icons + +$env:XDG_CONFIG_HOME="C:/Users/muftei/.config" +$env:XDG_DATA_HOME="C:/Users/muftei/.local/share" +$env:XDG_STATE_HOME="C:/Users/muftei/.local/state" + +$env:EDITOR="nvim" + +# Git autocompletion for Powershell +Import-Module -Name posh-git + +# Fuzzy find my project files +Set-PSReadlineKeyHandler -Key "Ctrl+f" -ScriptBlock { + Invoke-Expression "cd $(fd . 'C:\Users\muftei\Documents\Repos\' 'C:\Users\muftei\AppData\Local\' 'C:\Users\muftei\.config\' -t d -d 1 | fzf)" + + # Next two lines sends an 'enter' key + Add-Type -AssemblyName System.Windows.Forms + [System.Windows.Forms.SendKeys]::SendWait("{ENTER}") +} + +# Load Starship prompt +Invoke-Expression (&starship init powershell) |
