Sync .bashrc with terezi, add .bashrc.terezi

This commit is contained in:
Lexi / Zoe 2019-01-07 01:46:57 +01:00
parent 3f12c22c0f
commit 4b5cff266b
2 changed files with 30 additions and 4 deletions

11
.bashrc
View File

@ -15,7 +15,7 @@ export PROMPT_DIRTRIM=3
export TERM=xterm-color
export GREP_OPTS='--color=auto'
export LS_OPTS='--color=auto -hFN --group-directories-first'
export LESS="--RAW-CONTROL-CHARS -i"
export LESS="-Ri"
# Colored man pages
man() {
@ -49,8 +49,10 @@ alias enby='man'
alias gvimr='gvim --remote-silent'
alias xclip_='xclip -selection clipboard'
# TODO fix mime stuff
alias xo='xdg-open'
# Open files according to MIME type
xo() {
(nohup mimeopen "$@" 2>/dev/null 1>&2 &)
}
# Wine aliases
alias wine32='env WINEARCH=win32 WINEPREFIX="$HOME/.wine32" wine'
@ -86,6 +88,7 @@ calc() {
# Define colors for bash prompt (will also be used in .bashrc.local)
TRED='\[\e[0;31m\]' # Red
TGREEN='\[\e[0;32m\]' # Green
TCYANB='\[\e[1;36m\]' # Cyan bold
TBLUE='\[\e[1;34m\]' # Blue
TWHITEB='\[\e[1;37m\]' # White bold
TRESET='\[\e[0m\]' # Text Reset
@ -101,5 +104,5 @@ fi
[[ -f ~/.bashrc.local ]] && source ~/.bashrc.local
# Clean up environment variables
unset TRED TGREEN TBLUE TWHITEB TRESET
unset TRED TGREEN TCYANB TBLUE TWHITEB TRESET

23
local/.bashrc.terezi Normal file
View File

@ -0,0 +1,23 @@
#
# ~/.bashrc.local -- terezi version
#
# Host-specific aliases
alias touchpad_disable='xinput set-prop 12 "Device Enabled" 0'
alias touchpad_enable='xinput set-prop 12 "Device Enabled" 1'
# Assume colors are set in global .bashrc:
# - TRED
# - TGREEN
# - TCYANB (bold)
# - TBLUE
# - TWHITEB (bold)
# - TRESET
# Set host-specific bash prompt: "user@host pwd >:] "
if [[ ${EUID} == 0 ]] ; then
PS1="${TRED}\u@\h ${TBLUE}\w ${TCYANB}>:] ${TRESET}"
else
PS1="${TGREEN}\u@\h ${TBLUE}\w ${TCYANB}>:] ${TRESET}"
fi