added cpu temperature alias.
[feisty_meow.git] / scripts / core / common.alias
index df70f1c07039e699d0392b17c9d320f046bbc996..82528b4da0e5b1b08c38439ef425f76ada58d61e 100644 (file)
@@ -1,12 +1,23 @@
+#!/bin/bash
+##############
+# Name   : common.alias
+# Author : Chris Koeritz
+# Rights : Copyright (C) 1988-$now by Author
+##############
+# This script is free software; you can modify/redistribute it under the terms
+# of the GNU General Public License. [ http://www.gnu.org/licenses/gpl.html ]
+# Feel free to send updates to: [ fred@gruntose.com ]
+##############
+
 # common aliases for feisty_meow are located here.
-# most should work in any bash environment.
+# most of these should work in any bash environment...
+# although some may require more than bash, like the aliases
+# that invoke perl scripts.
 
-alias aliases=alias
-#alias arch='if [ -f /bin/arch ]; then /bin/arch; else uname -m; fi' 
-alias cd..='\cd ..'
-alias cd...='\cd ../..'
-alias cd....='\cd ../../..'
-alias cd.....='\cd ../../../..'
+##############
+
+# repurposes certain commands that feisty meow does a little differently.
+alias cls='clear_colormap; clear'
 alias copy='\cp -i -v '
 alias cp='\cp -i -v '
 alias cvs='perl $FEISTY_MEOW_SCRIPTS/rev_control/cvs_fix.pl'
@@ -15,67 +26,97 @@ alias deltree='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
 alias df='\df -m'
 alias dir='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl'
 alias du='\du -h'
-alias dvd_rip='vobcopy -m'
 alias erase='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
-alias l='\ls -FC $color_add'
-alias ls='\ls -FC $color_add'
-alias lsd='ls -l'
-alias md='mkdir'
-alias mo='less'
-alias more='less'
-alias move='mv -i -v '
-alias mplayer='\mplayer -ao arts'
-alias mv='\mv -i -v '
-alias np='gvim'
-alias path='echo $PATH'
-alias play='bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh'
-alias rmdir='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl'
-alias rd='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl'
-#regen-- this might be better as a function.
-alias regenerate='bash $FEISTY_MEOW_SCRIPTS/core/bootstrap_shells.sh ; echo ; nechung'
-alias reroot='chown -R root:root /root'
-alias rm='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
-alias ren='\mv -v -i '
-alias up='cd ..'
-alias whence=which
-
-#hmmm: move these to the custom area?
-# Standard CAK aliases that add to or extend Unix commands.
-alias bye='. $FEISTY_MEOW_SCRIPTS/users/goodbye.sh'
-alias calc='kcalc'
-alias cls='clear_colormap; clear'
+# elaborate replacement for explorer command, which we shorten to exp.
 if [ "$OS" != "Windows_NT" ]; then
   if [ -n "$IS_DARWIN" ]; then
     # case for mac os x.
     alias exp='open'
   elif [ ! -z "$(which nautilus)" ]; then
+    # we prefer nautilus if available.
     alias exp='nautilus'
   else
-#check if konqueror exists also?  fall back to uhhh midnight cmdr?
+    # last ditch is konqueror browser.
     alias exp='konqueror'
   fi
 else
-  alias explorer="bash $FEISTY_MEOW_SCRIPTS/winders/exploder.sh"
+  # windows gets routed to our helpful script instead.
   alias exp="bash $FEISTY_MEOW_SCRIPTS/winders/exploder.sh"
 fi
-alias pwd="/bin/pwd|sed -e 's/^\/home\/$USER/~/'"
+# re-use work we did on 'exp' macro for longer command.
+alias explorer=exp
+alias l='\ls -FC $color_add'
+alias ls='\ls -FC $color_add'
+alias lsd='ls -l'
+alias md='mkdir'
+alias more='less'
+alias move='mv -i -v '
+alias mv='\mv -i -v '
 alias notepad='gedit'
+alias pwd="/bin/pwd|sed -e 's/^\/home\/$USER/~/'"
+alias rd='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl'
+alias ren='\mv -v -i '
+alias rm='perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl'
+alias rmdir='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl'
+alias path='echo $PATH'
+alias whence=which
+
+##############
+
+# some aliases that are just generally nice to have.
+alias aliases=alias
+alias calc='kcalc'
+alias cd..='\cd ..'
+alias cd...='\cd ../..'
+alias cd....='\cd ../../..'
+alias cd.....='\cd ../../../..'
+alias mo='less'
+alias np='gvim'
+alias up='cd ..'
+
+##############
+
+# extended aliases for meta-operations.
+alias dvd_rip='vobcopy -m'
+alias mplayer='\mplayer -ao arts'
+alias play='bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh'
+
+##############
+
+# some really eccentric feisty meow aliases...
+
+# says goodbye when leaving a shell.
+alias bye='. $FEISTY_MEOW_SCRIPTS/users/goodbye.sh'
+alias cputemp='acpi -t'
+# redoes fred's set of custom scripts.
+alias recustomize='regenerate &>/dev/null; echo "copying custom overrides for fred..."; cpdiff $FEISTY_MEOW_DIR/examples/custom_overrides/fred $FEISTY_MEOW_GENERATED/custom; regenerate'
+# makes root user's home directory's permissions right.
+alias reroot='chown -R root:root /root'
+# replace the vi command with a graphical version on windows.
 if [ "$OS" = "Windows_NT" ]; then
-  # aliases we only use on the winders side.
   alias vi='gvim'
 fi
+# yes, these are really helpful...
 alias whereami='echo whoa dude, try not to think about it...'
 alias why='echo just because.'
 
+# done with loading up regular aliases now...
+
+##############
+
 # call the generated aliases file, if it exists.
-if [ -f "$FEISTY_MEOW_GENERATED/aliases_for_scripts.sh" ]; then 
-  if [ ! -z "$SHELL_DEBUG" ]; then echo launching generated aliases.; fi
-  source "$FEISTY_MEOW_GENERATED/aliases_for_scripts.sh"
-  if [ ! -z "$SHELL_DEBUG" ]; then echo done with generated aliases.; fi
+if [ -f "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh" ]; then 
+  if [ ! -z "$SHELL_DEBUG" ]; then echo loading script aliases...; fi
+  source "$FEISTY_MEOW_GENERATED/fmc_aliases_for_scripts.sh"
+  if [ ! -z "$SHELL_DEBUG" ]; then echo done loading script aliases.; fi
 fi
 
+##############
+
 # remove the fredization macro if it was defined, helping to avoid running
 # the shell scripts twice for users like root that don't always load this
 # stuff.
-unalias fredme >/dev/null 2>&1
+unalias fredme &>/dev/null
+
+##############