74 lines
1.6 KiB
Bash
74 lines
1.6 KiB
Bash
#
|
|
#
|
|
# ~/.bashrc
|
|
|
|
# If not running interactively, don't do anything
|
|
[[ $- != *i* ]] && return
|
|
FDSG="\[$(tput setaf 158)\]"
|
|
FINDIANRED="\[$(tput setaf 52)\]"
|
|
BGREEN="\[$(tput setab 3)\]"
|
|
BINDIANRED="\[$(tput setab 131)\]"
|
|
BORANGE="\[$(tput setab 214)\]"
|
|
FGREEN="\[$(tput setab 3)\]"
|
|
BOLD="\e[1m\]"
|
|
HIGHLIght="\e[7m\]"
|
|
RESET="\[$(tput sgr0)\]"
|
|
|
|
function srcdir {
|
|
dirname $(pwd)
|
|
}
|
|
|
|
function exitstatus {
|
|
if [[ $1 != 0 ]]; then
|
|
echo $1
|
|
fi
|
|
}
|
|
|
|
function __prompt_to_bottom_line() {
|
|
tput cup $LINES
|
|
}
|
|
__prompt_to_bottom_line
|
|
|
|
PS1="${BORANGE}${FINDIANRED}\$(exitstatus $(echo '$?'))${RESET}${FDSG}${BINDIANRED}[\u \! \W]>${RESET} "
|
|
|
|
|
|
# function cd {
|
|
# echo "$1"
|
|
# if "$1" -ne ""; then
|
|
# command cdJ "$1"
|
|
# else
|
|
# command cd
|
|
# fi
|
|
# }
|
|
|
|
# function test {
|
|
# echo 'test'
|
|
# }
|
|
# test
|
|
|
|
# ahead_behind () {
|
|
# curr_branch=$(git rev-parse --abbrev-ref HEAD);
|
|
# curr_remote=$(git config branch.$curr_branch.remote);
|
|
# curr_merge_branch=$(git config branch.$curr_branch.merge | cut -d / -f 3);
|
|
# git rev-list --left-right --count $curr_branch...$curr_remote/$curr_merge_branch | tr -s '\t' '|';
|
|
# }
|
|
|
|
# if git rev-parse --git-dir > /dev/null 2>&1; then
|
|
# PS1="\h:\w[\$(ahead_behind)]$"
|
|
# else
|
|
# PS1='[\u@\h \W]\$ '
|
|
# fi
|
|
|
|
bind Space:magic-space
|
|
alias ls='ls --color=auto'
|
|
alias grep='grep --color=auto'
|
|
alias lsp='ls -al --color=auto'
|
|
alias modosexo='kscreen-doctor output.DP-2.rotation.right'
|
|
alias nomodosexo='kscreen-doctor output.DP-2.rotation.none'
|
|
alias clear='clear -x && __prompt_to_bottom_line'
|
|
|
|
#No icons
|
|
echo -e "\033]32;\007" && tput cuu 1 && tput el && clear
|
|
|
|
export VITASDK=/usr/local/vitasdk
|
|
export PATH=$VITASDK/bin:$PATH
|