2021-04-16 18:46:03 +02:00
|
|
|
|
# My PowerShell Profile
|
2021-04-03 15:24:18 +02:00
|
|
|
|
# =====================
|
2021-04-10 09:11:56 +02:00
|
|
|
|
# Welcome to 'my-profile.ps1' - this file defines the look & feel of PowerShell.
|
2021-04-28 17:27:23 +02:00
|
|
|
|
# Adapt the following lines to your needs, please.
|
2021-04-10 09:11:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# My Welcome Message
|
|
|
|
|
# ------------------
|
2021-04-17 13:12:27 +02:00
|
|
|
|
if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME }
|
|
|
|
|
$Hostname = $(hostname)
|
2021-04-22 17:46:40 +02:00
|
|
|
|
$Time = (get-date).ToString('t')
|
2021-04-28 17:27:23 +02:00
|
|
|
|
$host.ui.RawUI.WindowTitle = "$Username @ $Hostname"
|
2021-04-25 19:25:00 +02:00
|
|
|
|
"🧑$Username entered 📂$(Get-Location) at 💻$Hostname, it's $Time"
|
2021-04-10 09:11:56 +02:00
|
|
|
|
|
|
|
|
|
|
2021-04-03 15:24:18 +02:00
|
|
|
|
# My Command Prompt
|
|
|
|
|
# -----------------
|
2021-04-28 17:36:47 +02:00
|
|
|
|
function prompt { write-host -noNewline -foregroundColor yellow "`n➤"; return " " } # result is: ➤
|
2021-02-27 11:19:57 +01:00
|
|
|
|
|
2021-04-03 15:24:18 +02:00
|
|
|
|
|
2021-04-10 09:11:56 +02:00
|
|
|
|
# My Alias Names (sorted alphabetically)
|
2021-04-03 15:24:18 +02:00
|
|
|
|
# --------------
|
2021-04-20 16:47:44 +02:00
|
|
|
|
del alias:pwd -force
|
|
|
|
|
set-alias -name pwd -value list-workdir.ps1 # pwd = print working directory
|
2021-04-10 09:11:56 +02:00
|
|
|
|
set-alias -name ll -value get-childitem # ll = list long
|
2021-04-20 17:04:52 +02:00
|
|
|
|
set-alias -name lsf -value list-dir.ps1 # lsf = list directory formatted
|
2021-04-25 10:25:03 +02:00
|
|
|
|
set-alias -name mute -value mute-audio.ps1
|
|
|
|
|
set-alias -name unmute -value unmute-audio.ps1
|
|
|
|
|
set-alias -name .. -value cd-up.ps1 # 1 dir level up
|
|
|
|
|
set-alias -name ... -value cd-up2.ps1 # 2 dir levels up
|
|
|
|
|
set-alias -name .... -value cd-up3.ps1 # 3 dir levels up
|
|
|
|
|
set-alias -name ..... -value cd-up4.ps1 # 4 dir levels up
|