]> us-delaporte.pagekite.me Git - dotfiles.git/commitdiff
Cleanup PS Profile
authorEdTheDev <edward@delaporte.us>
Sat, 30 Jan 2021 21:50:53 +0000 (15:50 -0600)
committerEdTheDev <edward@delaporte.us>
Sat, 30 Jan 2021 21:50:53 +0000 (15:50 -0600)
Microsoft.PowerShell_profile.ps1
Toybox/toybox.psm1
cheatsheets/paths.md [new file with mode: 0644]
setup/powershell.ps1 [new file with mode: 0644]
vimrc

index 64fd37c591215eb14947f7044e086567bab63256..bd16cbbd7a2b5842a1a8e3bc7242c7deb87be166 100644 (file)
@@ -1,7 +1,4 @@
-
-## Setup reminder:
-# code $profile
-# Set-ExecutionPolicy RemoteSigned
+# .EXAMPLE
 # . C:\src\dotfiles\Microsoft.PowerShell_profile.ps1
 
 Import-Module posh-git
@@ -12,32 +9,16 @@ Import-Module posh-git
 #}
 $env:PSModulePath = $env:PSModulePath.Replace("\\ad.uillinois.edu\techsvc\home\$($ENV:USERNAME)\Documents\PowerShell\Modules;",'')
 
-# Kali linux env
-$ENV:PATH +=":/home/delaport/development/flutter/bin" # Flutter in Kali under WSL
-
-# Some Paths that are annoying to find/restore if the installer fails
 if($IsWindows -eq "") {
        # Bootstrap for older PowerShell
        $IsWindows = ($env:OS -eq "Windows_NT")
 }
 if($IsWindows){
+       # Some Paths that are annoying to find/restore if the installer fails
        $ENV:PATH+=";C:\Program Files\Microsoft VS Code\bin" # One Editor to rule them all
-       $ENV:PATH+=";C:\Program Files\Python38\Scripts\;C:\Program Files\Python38\" # Python latest as of 2019 December
-       $ENV:PATH+=";C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin" # Docker for R Studio and Jupyter
-       $ENV:PATH+=";C:\Program Files (x86)\Common Files\Oracle\Java\javapath" # Don't remember why I still care about Java.
        $ENV:PATH+=";C:\Program Files\Git\cmd" # Version control is nice.
        $ENV:PATH+=";C:\ProgramData\chocolatey\bin" # Package management is nice.
-       $ENV:PATH+=";C:\Program Files\nodejs" # KataKoda wants to add tools via npm
        $ENV:PATH+=";C:\PENGUIN" # Flag to ensure my profile kicked in.
-
-       function Find-LargeFiles() {
-                Get-ChildItem c:\ -r| sort -descending -property length | select -first 10 name, Length, FullName
-       }
-
-       function List-DriveSpace() {
-               Get-PSDrive C | Select-Object Used,Free
-       }
-
 }
 
 # Import some home grown PowerShell modules, if they are installed.
@@ -50,14 +31,6 @@ $modPaths | ForEach-Object {
   }
 }
 
-
-function Export-VSCodeExtensions {
-  code --list-extensions | Out-File -FilePath /src/dotfiles/vscode-extensions.txt
-  Get-Content -Path /src/dotfiles/vscode-extensions.txt
-}
-
-
-
 # Linux-like up/down in shell
 Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward 
 Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward 
index 4b7d1e52ef8e473ff171008635dc10afff4648a2..00824b282259c744d33d6964e307195c3b7fcd9d 100644 (file)
@@ -5,3 +5,20 @@ $TOYBOX_ROOT = "C:\src\dotfiles\toybox"
 # }
 
 # Export-ModuleMember -Function Start-DockerPythonWhatever
+#
+function Find-LargeFiles() {
+        Get-ChildItem c:\ -r| sort -descending -property length | select -first 10 name, Length, FullName
+}
+
+function List-DriveSpace() {
+       Get-PSDrive C | Select-Object Used,Free
+}
+
+# function Export-VSCodeExtensions {
+#  code --list-extensions | Out-File -FilePath /src/dotfiles/vscode-extensions.txt
+#  Get-Content -Path /src/dotfiles/vscode-extensions.txt
+#}
+
+Export-ModuleMember -Function List-DriveSpace
+Export-ModuleMember -Function List-LargeFiles
+
diff --git a/cheatsheets/paths.md b/cheatsheets/paths.md
new file mode 100644 (file)
index 0000000..4aad325
--- /dev/null
@@ -0,0 +1,11 @@
+\r
+```powershell\r
+       $ENV:PATH+=";C:\Program Files\Microsoft VS Code\bin" # One Editor to rule them all\r
+       $ENV:PATH+=";C:\Program Files\Python38\Scripts\;C:\Program Files\Python38\" # Python latest as of 2019 December\r
+       $ENV:PATH+=";C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin" # Docker for R Studio and Jupyter\r
+       $ENV:PATH+=";C:\Program Files (x86)\Common Files\Oracle\Java\javapath" # Don't remember why I still care about Java.\r
+       $ENV:PATH+=";C:\Program Files\Git\cmd" # Version control is nice.\r
+       $ENV:PATH+=";C:\ProgramData\chocolatey\bin" # Package management is nice.\r
+       $ENV:PATH+=";C:\Program Files\nodejs" # KataKoda wants to add tools via npm\r
+       $ENV:PATH+=";C:\PENGUIN" # Flag to ensure my profile kicked in.\r
+```\r
diff --git a/setup/powershell.ps1 b/setup/powershell.ps1
new file mode 100644 (file)
index 0000000..d422a12
--- /dev/null
@@ -0,0 +1 @@
+Set-ExecutionPolicy RemoteSigned\r
diff --git a/vimrc b/vimrc
index c5abfc2b1ca70164e5ce3c62388551cda471b5a2..fb601cbf83d9c23c0b02b1369658ea50f77855f3 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -62,3 +62,4 @@ set tabstop=2
 set shiftwidth=2
 
 colorscheme slate
+set number