Fix multiple prompt issues:
- fixed pwsh admin prompt colors - update .bashrc prompt to match pwsh styling - add dumb ascii art to .bashrc
This commit is contained in:
parent
2880f74f99
commit
435de2adfc
32
.bashrc
32
.bashrc
@ -1,16 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# glob filenames case-insensitively
|
shopt -s nocaseglob # glob filenames case-insensitively
|
||||||
shopt -s nocaseglob
|
shopt -s histappend # append history to history file, don't overwrite.
|
||||||
|
shopt -s checkwinsize # fix line wrap issues
|
||||||
|
|
||||||
# append history to history file, don't overwrite.
|
|
||||||
shopt -s histappend
|
|
||||||
|
|
||||||
# fix line wrap issues
|
set completion-ignore-case on # ignore case when tab-completing
|
||||||
shopt -s checkwinsize
|
|
||||||
|
|
||||||
# ignore case when tab-completing
|
|
||||||
set completion-ignore-case on
|
|
||||||
# find paths inside agares
|
# find paths inside agares
|
||||||
export AGARES=${AGARES:-"$HOME/.agares"}
|
export AGARES=${AGARES:-"$HOME/.agares"}
|
||||||
|
|
||||||
@ -50,12 +46,6 @@ export HISTFILESIZE=5000
|
|||||||
export HISTCONTROL="ignorespace"
|
export HISTCONTROL="ignorespace"
|
||||||
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
|
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# If set, the pattern "**" used in a pathname expansion context will
|
|
||||||
# match all files and zero or more directories and subdirectories.
|
|
||||||
#shopt -s globstar
|
|
||||||
|
|
||||||
# make less more friendly for non-text input files, see lesspipe(1)
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
@ -68,15 +58,23 @@ fi
|
|||||||
if [ -x /usr/bin/dircolors ]; then
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
#alias dir='dir --color=auto'
|
|
||||||
#alias vdir='vdir --color=auto'
|
|
||||||
|
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
alias fgrep='fgrep --color=auto'
|
alias fgrep='fgrep --color=auto'
|
||||||
alias egrep='egrep --color=auto'
|
alias egrep='egrep --color=auto'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PS1="\t:\[$(tput sgr0)\]\[\033[38;5;93m\]\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]✨ >> "
|
# this looks like garbage but its just color initation and termination
|
||||||
|
export PS1="\t \e[34mǰ \e[91m☭\e[0m "
|
||||||
|
|
||||||
export CLICOLOR=1
|
export CLICOLOR=1
|
||||||
export LSCOLORS=GxFxCxDxBxegedabagaced
|
export LSCOLORS=GxFxCxDxBxegedabagaced
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo " /'-./\_ | $HOSTNAME"
|
||||||
|
echo " : ||,> |"
|
||||||
|
echo " \.-'|| | $0"
|
||||||
|
echo -e "\e[31m || BURIED\e[0m |"
|
||||||
|
echo -e "\e[31m || HATCHET\e[0m | $OSTYPE"
|
||||||
|
echo -e "\e[31m ||\e[0m |"
|
||||||
|
echo ""
|
||||||
|
@ -67,13 +67,13 @@ function Set-UserPrompt {
|
|||||||
|
|
||||||
Write-Host $(get-date -format HH:mm:ss) -nonewline -foregroundcolor White
|
Write-Host $(get-date -format HH:mm:ss) -nonewline -foregroundcolor White
|
||||||
Write-Host " ǰ " -nonewline -foregroundcolor Blue
|
Write-Host " ǰ " -nonewline -foregroundcolor Blue
|
||||||
Write-Host "$DoublePrompt" -nonewline -foregroundcolor Green
|
|
||||||
$SoyAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
$SoyAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||||
if ($SoyAdmin) {
|
if ($SoyAdmin) {
|
||||||
Write-Host " $($SpecialCharacters.HammerSickle) " -NoNewLine -ForegroundColor Red -BackgroundColor Yellow
|
Write-Host " $HammerSickle " -NoNewLine -ForegroundColor Red -BackgroundColor Yellow
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Host $SpecialCharacters.DoublePrompt -NoNewLine -ForegroundColor White
|
Write-Host " $DoublePrompt " -NoNewLine -ForegroundColor Green
|
||||||
}
|
}
|
||||||
# Always return a string or PS will echo the standard "PS>" prompt and it will append to yours
|
# Always return a string or PS will echo the standard "PS>" prompt and it will append to yours
|
||||||
return " "
|
return " "
|
||||||
|
@ -23,6 +23,7 @@ catch {
|
|||||||
$osv = /usr/bin/uname -a
|
$osv = /usr/bin/uname -a
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
## Exported functions
|
## Exported functions
|
||||||
|
|
||||||
function Show-AsciiHatchet {
|
function Show-AsciiHatchet {
|
||||||
@ -64,7 +65,7 @@ function Show-AsciiBWWindowsLogo {
|
|||||||
|
|
||||||
function Show-AsciiCurvyWindowsLogo {
|
function Show-AsciiCurvyWindowsLogo {
|
||||||
newline
|
newline
|
||||||
whw -f red ' ,-~ ~-,' ; whw -f green ' ,_~ ~-, ' ; newline
|
whw -f red ' ,-~ ~-,' ; whw -f green ' ,_~ ~-, ' ; whw $env:COMPUTERNAME ; newline
|
||||||
whw -f red ' / /' ; whw -f green ' / / ' ; newline
|
whw -f red ' / /' ; whw -f green ' / / ' ; newline
|
||||||
whw -f red ' /,- -,/' ; whw -f green ' /,- -,/ ' ; whw $psv ; newline
|
whw -f red ' /,- -,/' ; whw -f green ' /,- -,/ ' ; whw $psv ; newline
|
||||||
whw -f blue ' ,-~ ~-,' ; whw -f yellow ' ,_~ ~-, ' ; newline
|
whw -f blue ' ,-~ ~-,' ; whw -f yellow ' ,_~ ~-, ' ; newline
|
||||||
|
Loading…
Reference in New Issue
Block a user