2018-12-03 22:48:36 +00:00
|
|
|
#!/bin/bash
|
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-12-23 00:26:02 +00:00
|
|
|
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)\]"
|
|
|
|
|
|
|
|
[ -f "$HOME/.shortcuts" ] && source "$HOME/.shortcuts" # Load shortcut aliases
|
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"
|
2018-01-22 01:29:48 +00:00
|
|
|
alias sdn="sudo shutdown now"
|
|
|
|
alias psref="gpg-connect-agent RELOADAGENT /bye" # Refresh gpg
|
2019-01-05 04:08:12 +00:00
|
|
|
alias gua="git remote | xargs -L1 git push --all"
|
2018-01-22 01:29:48 +00:00
|
|
|
|
|
|
|
# Some aliases
|
2018-12-03 22:48:36 +00:00
|
|
|
alias e="$EDITOR"
|
2018-01-22 01:29:48 +00:00
|
|
|
alias p="sudo pacman"
|
2018-04-23 15:40:41 +00:00
|
|
|
alias SS="sudo systemctl"
|
2019-01-13 23:45:33 +00:00
|
|
|
alias v="$EDITOR"
|
2019-01-05 04:08:12 +00:00
|
|
|
alias f="vifm"
|
2018-01-22 01:29:48 +00:00
|
|
|
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"
|
2019-01-05 04:08:12 +00:00
|
|
|
alias ref="shortcuts >/dev/null ; source ~/.bashrc" # Refresh shortcuts manually and reload bashrc
|
|
|
|
alias mpv="mpv --input-ipc-server=/tmp/mpvsoc$(date +%s)"
|
|
|
|
alias x="sxiv -ft *"
|
2019-01-11 19:59:43 +00:00
|
|
|
alias lsp="pacman -Qett --color=always | less"
|
2018-01-22 01:29:48 +00:00
|
|
|
|
|
|
|
# Adding color
|
|
|
|
alias ls='ls -hN --color=auto --group-directories-first'
|
2018-12-03 22:48:36 +00:00
|
|
|
alias grep="grep --color=auto"
|
2018-12-01 22:47:43 +00:00
|
|
|
alias diff="diff --color=auto"
|
2018-10-01 15:08:10 +00:00
|
|
|
alias ccat="highlight --out-format=ansi" # Color cat - print file with syntax highlighting.
|
2018-01-22 01:29:48 +00:00
|
|
|
|
|
|
|
# Internet
|
2019-01-05 04:09:26 +00:00
|
|
|
alias yt="youtube-dl --add-metadata -i" # Download video link
|
2018-10-07 12:47:05 +00:00
|
|
|
alias yta="yt -x -f bestaudio/best" # Download only audio
|
2018-01-22 01:29:48 +00:00
|
|
|
alias YT="youtube-viewer"
|
2018-08-04 03:23:43 +00:00
|
|
|
|
|
|
|
shdl() { curl -O $(curl -s http://sci-hub.tw/"$@" | grep location.href | grep -o http.*pdf) ;}
|
2019-01-05 04:09:26 +00:00
|
|
|
se() { du -a ~/.scripts/* ~/.config/* | awk '{print $2}' | fzf | xargs -r $EDITOR ;}
|
|
|
|
sv() { vcopy "$(du -a ~/.scripts/* ~/.config/* | awk '{print $2}' | fzf)" ;}
|
|
|
|
vf() { fzf | xargs -r -I % $EDITOR % ;}
|