/etc/bash.bashrc.local
#
# /etc/bash.bashrc.local
#
#prompt
if [[ ${EUID} == 0 ]] ; then
PS1='\[\e[1;31m\][\[\e[1;39m\]\u\[\e[1;31m\]@\[\e[1;39m\]\h\[\e[0m\] \W\[\e[1;31m\]]\$\[\e[0m\] '
else
PS1='\[\e[1;34m\][\[\e[1;39m\]\u\[\e[1;34m\]@\[\e[1;39m\]\h\[\e[0m\] \W\[\e[1;34m\]]\$\[\e[0m\] '
fi
# editor
export EDITOR=vim
export VISUAL=vim
alias vi='vim'
#set -o vi
# wayland
SDL_VIDEODRIVER=wayland
QT_QPA_PLATFORM=wayland-egl
# mesa
MESA_GL_VERSION_OVERRIDE=3.3
MESA_GLSL_VERSION_OVERRIDE=150
# pacdiff
DIFFPROG=vimdiff # Default "vimdiff"
DIFFSEARCHPATH="/boot /etc /usr" # Default "/etc"
# fcitx
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
# color
export GREP_COLOR="1;33"
alias grep='grep --color=auto'
export LESS="-R"
alias ls='ls --color=auto'
eval $(dircolors -b)
alias diff='colordiff'
# colored man pages
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;37m") \
LESS_TERMCAP_md=$(printf "\e[1;37m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;47;30m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[0;36m") \
man "$@"
}
# modified commands
alias more='less'
alias df='df -h'
alias du='du -c -h'
alias mkdir='mkdir -p -v'
alias ..='cd ..'
alias cd..='cd ..'
# ls
alias ls='ls -hF --color=always' # human readable
alias lr='ls -R' # recursive
alias ll='ls -l' # list
alias la='ll -la' # list hidden files
alias lx='ll -BX' # sort by extension
alias lz='ll -rS' # sort by size
alias lt='ll -rT' # sort by date
alias lm='la | more'
# safety features
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
alias ln='ln -i'
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
.zshrc
#
# ~/.zshrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# prompt
#PS1='\[\e[1;34m\][\[\e[1;39m\]\u\[\e[1;34m\]@\[\e[1;39m\]\h\[\e[0m\] \W\[\e[1;34m\]]\$\[\e[0m\] '
# powerline
powerline-daemon -q
. /usr/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh
# editor
export EDITOR=vim
export VISUAL=vim
#set -o vi
# zsh
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
setopt autocd extendedglob
#setopt appendhistory autocd extendedglob
zstyle :compinstall filename '/home/remy/.zshrc'
autoload -Uz compinit
compinit
# End of lines configured by zsh-newuser-install
## Search history
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-beginning-search
[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-beginning-search
# shell options
# ...