Replaced powerline with powerline-go
This commit is contained in:
parent
dd8554f7fa
commit
de93cfdba4
17
rc.d/prompt
Normal file → Executable file
17
rc.d/prompt
Normal file → Executable file
@ -1,10 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Customize the prompt
|
||||
if [ "$UID" -eq 0 ]; then
|
||||
export PS1='\[\e[01;31m\]\u@\h\[\e[01;34m\] \w \$\[\e[0m\] '
|
||||
|
||||
if (which powerline-go &> /dev/null); then
|
||||
function _update_ps1() {
|
||||
PS1="$(powerline-go -error $?)"
|
||||
}
|
||||
if [ "$TERM" != "linux" ] ; then
|
||||
export PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
||||
fi
|
||||
else
|
||||
export PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \w \$\[\e[0m\] '
|
||||
if [ "$UID" -eq 0 ]; then
|
||||
export PS1='\[\e[01;31m\]\u@\h\[\e[01;34m\] \w \$\[\e[0m\] '
|
||||
else
|
||||
export PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \w \$\[\e[0m\] '
|
||||
fi
|
||||
fi
|
||||
|
||||
# Limit the path to 3 levels
|
||||
@ -21,4 +31,3 @@ PROMPT_DIRTRIM=3
|
||||
# fi
|
||||
#}
|
||||
#export PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \w \$\[\e[0m\] '"\$(smiley) "
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Change the window title of X terminals
|
||||
case $TERM in
|
||||
xterm*|rxvt*|urxvt*|Eterm)
|
||||
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
|
||||
;;
|
||||
screen*)
|
||||
PROMPT_COMMAND='echo -ne "\033k${USER}@${HOSTNAME%%.*}\033\\"'
|
||||
;;
|
||||
esac
|
@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Powerline
|
||||
POWERLINE_FILE=/usr/share/powerline/bash/powerline.sh
|
||||
|
||||
if [ -f "${POWERLINE_FILE}" -a -z "$SSH_CONNECTION" ]
|
||||
then
|
||||
|
||||
#export URXVT_FONT_NAME="Terminus for Powerline"
|
||||
export URXVT_FONT_NAME="DejaVu Sans Mono for Powerline"
|
||||
export URXVT_FONT_SIZE="8"
|
||||
|
||||
xrdb -merge <<"EOF"
|
||||
XTerm*utf8: 1
|
||||
XTerm*faceName: ${URXVT_FONT_NAME}
|
||||
XTerm*faceSize: ${URXVT_FONT_SIZE}
|
||||
UXTerm*utf8: 1
|
||||
UXTerm*faceName: ${URXVT_FONT_NAME}
|
||||
UXTerm*faceSize: ${URXVT_FONT_SIZE}
|
||||
URxvt*font: xft:${URXVT_FONT_NAME}-${URXVT_FONT_SIZE}
|
||||
EOF
|
||||
test -f ~/.Xresources.powerline && xrdb -merge ~/.Xresources.powerline
|
||||
|
||||
urxvt_set_font "${URXVT_FONT_NAME}-${URXVT_FONT_SIZE}"
|
||||
source ${POWERLINE_FILE}
|
||||
fi
|
Loading…
Reference in New Issue
Block a user