]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - files/Microsoft.PowerShell_profile.ps1
Merge branch 'main' of github.com:edthedev/dotfiles
[dotfiles.git] / files / Microsoft.PowerShell_profile.ps1
index ca6cfd66bf7b67e2765d16307a9a1bc1395d7d35..04d9c45c1fc10a753e81db3f29a8b25c1d8916a1 100644 (file)
@@ -1,35 +1,39 @@
-
-$env:src = "~\src"
-Import-Module $env:src\dotfiles\psmodules\add_to_profile.psm1
-Add-ToProfile $env:src\dotfiles\files\paths.ps1
-Add-ToProfile $env:src\dotfiles\files\env.ps1
-Add-ToProfile $env:src\dotfiles\files\load_modules.ps1
-
-# You can pry my unix commands out of my cold dead fingers
-Set-Alias which get-command
-
-# Linux-like up/down in shell
-Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward 
-Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward 
-Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
+$env:src = "$HOME\src"
+$env:dotfiles = "$HOME\dotfiles"
+Import-Module $env:dotfiles\psmodules\add_to_profile.psm1
+Add-ToProfile $env:dotfiles\files\paths.ps1
+Add-ToProfile $env:dotfiles\files\env.ps1
 
 # Delay loading PoshGit for speed. 
 function Enable-PoshGit {
        Import-Module posh-git
 }
 New-Alias pg    Enable-PoshGit
 
 # Delay loading PoshGit for speed. 
 function Enable-PoshGit {
        Import-Module posh-git
 }
 New-Alias pg    Enable-PoshGit
+
+Set-Alias code codium  # Prefer Codium
+
+# You can pry my unix commands out of my cold dead fingers
+Set-Alias which get-command
+# Reject Windows heritage, act like Vi
+# Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
+Set-PSReadlineOption -BellStyle Visual
+Set-PSReadlineOption -ViModeIndicator Prompt
+Set-PSReadlineOption -EditMode Vi
+
 Write-Host "+ Type 'pg' to enable PoshGit"
 Write-Host "+ Type 'pg' to enable PoshGit"
+Write-Host 'See $env:realProfile for version controlled profile file.'
 
 
-# Let's face it, I'm about to cd into my source directory
-if((Get-Location).Path -eq $HOME){
-       cd $env:src
-}
+# Load some modules
+$env:psmodules = "$env:dotfiles\psmodules"
+Import-Module "$env:psmodules\dash.psm1"
+Import-Module $env:PSModules\file_management.psm1
+Import-Module "$env:psmodules\fix_vpn.psm1"
 
 
-# Dashboard
-New-Alias dash   Show-MyDashboard # from dash.psm1
+# Let's face it, I'm about to cd into my source directory
+if((Get-Location).Path -eq $HOME){ cd $env:src }
 
 function Get-JournalAgenda() {
 
 function Get-JournalAgenda() {
-       agenda.exe -path "$HOME/Journal/{YYYY}/{MM}-{DD}.md"
+    # Write-Host "Reading from $HOME\Journal\{YYYY}\{MM}-{DD}.md"
+    agenda.exe -path "$HOME\Journal\{YYYY}\{MM}-{DD}.md"
 }
 New-Alias today Get-JournalAgenda
 }
 New-Alias today Get-JournalAgenda
-# Write-Host "Real profile file is at $env:realProfile ($$env:realProfile)"
\ No newline at end of file