update prompt, move aliases to bashrc_local

This commit is contained in:
tengel 2024-03-20 11:25:14 -05:00
parent 500ebb7baa
commit f5a20ac573

43
bashrc
View file

@ -12,23 +12,11 @@ shopt -s cmdhist histappend
PATH=$PATH:$HOME/.local/bin:$HOME/bin PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH export PATH
# these screw up pipes to sed et. al
unalias grep 2>/dev/null
unalias egrep 2>/dev/null
unalias fgrep 2>/dev/null
# If not running interactively, don't do anything else # If not running interactively, don't do anything else
[[ $- != *i* ]] && return [[ $- != *i* ]] && return
# User specific aliases and functions # User specific aliases and functions
alias ls='ls --color=auto' [ -f "${HOME}/.bashrc_local" ] && source "${HOME}/.bashrc_local"
alias vi="vim"
alias ntop="sudo nethogs wlp3s0"
alias mirrorme="mplayer -vf mirror -v tv:// -tv device=/dev/video0:driver=v4l2"
alias psave="sudo cpupower frequency-set -g powersave"
alias pperf="sudo cpupower frequency-set -g performance"
alias pcheck="sudo cpupower frequency-info -o"
alias words="shuf ~/tmp/words.txt | grep -v \"'s\" | head -21"
# stop quotes around ls which coreutils introduced # stop quotes around ls which coreutils introduced
export QUOTING_STYLE=literal export QUOTING_STYLE=literal
@ -51,8 +39,35 @@ if [[ "X${DESKTOP_SESSION}" == "Xmate" ]] || \
export TERM=xterm-256color export TERM=xterm-256color
fi fi
# prompt
#force_color_prompt=yes
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
if [ -n "$force_color_prompt" ]; then
# 'tput setaf 1' attempts to set foreground color using ANSI escape
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors \
&& eval "$(dircolors -b ~/.dircolors)" \
|| eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
else
PS1='\u@\h:\w\$ '
fi
# general # general
PS1='[\u@\h $PWD]\n$ '
BC_ENV_ARGS="-l -q" BC_ENV_ARGS="-l -q"
MOZ_DISABLE_PANGO=1 MOZ_DISABLE_PANGO=1
export PS1 BC_ENV_ARGS MOZ_DISABLE_PANGO export PS1 BC_ENV_ARGS MOZ_DISABLE_PANGO