Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
105 lines (79 sloc) 2.23 KB
########
# Core #
########
alias mkdir='mkdir -p'
alias grep='grep --color=always'
alias ls='ls --color=always'
alias l='ls -lh' # Lists human readable sizes.
alias ll='l -A' # Lists human readable sizes, hidden files.
alias lr='l -R' # Lists human readable sizes, recursively.
alias lt='l -tr' # Lists sorted by date, most recent last.
###########
# Udiskie #
###########
alias um='udiskie-mount -r'
alias uu='udiskie-umount'
alias up='um -p "builtin:tty"'
#############
# Git Annex #
#############
alias gx='git annex'
alias gxa='git annex add'
alias gxs='git annex sync'
alias gxg='git annex get'
alias gxd='git annex drop'
alias gxc='git annex copy'
alias gxe='git annex edit'
gxurl() {
REPO="${1:-$HOME/documents}"
less "$REPO"/.git/annex/url
}
###############
# Taskwarrior #
###############
alias t='task'
alias ta='task add'
alias tm='task modify'
alias to='taskopen'
alias ti='task add due:tomorrow tag:inbox'
tn() {
if ! taskopen -a $1; then
task annotate notes $1
taskopen -a $1
fi
}
##########
# Pacman #
##########
alias update='sudo reflector -l 20 --sort rate --save /etc/pacman.d/mirrorlist && cat /etc/pacman.d/mirrorlist'
alias pacx="sudo pacman --remove"
alias pacX="sudo pacman --remove --nosave --recursive"
############
# My Repos #
############
alias lmr='mr --config $HOME/library/src/myrepos.conf --directory=$HOME/library/src'
alias wmr='mr --config $HOME/projects/tad/docs/config/myrepos.conf --directory=$HOME/projects/tad'
alias pmr='mr --config $HOME/projects/.mrconfig --directory=$HOME/projects'
########
# Pass #
########
alias cplogin='sed -n "/^login/Is/login:\s\+//p" | xsel -ib'
alias cpurl='sed -n "/^url/Is/url:\s\+//p" | xsel -ib'
_pw() {
local characters="${1}" length="${2:-25}"
bash -c 'read -r -n "$0" pass < <(LC_ALL=C tr -dc "$1" < /dev/urandom) && echo $pass' $length $characters
}
alias pw='_pw "[:graph:]"'
alias pw:a='_pw "[:alnum:]"'
alias pw:d='_pw "[:digit:]"'
########
# Misc #
########
alias mtr-report='mtr --report --report-cycles 10 --no-dns'
alias e='aunpack'
alias http-serve='python -m http.server'
alias bc='bc -lq'
alias utc='env TZ="UTC" date'
iowaiting() {
watch -n 1 "(ps aux | awk '\$8 ~ /D/ { print \$0 }')"
}