Advertisement
alaestor

$profile

Sep 23rd, 2024 (edited)
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 1.24 KB | Source Code | 0 0
  1. #
  2. # SYS SHORTS
  3. #
  4. function Which-Location { Get-Command $args | Select Source -ExpandProperty Source }
  5. New-Alias which Which-Location
  6.  
  7. del alias:cd -Force
  8. function Change-Directory { Set-Location -LiteralPath @args }
  9. New-Alias cd Change-Directory
  10.  
  11. function Dns-Resolve { $args | Resolve-DnsName -DnsOnly }
  12. New-Alias dns Dns-Resolve
  13.  
  14. New-Alias dns-clr Clear-DnsClientCache
  15.  
  16. function Turn-Screens-Off { (Add-Type '[DllImport("user32.dll")]public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2) }
  17. New-Alias soff Turn-Screens-Off
  18. #
  19. # WINGET SHORTS
  20. #
  21. function Winget-UpgradeAll { winget upgrade --all --include-unknown }
  22. New-Alias wup Winget-UpgradeAll
  23.  
  24. function Winget-Search { winget search $args }
  25. New-Alias wis Winget-Search
  26.  
  27. function Winget-Install { winget install $args }
  28. New-Alias wii Winget-Install
  29. #
  30. # APP SHORTS
  31. #
  32. function Launch-Neovim { wt --size 192,64 -d $pwd -p 'Neovim' 'nvim' $args }
  33. New-Alias vi Launch-Neovim
  34. #
  35. # PYTHON SHORTS
  36. #
  37. function PEnv-Init { penv init @args }
  38. New-Alias pei PEnv-Init
  39.  
  40. function PEnv-Activate { penv activate }
  41. New-Alias pea PEnv-Activate
  42.  
  43. function PEnv-Deactivate { deactivate }
  44. New-Alias ped PEnv-Deactivate
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement