Pulling then pushing.

This commit is contained in:
Derek Taylor
2020-02-16 23:15:06 -06:00
parent 08bb21b269
commit 2c0c2ae9a7
33 changed files with 572 additions and 609 deletions

106
.bashrc
View File

@@ -1,13 +1,11 @@
# ____ _____
# ____ _____
# | _ \_ _| Derek Taylor (DistroTube)
# | | | || | http://www.youtube.com/c/DistroTube
# | |_| || | http://www.gitlab.com/dwt1/
# |____/ |_|
#
# My bash config. Not much to see here. Some pretty standard stuff.
EDITOR="emacsclient -c"
export TERM="xterm-256color"
# | |_| || | http://www.gitlab.com/dwt1/
# |____/ |_|
EDITOR=vim
export TERM="st-256color"
[[ $- != *i* ]] && return
@@ -42,7 +40,7 @@ colors() {
# Change the window title of X terminals
case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|st|interix|konsole*)
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
;;
screen*)
@@ -82,9 +80,10 @@ if ${use_color} ; then
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
fi
grep='grep --colour=auto' \
egrep='egrep --colour=auto' \
fgrep='fgrep --colour=auto'
alias ls='ls --color=auto'
alias grep='grep --colour=auto'
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'
else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
@@ -96,6 +95,16 @@ fi
unset use_color safe_term match_lhs sh
alias cp="cp -i" # confirm before overwriting something
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias np='nano -w PKGBUILD'
alias more=less
# terminal rickroll!
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
xhost +local:root > /dev/null 2>&1
complete -cf sudo
@@ -113,72 +122,37 @@ shopt -s expand_aliases
# Enable history appending instead of overwriting. #139609
shopt -s histappend
### ARCHIVE EXTRACTION ###
# usage: ex <file>
#
# # ex - archive extractor
# # usage: ex <file>
ex ()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2|*.tbz2) tar xjf $1 ;;
*.tar.gz|*.tgz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
### ALIASES ###
# navigation
alias ..='cd ..' \
...='cd ../..'
# better yaourt colors
export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35"
# broot
alias br='br -dhp'
alias bs='br --sizes'
neofetch
# Changing "ls" to "exa"
alias ls='exa -al --color=always --group-directories-first' # my preferred listing
alias la='exa -a --color=always --group-directories-first' # all files and dirs
alias ll='exa -l --color=always --group-directories-first' # long format
alias lt='exa -aT --color=always --group-directories-first' # tree listing
# adding flags
alias cp="cp -i" # confirm before overwriting something
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias lynx='lynx -cfg=~/.lynx/lynx.cfg -lss=~/.lynx/lynx.lss -vikeys'
alias vifm='./.config/vifm/scripts/vifmrun'
# the terminal rickroll
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
# bare git repo alias for dotfiles
alias config="/usr/bin/git --git-dir=$HOME/dotfiles --work-tree=$HOME"
# termbin
alias config='/usr/bin/git --git-dir=/home/dt/dotfiles --work-tree=/home/dt'
alias tb="nc termbin.com 9999"
### ENABLE VI MODE ###
set -o vi
### SET VIM AS MANPAGER ###
export MANPAGER="/bin/sh -c \"col -b | vim --not-a-term -c 'set ft=man ts=8 nomod nolist noma' -\""
### BASH POWERLINE ###
source ~/.bash-powerline.sh
### BROOT ###
source /home/dt/.config/broot/launcher/bash/br
### BASH INSULTER ###
if [ -f /etc/bash.command-not-found ]; then
. /etc/bash.command-not-found
fi