+ Add pfetch-like motd (admire the worst Windows ASCII logi :) )
This commit is contained in:
parent
928c35c3b2
commit
78e8ac0865
4 changed files with 38 additions and 5 deletions
|
@ -1,4 +1,36 @@
|
|||
# ----- Messy function to make it looks like my zsh theme
|
||||
function UsernameAtComputer
|
||||
{
|
||||
if (! "$env:ComputerName" -eq "") {
|
||||
$compname = $env:ComputerName
|
||||
}
|
||||
else {
|
||||
$compname = "unknown"
|
||||
}
|
||||
if (! "$env:UserName" -eq "") {
|
||||
$username = $env:UserName
|
||||
}
|
||||
if (! "$env:USER" -eq "") {
|
||||
$username = $env:USER
|
||||
}
|
||||
else {
|
||||
$username = "unknown"
|
||||
}
|
||||
"`e[35;1m" + $username + "`e[0m`e[1m@" + "`e[35;1m" + $compname
|
||||
}
|
||||
Write-Host " `e[34;1m ,___---'‾‾‾|`e[0m " (UsernameAtComputer)
|
||||
Write-Host " `e[34;1m|'‾ | | "
|
||||
Write-Host " `e[34;1m| | |"
|
||||
Write-Host " `e[34;1m|------|------|"
|
||||
Write-Host " `e[34;1m| | |"
|
||||
Write-Host " `e[34;1m|,_ | |"
|
||||
Write-Host " `e[34;1m '‾‾‾---,___|"
|
||||
|
||||
# ----- set default color
|
||||
Set-PSReadlineOption -Colors @{ Parameter = "`e[96m"}
|
||||
Set-PSReadlineOption -Colors @{ Operator = "`e[96m"}
|
||||
Set-PSReadlineOption -Colors @{ String = "`e[93m"}
|
||||
|
||||
# ----- Messy function to make it looks like my zsh theme / git support
|
||||
function Git-Status
|
||||
{
|
||||
"$([char]27)[31m"
|
||||
|
@ -18,7 +50,8 @@ function Git-Branch
|
|||
}
|
||||
function getdir
|
||||
{
|
||||
((Get-Location) -replace '/home/[a-zA-Z]*','~')
|
||||
# ((Get-Location) -replace '[a-zA-Z].\\','~\') # change 'c:/' into '~' (optional)
|
||||
((Get-Location) -replace '/home/[a-zA-Z]*','~') # change '/home/<username>' into '~'
|
||||
}
|
||||
function end_of_prompt
|
||||
{
|
||||
|
@ -42,3 +75,4 @@ $([char]27)[34;1m" + $env:COMPUTERNAME + "" + (getdir) + (end_of_prompt)
|
|||
|
||||
# ----- Aliases
|
||||
New-Alias vim nvim
|
||||
function q{exit}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue