Merge branch 'master' of github.com:fleschutz/PowerShell

This commit is contained in:
Markus Fleschutz 2021-04-25 18:51:55 +02:00
commit 40d9935794
2 changed files with 11 additions and 9 deletions

View File

@ -28,15 +28,15 @@ try {
$Desc = $Hourly.weatherDesc.value
if ($Hour -eq 0) {
if ($Day -eq 0) {
"🕗 🌡 ☂️ 💨 ☀️ ☁️ TODAY at $Area ($Region, $Country)"
"🕗 🌡°C ☂️ 💨 ☀️ ☁️ TODAY at $Area ($Region, $Country)"
} elseif ($Day -eq 1) {
" TOMORROW"
" TOMORROW"
} else {
" DAY AFTER TOMORROW"
" DAY AFTER TOMORROW"
}
$Day++
}
"$($Hour)°°`t$($Temp)°C`t$($Precip)mm $($Humidity)% $($WindSpeed)km/h from $WindDir`tUV$($UV) $($Pressure)hPa $($Clouds)% $Desc"
"$(($Hour.toString()).PadLeft(2))°° $(($Temp.toString()).PadLeft(2))° $($Precip)mm $($Humidity)% $($WindSpeed)km/h from $WindDir`tUV$($UV) $($Pressure)hPa $($Clouds)% $Desc"
$Hour++
}

View File

@ -10,7 +10,7 @@ if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME }
$Hostname = $(hostname)
$host.ui.RawUI.WindowTitle = "$Username @ $Hostname"
$Time = (get-date).ToString('t')
"Welcome 🧑$Username at 📂$(Get-Location) on 💻$Hostname, it's $Time"
"Hi 🧑$Username, welcome to 💻$Hostname at 📂$(Get-Location), it's $Time"
# My Command Prompt
@ -28,7 +28,9 @@ del alias:pwd -force
set-alias -name pwd -value list-workdir.ps1 # pwd = print working directory
set-alias -name ll -value get-childitem # ll = list long
set-alias -name lsf -value list-dir.ps1 # lsf = list directory formatted
set-alias -name .. -value cd-up.ps1 # one dir up
set-alias -name ... -value cd-up2.ps1 # two dirs up
set-alias -name .... -value cd-up3.ps1 # three dirs up
set-alias -name ..... -value cd-up4.ps1 # four dirs up
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