2018-10-01 15:08:10 +00:00
|
|
|
# _ _
|
|
|
|
# | |__ __ _ ___| |__ _ __ ___
|
|
|
|
# | '_ \ / _` / __| '_ \| '__/ __|
|
|
|
|
# | |_) | (_| \__ \ | | | | | (__
|
|
|
|
# |_.__/ \__,_|___/_| |_|_| \___|
|
|
|
|
|
|
|
|
stty -ixon # Disable ctrl-s and ctrl-q.
|
2018-01-22 01:29:48 +00:00
|
|
|
shopt -s autocd #Allows you to cd into directory merely by typing the directory name.
|
2018-10-01 15:08:10 +00:00
|
|
|
HISTSIZE= HISTFILESIZE= # Infinite history.
|
2018-01-22 01:29:48 +00:00
|
|
|
|
|
|
|
# Setting Bash prompt. Capitalizes username and host if root user (my root user uses this same config file).
|
|
|
|
if [ "$EUID" -ne 0 ]
|
|
|
|
then export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
|
|
|
|
else export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]ROOT\[$(tput setaf 2)\]@\[$(tput setaf 4)\]$(hostname | awk '{print toupper($0)}') \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
|
|
|
|
fi
|
|
|
|
|
2018-08-04 03:23:43 +00:00
|
|
|
export GPG_TTY=$(tty)
|
|
|
|
|
2018-01-22 01:29:48 +00:00
|
|
|
# System Maintainence
|
2018-02-13 23:17:52 +00:00
|
|
|
alias mw="~/.config/mutt/mutt-wizard.sh"
|
|
|
|
alias muttwizard="~/.config/mutt/mutt-wizard.sh"
|
2018-04-23 15:40:41 +00:00
|
|
|
alias progs="(pacman -Qet && pacman -Qm) | sort -u" # List programs I've installed
|
2018-01-22 01:29:48 +00:00
|
|
|
alias orphans="pacman -Qdt" # List orphan programs
|
|
|
|
alias sdn="sudo shutdown now"
|
|
|
|
alias psref="gpg-connect-agent RELOADAGENT /bye" # Refresh gpg
|
|
|
|
|
|
|
|
# Some aliases
|
|
|
|
alias p="sudo pacman"
|
2018-04-23 15:40:41 +00:00
|
|
|
alias SS="sudo systemctl"
|
2018-01-22 01:29:48 +00:00
|
|
|
alias v="vim"
|
|
|
|
alias sv="sudo vim"
|
|
|
|
alias r="ranger"
|
|
|
|
alias sr="sudo ranger"
|
|
|
|
alias ka="killall"
|
|
|
|
alias g="git"
|
2018-03-26 15:00:34 +00:00
|
|
|
alias trem="transmission-remote"
|
2018-02-13 23:18:29 +00:00
|
|
|
alias mkd="mkdir -pv"
|
2018-02-20 21:29:53 +00:00
|
|
|
alias ref="shortcuts.sh && source ~/.bashrc" # Refresh shortcuts manually and reload bashrc
|
2018-01-22 01:29:48 +00:00
|
|
|
alias bw="wal -i ~/.config/wall.png" # Rerun pywal
|
2018-08-04 03:23:43 +00:00
|
|
|
alias pi="bash ~/.larbs/wizard/wizard.sh"
|
2018-01-22 01:29:48 +00:00
|
|
|
|
|
|
|
# Adding color
|
|
|
|
alias ls='ls -hN --color=auto --group-directories-first'
|
2018-10-01 15:08:10 +00:00
|
|
|
alias grep="grep --color=auto" # Color grep - highlight desired sequence.
|
|
|
|
alias ccat="highlight --out-format=ansi" # Color cat - print file with syntax highlighting.
|
2018-01-22 01:29:48 +00:00
|
|
|
|
|
|
|
# Internet
|
|
|
|
alias yt="youtube-dl --add-metadata -ic" # Download video link
|
|
|
|
alias yta="youtube-dl --add-metadata -xic" # Download only audio
|
|
|
|
alias YT="youtube-viewer"
|
|
|
|
alias ethspeed="speedometer -r enp0s25"
|
|
|
|
alias wifispeed="speedometer -r wlp3s0"
|
|
|
|
alias starwars="telnet towel.blinkenlights.nl"
|
|
|
|
|
|
|
|
# TeX
|
|
|
|
alias Txa="cp ~/Documents/LaTeX/article.tex"
|
|
|
|
alias Txs="cp ~/Documents/LaTeX/beamer.tex"
|
|
|
|
alias Txh="cp ~/Documents/LaTeX/handout.tex"
|
|
|
|
|
2018-07-15 02:38:43 +00:00
|
|
|
source ~/.shortcuts
|
2018-08-04 03:23:43 +00:00
|
|
|
|
|
|
|
shdl() { curl -O $(curl -s http://sci-hub.tw/"$@" | grep location.href | grep -o http.*pdf) ;}
|