]> apps.delaporte.us Git - dotfiles.git/blob - files/Microsoft.PowerShell_profile.ps1
WIP Add-Addresses
[dotfiles.git] / files / Microsoft.PowerShell_profile.ps1
1 $env:src = "$HOME\src"
2 $env:dotfiles = "$HOME\dotfiles"
3 Import-Module $env:dotfiles\psmodules\add_to_profile.psm1
4 Add-ToProfile $env:dotfiles\files\paths.ps1
5 Add-ToProfile $env:dotfiles\files\env.ps1
6
7 # Delay loading PoshGit for speed.
8 function Enable-PoshGit {
9 Import-Module posh-git
10 }
11 New-Alias pg Enable-PoshGit
12
13 Set-Alias code codium # Prefer Codium
14
15 # You can pry my unix commands out of my cold dead fingers
16 Set-Alias which get-command
17 # Reject Windows heritage, act like Vi
18 # Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
19 Set-PSReadlineOption -BellStyle Visual
20 Set-PSReadlineOption -ViModeIndicator Prompt
21 Set-PSReadlineOption -EditMode Vi
22
23 Write-Host "+ Type 'pg' to enable PoshGit"
24 Write-Host 'See $env:realProfile for version controlled profile file.'
25
26 # Load some modules
27 $env:psmodules = "$env:dotfiles\psmodules"
28 Import-Module "$env:psmodules\dash.psm1"
29 Import-Module $env:PSModules\file_management.psm1
30 Import-Module "$env:psmodules\fix_vpn.psm1"
31 Import-Module $env:PSModules\house_shopping.psm1
32
33 # Let's face it, I'm about to cd into my source directory
34 if((Get-Location).Path -eq $HOME){ cd $env:src }
35
36 function Get-JournalAgenda() {
37 # Write-Host "Reading from $HOME\Journal\{YYYY}\{MM}-{DD}.md"
38 agenda.exe -path "$HOME\Journal\{YYYY}\{MM}-{DD}.md"
39 }
40 New-Alias today Get-JournalAgenda