diff options
| author | Ibrahim Muftee <ibrahim@muftee.net> | 2024-04-12 12:16:01 -0500 |
|---|---|---|
| committer | Ibrahim Muftee <ibrahim@muftee.net> | 2026-07-01 00:23:31 -0400 |
| commit | 4cb2faf23d67c84d6e20b16bf1444e84e7d39b69 (patch) | |
| tree | 9577014986eb0cdce7cb3e4576dec8466494f8fd /dot_config | |
| parent | f88dc939cef2b4e1a55fd05ac482e49d4b567b4e (diff) | |
feat(powershell): make scripts path agnostic
Additionally remove old unused configs.
Diffstat (limited to 'dot_config')
| -rw-r--r-- | dot_config/powershell/Microsoft.PowerShell_profile.ps1 | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/dot_config/powershell/Microsoft.PowerShell_profile.ps1 b/dot_config/powershell/Microsoft.PowerShell_profile.ps1 index 6d10e30..6090e89 100644 --- a/dot_config/powershell/Microsoft.PowerShell_profile.ps1 +++ b/dot_config/powershell/Microsoft.PowerShell_profile.ps1 @@ -1,34 +1,21 @@ -# # 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 - +# Environment variables $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" +# Use some cool icons +Import-Module -Name Terminal-Icons + # 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)" + $codepath = $(Join-Path "C:" $env:HOMEPATH "\Documents\Repos\") + $configpath = $(Join-Path "C:" $env:HOMEPATH "\.config\") + $localsharepath = $(Join-Path "C:" $env:HOMEPATH "\.local\share\") + Invoke-Expression "cd $(fd . $codepath $localsharepath $configpath -t d -d 1 | fzf)" # Next two lines sends an 'enter' key Add-Type -AssemblyName System.Windows.Forms |
