#! /bin/bash # Defines aliases and other environment variables that # are not inherited together with $PATH: #==== COMMAND ALIASES ================================================ # Fix the font path for a 100dpi screen alias 100dpi='xset +fp /usr/X11R6/lib/X11/fonts/100dpi' alias 75dpi='xset +fp /usr/X11R6/lib/X11/fonts/75dpi' # editors export EDITOR="stolfi-emacs" function e(){ ${EDITOR} "$@" & } # Screen lock alias xlock="xscreensaver-command -lock" # directory commands alias ls='/bin/ls' alias laf='/bin/ls -aF' alias ll='/bin/ls -al' alias lld='/bin/ls -ald' alias rdd='remove-dated-dir' # Process listing alias psa='/bin/ps augx' alias psc='/bin/ps augxw | /bin/sort | /usr/bin/expand | /bin/cut -c1-14,43-' # Postscript/PDF viewing alias gv=ghostview alias kgv=kghostview alias acr=acroread # MSDOS diskette commands alias mcd='setenv MCWD \!:1' alias mpwd='printenv MCWD' # mem (virtual memory status) alias mem='/usr/bin/free -k' # cpu (processor information) alias cpu='/bin/cat /proc/cpuinfo' # Prompt on a line by itself: alias longprompt='PS1="\\u@\\h \\!>>>\\n"' # Portuguese sort, ISO Latin-1 encoding: function ptisort(){ ( # Hack for installations without pt_BR.iso88591: export LC_COLLATE=pt_BR.utf8; recode iso-8859-1..utf8 | sort "$@" | recode utf8..iso-8859-1 ) } # Portuguese sort, UTF-8 encoding: function ptusort(){ ( export LC_COLLATE=pt_BR.utf8; sort "$@" ) } alias pt-sort='pt-sort not available, use ptisort or ptusort' alias ptsort='ptsort not available, use ptisort or ptusort' # Unify with other machines: export STMAN='stolfi@manaus.ic.unicamp.br' export STPUB='stolfi@manaus.ic.unicamp.br:/public_html' export SMAN="${STMAN}" export SPUB="${STPUB}"