Browse Source

Cleaned up alias file.

master
Daniel Sissom 5 years ago
parent
commit
379c74f7d5
Signed by untrusted user who does not match committer: djsissom GPG Key ID: 2C30FFB796852389
1 changed files with 99 additions and 29 deletions
  1. + 99
    - 29
      sh/aliases

+ 99
- 29
sh/aliases

@ -6,66 +6,128 @@
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# general usage
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Host-agnostic aliases
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Getting around
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias u='cd ..'
alias back='cd "$OLDPWD"'
#alias ls='ls --group-directories-first'
alias ls='ls --literal'
alias ll='ls -lh'
alias la='ls -A'
alias list='ls -lhA'
alias tree='tree -Chug'
alias ds='du -hsc * | sort -h'
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Safety
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias mv='mv -i'
alias cp='cp -i'
alias ds='du -hsc * | sort -h'
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Avoid graphical environments when possible
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias truecrypt='truecrypt -t'
alias veracrypt='veracrypt -t'
if [[ "${DISPLAY}" == localhost:?*.0 ]]; then
alias vim='/usr/bin/vim -display localhost:0' # keep from launching X11 on OS X over SSH sessions
fi
alias truecrypt='truecrypt -t'
alias kp="kpcli --kdb ~/Local/key/KeePass/master.kdbx --key ~/Local/key/master.key --histfile /dev/null"
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Quick setup and fixes
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias xtv='xrandr --output HDMI-0 --auto --same-as DVI-I-1'
alias mic='echo "Starting jack mic input..." && alsa_in -j mic -d hw:USB -r 192000 -c 2 -p 512 -n 3'
alias gamepad="xboxdrv --silent --detach-kernel-driver --mimic-xpad" # run as root
alias todo='vim ~/.todo.tp'
if [[ "$TERM" == rxvt-unicode-256color || "$TERM" == xterm-256color ]]; then
alias catimg='catimg -t'
fi
# random fun stuff
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Curses program settings
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias todo='vim ~/.todo.tp'
alias tclock='tty-clock -sctb -d 0 -a 10000000 -C 6 -f "%Y/%m/%d"'
alias blah='while true; do head -c8 /dev/urandom; sleep 0.02; done | hexdump -C'
#alias engage='play -r 44100 -c2 -n synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +16'
alias engage='play -c2 -n -t alsa synth whitenoise band -n 100 24 band -n 300 100 gain +16'
#alias matrix='cmatrix -ab -u2'
alias matrix='unimatrix -afo -s 95 -l nssssSScCgGkkkkkkkk'
alias pipes='/usr/bin/pipes -t 3 -f 60 -r 8000'
#alias mine='cgminer --scrypt -o stratum+tcp://middlecoin.com:3333 -u 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS -p asdfgqwert'
alias mine-intense='cudaminer --interactive=0 --algo=scrypt -o stratum+tcp://middlecoin.com:3333 -u 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS -p asdfgqwert'
alias netmon="bmon -p eth1,eth0 -b -o curses:'nocolors;bgchar= '"
alias weather="curl http://wttr.in/Nashville"
alias kp="kpcli --kdb ~/Local/key/KeePass/master.kdbx --key ~/Local/key/master.key --histfile /dev/null"
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Bitcoin mining
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias mine='cudaminer --interactive=1 --algo=scrypt -o stratum+tcp://middlecoin.com:3333 -u 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS -p asdfgqwert'
alias mine-intense='cudaminer --interactive=0 --algo=scrypt -o stratum+tcp://middlecoin.com:3333 -u 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS -p asdfgqwert'
alias balance='curl http://www.middlecoin.com/allusers.html | grep -B 3 -A 3 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS'
#alias balance='curl http://middlecoin2.s3-website-us-west-2.amazonaws.com/allusers.html | grep -B 3 -A 3 1HoqBstSjv5kZrEyyHCGjReRpLf3TWTLPS'
alias xtv='xrandr --output HDMI-0 --auto --same-as DVI-I-1'
alias chrome='google-chrome-stable'
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Utilities
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias batch-unzip='for i in *.zip; do newdir="$i:gs/.zip/"; mkdir "$newdir"; unzip -d "$newdir" "$i"; done'
#alias scanimage='scanimage --format=tiff --device pixma:04A91747_80650C --resolution 300'
alias scan-flatbed='scanimage --format=tiff --device "brother4:bus4;dev2" --resolution 600 --source FlatBed'
alias scan-tray='scanimage --format=tiff --device "brother4:bus4;dev1" --resolution 600'
alias merge_pdfs='gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf'
alias netmon="bmon -p eth1,eth0 -b -o curses:'nocolors;bgchar= '"
alias weather="curl http://wttr.in/Nashville"
alias rm-if-no-screen='for i in *; do if [ ! -e screens/"$i".jpg -a $i != "screens" ]; then rm -Iv $i; fi; done'
alias pic-dirs-by-date='for i in *.NEF; do dirname=`ll --time-style=full-iso $i | awk '\''{ print $6 }'\''`; mkdir -p $dirname; mv -v $i $dirname; done'
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Music info
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias fp='for i in *.flac; do ffprobe $i 2>&1; done'
alias fa='for i in *.flac; do ffprobe $i 2>&1 | grep -i artist; done'
alias fcomp='for i in *.flac; do ffprobe $i 2>&1 | grep -i composer; done'
alias rm-if-no-screen='for i in *; do if [ ! -e screens/"$i".jpg -a $i != "screens" ]; then rm -Iv $i; fi; done'
alias mic="echo \"Starting jack mic input with 'alsa_in -j mic -d hw:USB -r 192000 -c 2 -p 512 -n 3'\" && alsa_in -j mic -d hw:USB -r 192000 -c 2 -p 512 -n 3"
alias pic-dirs-by-date='for i in *.NEF; do dirname=`ll --time-style=full-iso $i | awk '\''{ print $6 }'\''`; mkdir -p $dirname; mv -v $i $dirname; done'
if [[ "$TERM" == rxvt-unicode-256color || "$TERM" == xterm-256color ]]; then
alias catimg='catimg -t'
fi
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Visuals and sounds
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
alias blah='while true; do head -c8 /dev/urandom; sleep 0.02; done | hexdump -C'
alias matrix='unimatrix -afo -s 95 -l nssssSScCgGkkkkkkkk'
alias pipes='/usr/bin/pipes -t 3 -f 60 -r 8000'
#alias engage='play -r 44100 -c2 -n synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +16'
alias engage='play -c2 -n -t alsa synth whitenoise band -n 100 24 band -n 300 100 gain +16'
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Functions that can take arguments
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
make_thumbs() { vcsi -g 5x4 -w 1920 -t --grid-spacing 0 "$*"; }
make_thumbs_big() { vcsi -g 5x20 -w 1920 -t --grid-spacing 0 "$*"; }
say() { echo "$@" | festival --tts; }
play_midi() { fluidsynth -a alsa -m alsa_seq -j -g 2 -l -i /usr/share/soundfonts/FluidR3_GM.sf2 "$*"; }
# enable color support
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Enable color support
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if [ -x /usr/bin/dircolors ]; then
eval "`dircolors -b`"
#alias ls='ls --color=auto --group-directories-first'
alias ls='ls --color=auto --literal'
alias diff='diff --color=auto'
alias grep='grep --color=auto'
@ -74,7 +136,13 @@ if [ -x /usr/bin/dircolors ]; then
export -UT LS_COLORS=$LS_COLORS'ow=34;7:' ls_colors
fi
# host-specific aliases
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Host-specific aliases
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
case "$hostenv" in
( cluster )
alias open='gnome-open'
@ -115,6 +183,8 @@ case "$hostenv" in
esac
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# End
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Loading…
Cancel
Save