Skip to content

Commit

Permalink
🔨 chore: update powershell profile
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquindev committed Dec 18, 2024
1 parent b9f95d2 commit 694bcb1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Profile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $Env:DOTFILES = Split-Path (Get-ChildItem $PSScriptRoot | Where-Object FullName
$Env:DOTPOSH = "$Env:DOTFILES\dotposh"
$Env:EDITOR = "code"
$Env:_ZO_DATA_DIR = "$Env:DOTFILES"
$Env:UV_LINK_MODE = "copy"

# Asynchrous processes
# Oh-my-posh prompt
Expand All @@ -38,15 +39,15 @@ foreach ($module in $PoshModules) {
# gsudo Module
if (Get-Command gsudo -ErrorAction SilentlyContinue) {
Register-EngineEvent -SourceIdentifier PowerShell.OnIdle -MaxTriggerCount 1 -Action {
$gsudoPath = Split-Path (Get-Command gsudo.exe).Path
Import-Module "$gsudoPath\gsudoModule.psd1"
$gsudoPath = Split-Path (Get-Command gsudo.exe).Path
Import-Module "$gsudoPath\gsudoModule.psd1"
} | Out-Null
}

# Import Dotposh Modules
foreach ($function in $(Get-ChildItem -Path "$env:DOTPOSH\Modules\*.ps1" -File).Name) {
Import-Module "$env:DOTPOSH\Modules\$function" -Global -ErrorAction SilentlyContinue
}
}
Remove-Variable function

# Source config files
Expand Down Expand Up @@ -83,4 +84,4 @@ if (Get-Command fastfetch -ErrorAction SilentlyContinue) {
Return
}
fastfetch
}
}

0 comments on commit 694bcb1

Please sign in to comment.