Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: akkana/dotfiles
base: 5e99c1202a
...
head fork: akkana/dotfiles
compare: 805f228424
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 30 files changed
  • 0 commit comments
  • 1 contributor
View
283 .Xdefaults
@@ -0,0 +1,283 @@
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!' Akkana's .Xdefaults
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! (what are these single quotes at the beginning of lines?
+!' They're because someone broke X defaults parsing a few years
+! ago so that it now gets confused by apostrophes in a comment line,
+! and treats them as single quotes
+! This bug is evidently never going to get fixed, so adding another
+! apostrophe is the only way to avoid error messages. Sigh.)
+!
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! Xterm colors (e.g. for rxvt)
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Green-on-black scheme:
+!XTerm*background: grey30
+!XTerm*foreground: green
+!XTerm*pointerColor: yellow
+!XTerm*colorBD: yellow
+!XTerm*cursorColor: yellow
+!XTerm*colorUL: magenta
+
+! black-on-light-grey scheme:
+XTerm*foreground: black
+! background was grey80
+XTerm*background: #ccdddd
+XTerm*pointerColor: red
+!XTerm*highlightColor: blue
+XTerm*cursorColor: red
+XTerm*colorBD: dark blue
+XTerm*colorUL: purple4
+
+! Try to make titlebar setting work again, as per
+! https://bugs.launchpad.net/ubuntu/+source/xterm/+bug/408496
+! but nothing works ...
+!xterm.utf8Title: false
+!xterm.allowTitleOps: true
+!xterm.title: blah
+
+!! Set up the escape-seq colors so they''ll work okay on light background
+!! even with all the Linux color schemes intended for white-on-black.
+*VT100*color0: black
+*VT100*color1: red3
+!*VT100*color1: firebrick4
+!! color2 was green3
+*VT100*color2: DarkGreen
+!! color3 was yellow3
+*VT100*color3: orange4
+*VT100*color4: blue3
+*VT100*color5: magenta4
+!! color6 was cyan3
+*VT100*color6: cyan4
+*VT100*color7: gray90
+!! color8 was gray50
+*VT100*color8: gray30
+*VT100*color9: red
+!! color10 was green
+*VT100*color10: rgb:00/aa/00
+!! color11 was yellow
+*VT100*color11: dark orange
+*VT100*color12: rgb:5c/5c/ff
+*VT100*color13: magenta
+!! color14 was cyan
+*VT100*color14: dark cyan
+*VT100*color15: white
+
+XTerm*ptyHandshake: true
+XTerm*utmpInhibit: false
+
+! Colors that work in both schemes:
+!XTerm*pointerColorBackground: magenta
+!XTerm*borderColor: green
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! Xterm resources
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+XTerm*loginShell: true
+XTerm*saveLines: 3000
+XTerm*scrollBar: false
+XTerm*geometry: 80x60
+XTerm*titeInhibit: true
+XTerm*allowSendEvents: true
+XTerm*locale: UTF-8
+
+! Debian/ubuntu weirdly changed the default to not allow tracking
+! window size:
+XTerm*allowWindowOps: true
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! resources specific to urxvt
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+urxvt*termName: rxvt-unicode-noalt
+
+!' Bold and underline colors -- regular xterm doesn't follow these,
+!! but rxvt does, and perhaps others do as well.
+XTerm*boldColors: true
+XTerm*colorBDMode: true
+XTerm*colorULMode: true
+
+! Tell Xterm that page up really means page up! No shift required.
+!' Try to make the page up/down keys work normally: this doesn't work.
+XTerm.vt100.translations: #override\n\
+ <KeyPress>Prior : scroll-back(1,page)\n\
+ <KeyPress>Next : scroll-forw(1,page)\n
+
+! Make it easier to grab URLs by double-clicking:
+XTerm*charClass:33:48,35-38:48,42-44:48,45-47:48,58:48,61:48,63-64:48,126:48
+! :!%$*+-./@?~ are word chars..
+!' should also work for ~, but it doesn't, for some reason.
+! And the equivalent, list of word separators for rxvt (much easier syntax!):
+XTerm*cutchars: \\'`"�()*;<>[]{|} !' extra quote for broken Xdefaults parser
+!' Here's a good test url:
+! http://bugzilla.mozilla.org/show_bug.cgi?id=40340&user=akkana@netscape.com
+
+! Xterm font agonization:
+!
+! This is my favorite font -- I wish I could get it in a 70 width,
+! since 60 (available in 12-point) is too narrow and 80 is too wide:
+!XTerm*font: -schumacher-clean-bold-r-normal--14-*-*-*-*-*-*-*
+!
+!' Here's one that works on Dapper through Hardy at 1280x1024:
+! not as nice as schumacher clean, but it has some smartquote characters.
+! The 'c' is important -- m and c give very slightly different fonts!
+! XTerm*font: -bitstream-bitstream vera sans mono-bold-r-normal-*-12-*-*-*-c-*-iso10646-1
+! but Ubuntu removed the vera fonts in Karmic!
+!XTerm*font: -*-clean-*-r-*-*-13-*-*-*-c-*-*-*
+XTerm*font: -misc-fixed-bold-r-normal-*-*-130-*-*-c-*-iso8859-15
+!XTerm*font: xft:Inconsolata
+!XTerm*faceName: Inconsolata bold
+!XTerm*faceSize: 10
+!XTerm*faceWeight: bold
+
+!' Haven't been able to get inconsolata to display via the X font mechanism:
+!XTerm*font: -inconsolata-*-*-*-*-*-14-*-*-*-*-*-*
+
+! Separate font for urxvt:
+!' Here's an attempt to use dejavu to get more characters:
+urxvt*font: -dejavu-dejavu sans mono-bold-r-normal-*-*-m-*-*-*-*-iso8859-15
+!' and here's one for breezy at 1024x768 or edgy at 1280x1024:
+!XTerm*font: -misc-fixed-bold-r-normal-*-*-130-*-*-c-*-iso10646-1
+
+!! Multiple fonts in xterm
+*XTerm*VT100*Font2: 5x7
+*XTerm*fontMenu*font2*Label: Tiny
+*XTerm*VT100*Font3: 9x15
+*XTerm*fontMenu*font3*Label: Big
+
+*XTerm*VT100.Translations: #override \n\
+ Hyper<Key>1: set-vt-font(d) \n\
+ Hyper<Key>2: set-vt-font(1) \n\
+ Hyper<Key>3: set-vt-font(2) \n
+
+!*XmScrollBar.width: 10
+
+! Unsuccessful attempts to change the default Tk menu font:
+!tik*Button*fontList: -*-helvetica-bold-i-normal-*-*-140-*-*-p-*-iso8859-2
+!tik*Menu*font: -*-helvetica-bold-i-normal-*-*-140-*-*-p-*-iso8859-2
+!tik*font: -*-helvetica-bold-i-normal-*-*-140-*-*-p-*-iso8859-2
+!tik*fontList: -*-helvetica-bold-i-normal-*-*-140-*-*-p-*-iso8859-2
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! GNU emacs, epoch, and xemacs resources
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!' This works most places but doesn't exist on edgy:
+!Emacs*font: -bitstream-bitstream vera sans mono-bold-r-normal-*-12-*-*-*-m-*-*
+! But this works even on edgy:
+!emacs*font: -misc-fixed-bold-r-normal-*-*-130-*-*-c-*-iso8859-15
+!Emacs.italic.attributeFont: -schumacher-clean-medium-i-normal-*-*-120-*-*-*-*-*
+!Emacs*font: 7x14
+
+! but not on karmic. Try this instead:
+!Emacs.font: Monospace-9:bold
+! That worked on oneiric but not on pangolin
+!Emacs.font: clean-10:bold
+!Emacs.font: -schumacher-clean-bold-r-normal--13-*-*-*-*-*-*-*
+!emacs.FontBackend: xft
+Emacs23.font: DejaVu Sans Mono-9:bold
+!Emacs23.font: Liberation Mono-10:bold
+
+! Special case for emacs with big fonts:
+bigemacs*font: -*-bitstream vera sans mono-bold-r-normal-*-*-*-*-*-c-*-iso8859-15
+bigemacs*geometry: 80x40+0+0
+
+! colors ...
+! Emacs*foreground: white
+! Emacs*background: dark slate gray
+! Emacs*cursorColor: magenta
+! Emacs*pointerColor: yellow
+! Emacs*pointerColorForeground: white
+!' For some reason, Netscape's emacs and xemacs both think this is
+! an invalid geometry specifier;
+Emacs23*geometry: 80x50
+!!
+Emacs*foreground: black
+Emacs*background: grey80
+! Emacs cursor color now set in the color scheme.
+!Emacs*cursorColor: magenta
+Emacs*pointerColor: blue
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! Make xconsole less hard on the eyes
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+xconsole*foreground: black
+xconsole*background: grey75
+xconsole*geometry: 566x173+0-0
+!' This is documented to work, but doesn't:
+!xconsole*scrollHorizontal: XawtextScrollAlways
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! gmemusage
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+Gmemusage*geometry: 550x600
+Gmemusage*color1: yellow
+Gmemusage*color2: magenta
+Gmemusage*color3: lightblue
+
+!! Linux Motif has removed the longstanding editing bindings from text controls
+!! -- put them back!
+*XmTextField.translations: #override \n\
+ ~Meta ~Alt Ctrl<Key>a: beginning-of-line() \n\
+ ~Meta ~Alt Ctrl<Key>b: backward-character() \n\
+ ~Meta ~Alt Ctrl<Key>d: delete-next-character() \n\
+ ~Meta ~Alt Ctrl<Key>e: end-of-line() \n\
+ ~Meta ~Alt Ctrl<Key>f: forward-character() \n\
+ ~Meta ~Alt Ctrl<Key>g: process-cancel() \n\
+ ~Meta ~Alt Ctrl<Key>h: delete-previous-character() \n\
+ ~Meta ~Alt Ctrl<Key>k: delete-to-end-of-line() \n\
+ ~Meta ~Alt Ctrl<Key>u: beginning-of-line() delete-to-end-of-line() \n\
+ ~Meta ~Alt Ctrl<Key>w: delete-previous-word() \n\
+ <Key>Delete: delete-previous-character() \n\
+ <Key>BackSpace: delete-previous-character() \n\
+ Meta ~Ctrl<Key>b: backward-word() \n\
+ Alt ~Ctrl<Key>b: backward-word() \n\
+ Meta ~Ctrl<Key>d: delete-next-word() \n\
+ Alt ~Ctrl<Key>d: delete-next-word() \n\
+ Meta ~Ctrl<Key>f: forward-word() \n\
+ Alt ~Ctrl<Key>f: forward-word() \n\
+ Meta ~Ctrl<Key>w: copy-clipboard() \n\
+ Alt ~Ctrl<Key>w: copy-clipboard() \n\
+ Meta ~Ctrl<Key>Left: backward-word() \n\
+ Alt ~Ctrl<Key>Left: backward-word() \n\
+ Meta ~Ctrl<Key>Right: forward-word() \n\
+ Alt ~Ctrl<Key>Right: forward-word() \n\
+ Meta ~Ctrl<Key>BackSpace: delete-previous-word() \n\
+ Alt ~Ctrl<Key>BackSpace: delete-previous-word() \n\
+ Meta ~Ctrl<Key>Delete: delete-next-word() \n\
+ Alt ~Ctrl<Key>Delete: delete-next-word() \n
+
+*XmText.translations: #override \n\
+ ~Meta ~Alt Ctrl<Key>a: beginning-of-line() \n\
+ ~Meta ~Alt Ctrl<Key>b: backward-character() \n\
+ ~Meta ~Alt Ctrl<Key>d: delete-next-character() \n\
+ ~Meta ~Alt Ctrl<Key>e: end-of-line() \n\
+ ~Meta ~Alt Ctrl<Key>f: forward-character() \n\
+ ~Meta ~Alt Ctrl<Key>g: process-cancel() \n\
+ ~Meta ~Alt Ctrl<Key>h: delete-previous-character() \n\
+ ~Meta ~Alt Ctrl<Key>k: delete-to-end-of-line() \n\
+ ~Meta ~Alt Ctrl<Key>u: beginning-of-line() delete-to-end-of-line() \n\
+ ~Meta ~Alt Ctrl<Key>w: delete-previous-word() \n\
+ <Key>Delete: delete-previous-character() \n\
+ <Key>BackSpace: delete-previous-character() \n\
+ Meta ~Ctrl<Key>b: backward-word() \n\
+ Alt ~Ctrl<Key>b: backward-word() \n\
+ Meta ~Ctrl<Key>d: delete-next-word() \n\
+ Alt ~Ctrl<Key>d: delete-next-word() \n\
+ Meta ~Ctrl<Key>f: forward-word() \n\
+ Alt ~Ctrl<Key>f: forward-word() \n\
+ Meta ~Ctrl<Key>w: copy-clipboard() \n\
+ Alt ~Ctrl<Key>w: copy-clipboard() \n\
+ Meta ~Ctrl<Key>Left: backward-word() \n\
+ Alt ~Ctrl<Key>Left: backward-word() \n\
+ Meta ~Ctrl<Key>Right: forward-word() \n\
+ Alt ~Ctrl<Key>Right: forward-word() \n\
+ Meta ~Ctrl<Key>BackSpace: delete-previous-word() \n\
+ Alt ~Ctrl<Key>BackSpace: delete-previous-word() \n\
+ Meta ~Ctrl<Key>Delete: delete-next-word() \n\
+ Alt ~Ctrl<Key>Delete: delete-next-word() \n\
+ ~Meta ~Alt Ctrl<Key>n: next-line() \n\
+ ~Meta ~Alt Ctrl<Key>p: previous-line() \n\
+ ~Meta ~Alt Ctrl<Key>v: next-page() \n\
+ Meta ~Ctrl<Key>v: previous-page() \n\
+ Alt ~Ctrl<Key>v: previous-page() \n
+
View
271 .bashrc
@@ -0,0 +1,271 @@
+#########################
+# Akkana's .bashrc
+#########################
+
+# User specific aliases and functions
+
+# Get noninteractive shells out of here
+# even though the bash documentation says noninteractive
+# shells aren't supposed to execute .bashrc according to
+# http://www.faqs.org/docs/bashman/bashref_63.html#SEC63
+if tty -s
+then
+ :
+else
+ return
+fi
+
+# echo .bashrc
+
+# Source global definitions
+if [[ -f /etc/bashrc ]]; then
+ . /etc/bashrc
+fi
+
+# Word erase only back to punctuation.
+# This also requires that .inputrc include:
+# set bind-tty-special-chars Off
+bind '\C-w:backward-kill-word'
+
+# Set path
+export PATH=$HOME/bin:$HOME/bin/linux:/usr/local/gimp-2.3/bin:/usr/local/gimp-2.0/bin:/u/local/j2sdk1.4.2_01/bin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/usr/bin/X11:.:/opt/kde/bin:/sbin:/usr/games
+
+ulimit -c unlimited
+
+# Prompt setting
+
+# Linux consoles don't colorize bold, so make it magenta to stand out
+# against the black background:
+# rxvt lets me set bold to be a different color that contrasts better
+# than any of the ANSI colors. So use that if possible:
+if [[ $TERM == 'rxvt' ]]; then
+ export standout="\e[1;m"
+# On a linux console, use magenta because it contrasts with the black bg:
+elif [[ $TERM == 'linux' ]]; then
+ export standout="\e[1;35m"
+# All others, use blue:
+else
+ export standout="\e[0;34m"
+fi
+export standout_end="\e[m"
+
+PS1="\[$standout\][\h$primes]-\[$standout_end\] "
+export primes=${primes}\'
+
+# Bash defaults to a really short timeout, and exits on inactivity
+TMOUT=0
+
+# Environment
+export PAGER=less
+export LESS="-EerX"
+export EDITOR=vim
+export LC_COLLATE=C
+
+# See http://www.linux-sxs.org/housekeeping/lscolors.html
+export LS_COLORS='ex=1;31:ln=1;35'
+
+export RSYNC_RSH=ssh
+export PHO_ARGS=-p
+
+# aliases
+
+ls() { /bin/ls -aF --color $* ; }
+ll() { /bin/ls -laF --color $* ; }
+llt() { /bin/ls -laSFHLt --color $* ; }
+llth() { /bin/ls -laFSHLt --color $* | head ; }
+
+alias j=jobs
+alias m=mutt
+alias pd=pushd
+alias s=suspend
+titlebar() {
+ echo ']2;$*'
+}
+alias rl="telnet -r"
+
+alias beep="echo "
+alias akk="play $HOME/.xchat2/sounds/akk.wav"
+alias ph="'grep -i \!* ~/.../Phones'"
+alias ap="man -k"
+
+alias screenshot="import -window root screenshot.jpg"
+alias thes="dict -h localhost -d moby-thesaurus"
+
+alias newbg='xsetbg -fullscreen -border black `find -L $HOME/Backgrounds -name "*.*" | randomline`'
+
+alias akk='play ~/.xchat2/sounds/akk.wav'
+
+# Spelling check
+sp() {
+ spell $* | sort | uniq
+}
+
+###############################
+# Recursive greps
+gr() {
+ find . \( -type f -and -not -name '*.o' -and -not -name '*.so' -and -not -name '*.a' \) -print0 | xargs -0 grep $* /dev/null | fgrep -v .svn
+}
+cgr() {
+ find . \( -name '*.[CchH]' -or -name '*.cpp' -or -name '*.cc' \) -print0 | xargs -0 grep $* /dev/null
+}
+hgr() {
+ find . \( -name '*.h' -or -name '*.idl' \) -print0 | xargs -0 grep $* /dev/null
+}
+rgr() {
+ find . \( -name '*.rb' -or -name '*.rhtml' \) -print0 | xargs -0 grep $* /dev/null | fgrep -v .svn
+}
+htgr() {
+ find . -name '*.*htm*' -print0 | xargs -0 grep $* /dev/null
+}
+jgr() {
+ find . -name '*.js' -print0 | xargs -0 grep $* /dev/null
+}
+xgr() {
+ find . \( -name '*.cChH' -or -name '*.cpp' -or -name '*.xul' -or -name '*.html' -or -name '*.js' -or -name '*.css' \) -print0 | xargs -0 grep $* /dev/null
+}
+cssgr() {
+ find . -name '*.css' -print0 | xargs -0 grep $* /dev/null
+}
+mgr() {
+ find . -name '*akefile*' -print0 | xargs -0 grep $* /dev/null
+}
+agr() {
+ find . -type f -print0 | xargs -0 grep $* /dev/null
+}
+zgr() {
+ find . \( -type f -and -not -name '*.o' -and -not -name '*.so' -and -not -name '*.a' \) -print0 | xargs -0 zgrep $* /dev/null
+}
+
+# halt and reboot don't always work on the Vaio,
+# and can't be run suid.
+alias off="sudo shutdown -h now"
+alias halt="sudo shutdown -h now"
+alias reboot="sudo shutdown -r now"
+
+# Get ink status from Epson printers
+alias epsonink="escputil -r /dev/usblp0 -mC86 -u -i"
+alias epsonnozzle="escputil -r /dev/usblp0 -mC86 -u -n"
+alias epsonclean="escputil -r /dev/usblp0 -mC86 -u -c"
+
+# blog stuff
+alias blogupdate='cd ~/web/blogfiles && ./pyblosxom.cgi --static --incremental && ~/bin/blogtopics && mv ../blog/topics.html ../blog/oldtopics.html && mv ../blog/newtopics.html ../blog/topics.html && cd'
+
+# Palm stuff
+export PILOTPORT=/dev/ttyUSB1
+treobak() {
+ rm -rf ~/Pilot/Treo.bak
+ cp -a ~/Pilot/Treo ~/Pilot/Treo.bak
+ pilot-xfer -s ~/Pilot/Treo
+ pluckmemos
+ cp ~/.plucker/html/xtraurls.html ~/web/xtraurls.html
+}
+scoop() {
+ export LANG=C
+ rm -f $HOME/.sitescooper/prc/*.pdb
+ sitescooper $* | setsid tee $HOME/scoop.out 2>&1
+ cat /u/akkana/shallowsky/xtraurls.html >> $HOME/xtraurls.html
+ rm /u/akkana/shallowsky/xtraurls.html
+ ls $HOME/.sitescooper/prc
+}
+rscoop() {
+ rm $HOME/.sitescooper/prc/*
+ nohup sitescooper >& $HOME/scoop.out &
+}
+alias piscoop='pilot-xfer -i ~/.sitescooper/prc/*.pdb'
+alias pils='echo "In ~/.sitescooper/prc : "; ls ~/.sitescooper/prc'
+getscoops() {
+ rm -rf $HOME/bakscoops
+ mv -f $HOME/scoops $HOME/bakscoops
+ scp -r shallowsky.com:.sitescooper/prc $HOME/scoops
+}
+
+# mencoder options are black magic.
+# This works for converting Minolta quicktime .mov to mpeg:
+mov2mpg1() {
+ mencoder $1 -oac pcm -ovc lavc -lavcopts vcodec=mpeg1video -o $2
+}
+# -lavc is ffmpeg, and the default codec is divx:
+mov2divx() {
+ mencoder $1 -oac pcm -ovc lavc -o $2
+}
+# From drc on #gimp:
+mov2mpeg4() {
+ mencoder $1 -oac pcm -ovc lavc -lavcopts vcodec=mpeg4:vqmin=2:vlelim=-4:vcelim=9:lumi_mask=0.05:dark_mask=0.01:vhq -o $2
+}
+
+# Remove the line matching $1 from ~/.ssh/known_hosts.
+# Ssh refuses to operate if anything has changed about the host:
+# network card, distro it's running, etc.
+cleanssh() {
+ mv $HOME/.ssh/known_hosts $HOME/.ssh/known_hosts.bak
+ grep -v $1 $HOME/.ssh/known_hosts.bak >$HOME/.ssh/known_hosts
+}
+
+# Get the temperature from /proc/acpi/thermal_zone/THRM/temperature
+# and convert it to F
+alias temp="cat /proc/acpi/thermal_zone/ATF0/temperature"
+
+# Record a realaudio stream
+getreal() {
+ mplayer -playlist $1 -ao pcm:file=$2 -vc dummy -vo null
+}
+# Then transcode it with:
+# lame --tg Other --ta artist -tl album file.wav file.mp3
+
+alias ratings='links -dump "http://www.amazon.com/gp/product/1590595874" | grep "in Books" | grep -v Explore'
+
+# For presentations
+alias bigterm="rxvt -geometry 80x33 -fn '-*-lucidatypewriter-*-*-*-*-19-*-*-*-*-*-*-*'"
+
+# Starting system software:
+alias apache="sudo /etc/noinit.d/apache2"
+alias cups="sudo /etc/noinit.d/cupsys"
+alias mysql="sudo /etc/noinit.d/mysql"
+
+if [[ $HOSTNAME != 'moon' ]]; then
+ alias rlm='ssh moon'
+ alias xx=startx
+fi
+
+# allanbrokeit on #archlinux says this might cure the mysterious
+# disappearing history. But it doesn't.
+shopt -s histappend
+
+if [[ -e $HOME/.bash-errs ]]; then
+ . $HOME/.bash-errs
+fi
+
+# function myeditor {
+# if [[ x"$VISUAL" != x ]]; then
+# echo "$VISUAL"
+# elif [[ x"$EDITOR" != x ]]; then
+# echo "$EDITOR"
+# else
+# echo e.g. vim
+# fi
+# }
+
+# Trap errors.
+# This could also be done, less cleanly, via PROMPT_COMMAND
+# by checking $? for nonzero status. fc -n -l -1
+#trap 'err_handle' ERR
+#trap 'err_handle $(history | tail -1 | sed \'s/^ *[0-9][0-9]* *//\')' ERR
+#trap 'err_handle "$(fc -n -l -0)"' ERR
+#trap 'err_handle "$BASH_COMMAND"' ERR
+
+# OHHH! The reason lines disappear from my history
+# is probably that bash lets you edit history lines
+# and remembers their edited value, not the original one.
+# This may be controlled by 'histreedit'.
+# Or it might not.
+
+# Override the Ubuntu way, if desired:
+#function command_not_found_handle {
+# return 127
+#}
+
+if [ -f ~/ideascopic/it/cheats/bash/cheats.bash ]; then
+ source ~/ideascopic/it/cheats/bash/cheats.bash
+fi
+
+alias plug='minicom -D /dev/ttyUSB1 -b 115200'
View
270 .config/feedme/feedme.conf
@@ -0,0 +1,270 @@
+# Configuration file for Feedme 0.9.
+
+# Mandatory for all feeds: name [section name], url.
+# dir is also mandatory but typically inherited from the defaults.
+
+# page_start and page_end will drop anything before and after those patterns
+# (the patterns themselves will be kept). Normal Python re syntax.
+
+# If a URL matching single_page_pat is found in the story page and
+# can be loaded, it will be subsituted for the normal story page.
+
+# skip_pat can include multiple patterns -- separate with newlines/indents.
+
+[DEFAULT]
+# Defaults for all feeds: may be overridden for specific feeds.
+dir = ~/feeds/
+#dir = /home/akkana/feeds
+verbose = True
+skip_images = true
+nonlocal_images = false
+levels = 2
+ascii = false
+logfile = ~/feedme.out
+# formats could be plucker, epub or fbreader.
+# Use none if you only need HTML.
+formats = none
+save_days = 5
+
+[A Word A Day]
+url = http://wordsmith.org/awad/rss1.xml
+page_start = </leftlinks>
+page_end = <p class="rightbox">
+skip_pat = style=".*?"
+ Follow us on.*?</div>
+
+[Slate]
+url = http://www.slate.com/rss
+#page_start = <div class="text
+page_start = <!-- ARTICLE HEADER -->
+#page_end = <div id="comments_button"
+single_page_pat = http://www.slate.com/.*single.html
+# Slate has some really bizarro patterns they put in stories!
+# Sadly, most of these skip_pats don't work.
+# Like <a href="http://online.wsj.com/article_email/SB10001424052748704828104576021481410635432-lMyQjAxMTAwMDEwODExNDgyWj.html" target="_blank" xmlns:tools="XslTools"><span style="color:#000080;">estimated</span></a>
+# skip_pat = <div id="toolbox".*?</div></div>
+# <iframe.*?</iframe>
+# <style.*?</style>
+# style *= *".*?"
+# color: *".*?"
+# <div id="tool_cntr">.*?class="recommend_closer">CLOSE</a></div>
+# <div class="large_article_photo".*?</div>
+# <hr />
+# <div>Advertisement:.*?Ads by Pheedo.*?</div>
+
+#[Linux Planet]
+#url = http://www.linuxplanet.com/rss
+##page_start = <!--**** begin content ****-->
+#page_start = <!--content_start 1-->
+#page_end = <!--**** end content ****-->
+#skip_pat = <FONT .*?SIZE=.*?>
+
+# [The Register]
+# url = http://www.theregister.co.uk/headlines.atom
+# page_start = <div id="article">
+# page_end = <div id="related-stories">
+# page_start = <div id="body">
+
+[BBC News Science]
+url = http://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml
+skip_images = false
+page_start = <a name="startcontent">
+ <span class="story-date">
+ <div class="emp-decription" id="meta-information">
+ <h1 class="story-header">
+ <p class="introduction"
+ <h1 class="story-header">
+page_end = <div class="share-body-bottom">
+ </div><!-- / story-body -->
+ <h3>Bookmark with:</h3>
+skip_pat = <h2 class="quote">.*?End Quote</span>
+ <div id="page-bookmark-links-head".*?</script>
+ <div class="story-feature narrow">.*?</div> *<p id="story_continues_1">
+
+#[World News Australia]
+#url = http://www.sbs.com.au/news/rss/Section/Top%20Stories
+#page_start = <div class="teaser row">
+#page_end = <div class="links_comments
+
+#[BBC World News]
+#url = http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
+#page_start = <h1 class="story-header">
+#page_end = <!-- / story-body -->
+#skip_pat = <a class="hidden".*?</a>
+##skip_pat = <div class="article-nav".*?</div>
+##encoding = iso8859-15
+#verbose = True
+
+[Knight Science]
+url = http://ksjtracker.mit.edu/feed/
+skip_images = false
+page_start = <div class="post"
+page_end = <div id="sidebar">
+skip_pat = <cite>.*?</cite>
+
+[Grammar Girl]
+url = http://grammar.quickanddirtytips.com/PodcastsRSS.ashx?podcast=grammar
+page_start = <div class="article-text">
+page_end = <!-- end .article-text -->
+
+# [Nutrition Diva]
+# url = http://nutritiondiva.quickanddirtytips.com/PodcastsRSS.ashx?podcast=nutritiondiva
+# page_start = <div class="article-text">
+# page_end = <!-- end .article-text -->
+
+#[House Call Doc]
+#url = http://housecalldoctor.quickanddirtytips.com/PodcastsRSS.ashx?podcast=housecalldoctor
+#page_start = <div class="article-text">
+#page_end = <!-- end .article-text -->
+
+# [Math Dude]
+# url = http://www.quickanddirtytips.com/xml/mathdude.xml
+# page_start = <div class="article-text">
+# page_end = <!-- end .article-text -->
+
+[Slashdot]
+url = http://rss.slashdot.org/Slashdot/slashdot
+#levels = 1
+page_start = <div id="text-
+page_end = <div class="article-foot
+
+[World Wide Words]
+url = http://www.worldwidewords.org/rss/newsletter.xml
+levels = 1
+when = Sat
+
+[Jon Carroll]
+url = http://feeds.sfgate.com/sfgate/rss/feeds/jcarroll
+page_start = <div id="text" class="entry-content">
+page_end = <div class="hst-articlefooter">
+
+[Merc local news]
+url = http://feeds.mercurynews.com/mngi/rss/CustomRssServlet/568/200748.xml
+page_start = <div id="articleBody"
+page_end = <div class="articleOptions">
+skip_pat = <div id="photoviewer".*?</div></div>
+ <div id="caption".*?</div>
+ <span class="articleEmbeddedViewerBox">.*?<span fd-type="start" fd-id="default"></span>
+
+[LA Times Top]
+url = http://feeds.latimes.com/latimes/news
+page_start = <div id="story-body-text">
+page_end = <div class="google-ad-story-bottom">
+single_page_pat = ^/.*,full.(column|story)
+
+[David Lazarus]
+url = http://feeds.latimes.com/ConsumerConfidential
+page_start = <div id="story-body-text">
+page_end = <div class="shareBtm">
+single_page_pat = /business/.*,full.column
+
+# I'd love to get Wired's great long-form stories, but none of their
+# RSS links seem to point to anything like that.
+# [Wired]
+# url = http://www.wired.com/magazine/feed/
+# page_start = <div class="entry">
+# page_end = <div class="entryExtra">
+# single_page_pat = http://www.wired.com/magazine/.*/all/1
+
+[Wired Science]
+url = http://www.wired.com/wiredscience/feed/
+page_start = <div class="entry">
+skip_images = false
+page_end = <div class="entryExtra">
+# Skip images for now, until we can figure out how to ban the huge slew of
+# http://www.wired.com/wiredscience/wp-content/gallery/astronomy-daily/thumbs/thumbs_*
+skip_pat = <!-- NextGen Gallery.*?<br clear="all" />
+
+[Nasw]
+url = http://www.nasw.org/articles.xml
+page_start = <div class="content-body">
+page_end = <div class="links">
+
+[Xtra]
+url = file:///home/akkana/feeds/xtraurls.rss
+# url = /home/akkana/feeds/xtraurls.rss
+skip_images = false
+nocache = true
+
+#[Ubuntu Weekly News]
+#url = http://feeds2.feedburner.com/ubuntu-news
+#levels = 2
+
+#[Five chapters]
+#url = http://www.fivechapters.com/feed/atom/
+#page_start = <div id="content"
+#page_end = <div id="sidebar"
+
+[GreenCine New Releases]
+url = http://www.greencine.com/central/taxonomy/term/29/0/feed
+page_start = <div id="center">
+page_end = <div id="sidebar-right"
+when = Tue
+
+[Make]
+url = http://blog.makezine.com/feed
+page_start = <div class="content">
+page_end = <div class="fb-recommendations-bar
+# " just to make emacs happy
+skip_images = false
+nonlocal_images = true
+
+[Linux.com]
+url = http://www.linux.com/rss/feeds.php
+page_start = <div class="article-content">
+page_end = <!-- Sharing toolbar -->
+
+[The Open Notebook]
+url = http://www.theopennotebook.com/feed/rss/
+page_start = <div id="content">
+page_end = <div class="postmeta">
+skip_pat = <span style.*?>
+
+[Story Collider]
+url = http://magazine.storycollider.org/feed/
+single_page_pat = http://magazine.storycollider.org/.*/view-all/
+page_start = <article>
+page_end = class="addthis_toolbox
+# " just to make emacs happy
+
+[Freakonomics]
+url = http://www.freakonomics.com/feed/atom/
+page_start = class="entry"
+page_end = id="simple_socialmedia"
+skip_images = false
+
+[Longreads]
+url = http://longreads.com/rss
+
+#[Miatas]
+#url = http://sfbay.craigslist.org/search/cta?query=miata&catAbb=cta&srchType=T&minAsk=&maxAsk=8001&format=rss
+#page_start = <div id="userbody">
+
+#[Dave Barry]
+#url = http://www.miamiherald.com/living/columnists/dave-barry/index.rss
+#page_start = <div id="storyBodyContent" class="entry-content">
+#page_end = <div id="storyBodyBottom"
+
+[Language Log]
+url = http://languagelog.ldc.upenn.edu/nll/?feed=atom
+page_start = <div class="post">
+page_end = <div id="sidebar">
+skip_images = false
+skip_pat = <span style="color.*?>
+ <font color="
+
+[Car talk]
+url = http://www.cartalk.com/sites/default/files/rss/tomray.xml
+page_start = <div id="blog_body_txt">
+page_end = <div class="rail">
+
+# [Christian Science Monitor]
+# url = http://rss.csmonitor.com/feeds/csm
+# page_start = <div id="mainColumn">
+# page_end = <div class="ui-article-footer">
+# skip_pat = <div class="storyToolbar.*class="c-article">
+
+[Methods of Rationality]
+url = http://hpmor.com/rss.xml
+when = 12
+
View
252 .config/openbox/menu.xml
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<openbox_menu xmlns="http://openbox.org/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://openbox.org/
+ file:///usr/share/openbox/menu.xsd">
+
+<menu id="root-menu" label="Openbox 3">
+ <item label="xterm">
+ <action name="Execute"><execute>xterm -geometry 80x32</execute></action>
+ </item>
+ <!--
+ <item label="rxvt">
+ <action name="Execute"><execute>rxvt -geometry 80x38-0+0</execute></action>
+ </item>
+ -->
+ <separator />
+ <item label="Firefox 15">
+ <action name="Execute"><execute>/usr/local/firefox/firefox -P masterprofile</execute></action>
+ <!-- after firefox 11, add -new-instance instead of -no-remote -->
+ </item>
+ <menu id="browser-menu" label="Other browsers">
+ <item label="Social Firefox">
+ <action name="Execute"><execute>/usr/local/firefox/firefox -no-remote -P facebook</execute></action>
+ </item>
+ <item label="Default Firefox">
+ <action name="Execute"><execute>/usr/local/firefox/firefox -no-remote -P Default</execute></action>
+ </item>
+ <separator />
+ <item label="Firefox 13">
+ <action name="Execute"><execute>/usr/local/firefox13/firefox -P firefox13</execute></action>
+ <!-- after firefox 11, add -new-instance instead of -no-remote -->
+ </item>
+ <item label="Social Firefox 13">
+ <action name="Execute"><execute>/usr/local/firefox13/firefox -no-remote -P facebook13</execute></action>
+ </item>
+ <item label="open selection in Firefox">
+ <action name="Execute"><execute>sh -c 'firefox `pyclip`'</execute></action>
+ </item>
+ <item label="open selection in new tab">
+ <action name="Execute"><execute>sh -c 'firefox -new-tab `pyclip`'</execute></action>
+ </item>
+<!-- Here's how to do an extended comment that can even allow double-dashes: -->
+<![CDATA[
+ <item label="Facebook Firefox 4">
+ <action name="Execute"><execute>/usr/bin/firefox -no-remote -P facebook4</execute></action>
+ </item>
+ <item label="Firefox 4 (system)">
+ <action name="Execute"><execute>firefox -no-remote -P firefox4</execute></action>
+ </item>
+ <item label="Firefox 3.5 (system)">
+ <action name="Execute"><execute>firefox -no-remote -P Firefox3.5</execute></action>
+ </item>
+ <item label="Facebook Firefox">
+ <action name="Execute"><execute>firefox -no-remote -P facebook</execute></action>
+ </item>
+ <item label="Firefox 3.5 (Mozilla.org)">
+ <action name="Execute"><execute>/usr/local/firefox3.5/firefox -P Firefox3.5</execute></action>
+ </item>
+ <item label="Firefox 3">
+ <action name="Execute"><execute>firefox -no-remote -P akkana</execute></action>
+ </item>
+]]> <!-- -->
+ <item label="Chromium">
+ <action name="Execute"><execute>chromium-browser</execute></action>
+ </item>
+ <item label="Arora">
+ <action name="Execute"><execute>arora</execute></action>
+ </item>
+ <item label="Opera">
+ <action name="Execute"><execute>opera</execute></action>
+ </item>
+ <item label="Netsurf">
+ <action name="Execute"><execute>netsurf</execute></action>
+ </item>
+<!--
+ <item label="Ubuntu's Firefox3">
+ <action name="Execute"><execute>firefox-3.0</execute></action>
+ </item>
+ <item label="Kitfox">
+ <action name="Execute"><execute>/usr/local/kitfox/firefox</execute></action>
+ </item>
+ <item label="Firefox">
+ <action name="Execute"><execute>mozilla-firefox -splash</execute></action>
+ </item>
+ -->
+ </menu>
+ <item label="emacs">
+ <action name="Execute"><execute>emacs</execute></action>
+ </item>
+<!--
+ <item label="xchat from src">
+ <action name="Execute"><execute>/usr/local/bin/xchat</execute></action>
+ <action name="ToggleOmnipresent" />
+ </item>
+ -->
+ <item label="xchat">
+ <action name="Execute"><execute>xchat</execute></action>
+ </item>
+ <separator />
+ <item label="GIMP 2.8">
+ <action name="Execute"><execute>/home/akkana/bin/gimp-2.8</execute></action>
+ </item>
+ <item label="GIMP 2.6 (Ubuntu)">
+ <action name="Execute"><execute>/usr/bin/gimp</execute></action>
+ </item>
+ <item label="GIMP git">
+ <action name="Execute"><execute>/home/akkana/bin/gimp-git</execute></action>
+ </item>
+
+ <separator />
+
+ <item label="Eclipse">
+ <action name="Execute"><execute>/home/akkana/Archive/android/eclipse/eclipse</execute></action>
+ </item>
+ <item label="Libre Office">
+ <action name="Execute"><execute>libreoffice</execute></action>
+ </item>
+ <item label="VirtualBox">
+ <action name="Execute"><execute>VirtualBox</execute></action>
+ </item>
+ <item label="Arduino">
+ <action name="Execute"><execute>arduino</execute></action>
+ </item>
+ <item label="Fritzing">
+ <action name="Execute"><execute>Fritzing</execute></action>
+ </item>
+ <item label="Music (vlc)">
+ <action name="Execute"><execute>vlc --random /home/akkana/Music</execute></action>
+ </item>
+
+ <separator />
+
+ <item label="moonroot">
+ <!-- <decor>no</decor> -->
+ <action name="Execute"><execute>moonroot -s</execute></action>
+ </item>
+ <item label="dclock">
+ <action name="Execute"><execute>dclock -geometry 165x65-0+0</execute></action>
+ </item>
+ <item label="volume">
+ <action name="Execute"><execute>vol</execute></action>
+ </item>
+ <item label="xzoom">
+ <action name="Execute"><execute>xzoom</execute></action>
+ </item>
+ <item label="xconsole">
+ <action name="Execute"><execute>xconsole</execute></action>
+ </item>
+ <item label="xosview">
+ <action name="Execute"><execute>xosview -geometry 330x300 +cpu +load +mem -swap -page -ints -disk</execute></action>
+ </item>
+ <item label="gnome system monitor">
+ <action name="Execute"><execute>gnome-system-monitor</execute></action>
+ </item>
+ <item label="gmemusage">
+ <action name="Execute"><execute>gmemusage</execute></action>
+ </item>
+ <separator />
+
+ <!--
+ <menu id="pipe-wifi" label="Wifi..."
+ execute="/home/akkana/.config/openbox/wifi-pipe.py eth0" />
+ -->
+
+<!--
+ <menu id="term-menu"/>
+ <item label="Run...">
+ <action name="Execute">
+ <command>gmrun</command>
+ </action>
+ </item>
+ -->
+
+ <item label="xephem">
+ <action name="Execute"><execute>xephem</execute></action>
+ </item>
+ <item label="kstars">
+ <action name="Execute"><execute>kstars</execute></action>
+ </item>
+ <separator />
+ <item label="Screenshot a Window">
+ <action name="Execute">
+ <execute>scrot -b -s /tmp/screenshot.jpg</execute>
+<!-- <execute>import +repage -screen -frame /tmp/screenshot.png</execute> -->
+ </action>
+ </item>
+ <item label="Screenshot, Full Screen">
+ <action name="Execute">
+ <execute>scrot /tmp/screenshot.jpg</execute>
+ </action>
+ </item>
+ <item label="New Background">
+ <!-- <action name="Execute"><execute>bash -c 'hsetroot -center `find -L $HOME/Backgrounds -name "*.*" | $HOME/bin/randomline`'</execute></action> -->
+ <action name="Execute"><execute>/home/akkana/bin/randombg</execute></action>
+ </item>
+ <!--
+ <item label="Invert">
+ <action name="Execute"><execute>/home/akkana/bin/linux/invgamma</execute></action>
+ </item>
+ -->
+ <separator />
+ <!-- This requires the presence of the 'menu' package to work -->
+ <!-- <menu id="Debian" /> -->
+ <menu id="client-list-menu" />
+ <separator />
+ <!--
+ <item label="ObConf">
+ <action name="Execute"><execute>obconf</execute></action>
+ </item>
+ -->
+ <item label="Reconfigure">
+ <action name="Reconfigure" />
+ </item>
+ <item label="Restart Openbox">
+ <action name="Restart" />
+ </item>
+ <separator />
+ <item label="xkill">
+ <action name="Execute"><execute>xkill</execute></action>
+ </item>
+ <item label="Exit X and Openbox">
+ <action name="Exit"><prompt>no</prompt></action>
+ </item>
+ <!--
+ <item label="Monitor Off">
+ <action name="Execute"><execute>/home/akkana/bin/screenoff</execute></action>
+ </item>
+ -->
+ <item label="Sleep">
+ <action name="Execute"><execute>sudo pm-suspend --auto-quirks</execute></action>
+ </item>
+ <item label="Reboot">
+ <action name="Execute"><execute>sudo shutdown -r now</execute></action>
+ </item>
+ <item label="Shut Down">
+ <action name="Execute"><execute>sudo shutdown -h now</execute></action>
+ </item>
+<comment><!-- openbox ignores unknown tags, like 'comment' -->
+ <item label="Old openbox">
+ <action name="restart"><command>sh -c 'env LD_LIBRARY_PATH=/usr/lib /usr/bin/openbox'</command></action>
+ </item>
+ <item label="New openbox">
+ <action name="restart"><command>sh -c 'env -u LD_LIBRARY_PATH /usr/local/bin/openbox'</command></action>
+ </item>
+ <item label="Focus debug">
+ <action name="restart"><command>openbox --debug-focus</command></action>
+ </item>
+</comment>
+</menu>
+
+</openbox_menu>
View
591 .config/openbox/rc.xml
@@ -0,0 +1,591 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<openbox_config xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/rc.xsd">
+ <resistance>
+ <strength>10</strength>
+ <screen_edge_strength>20</screen_edge_strength>
+ </resistance>
+
+ <focus>
+ <focusNew>yes</focusNew>
+ <followMouse>yes</followMouse>
+ <focusLast>no</focusLast>
+ <focusDelay>200</focusDelay>
+ <raiseOnFocus>no</raiseOnFocus>
+ <underMouse>yes</underMouse>
+ </focus>
+
+ <theme>
+ <name>Onyx-SmallBlue</name>
+ <titlelayout>NLIMC</titlelayout>
+ <keepBorder>yes</keepBorder>
+ <animateIconify>no</animateIconify>
+ <titleLayout>NLIMC</titleLayout>
+ <font place="ActiveWindow">
+ <name>Sans</name>
+ <size>8</size>
+ <weight/>
+ <slant/>
+ </font>
+ <font place="InactiveWindow">
+ <name>Sans</name>
+ <size>8</size>
+ <weight/>
+ <slant/>
+ </font>
+ <font place="MenuHeader">
+ <name>Sans</name>
+ <size>8</size>
+ <weight>italic</weight>
+ <slant>bold</slant>
+ </font>
+ <font place="MenuItem">
+ <name>Sans</name>
+ <size>8</size>
+ <weight>Bold</weight>
+ <slant>Italic</slant>
+ </font>
+ <font place="OnScreenDisplay">
+ <name>Sans</name>
+ <size>8</size>
+ <weight/>
+ <slant/>
+ </font>
+ </theme>
+
+ <placement>
+ <policy>Smart</policy>
+ <center>yes</center>
+ <monitor>Any</monitor>
+ </placement>
+
+ <desktops>
+ <number>3</number>
+ <firstdesk>1</firstdesk>
+ <names>
+ <name>Mail</name>
+ <name>Hack</name>
+ <name>Web</name>
+ </names>
+ <popupTime>0</popupTime>
+ </desktops>
+
+ <resize>
+ <drawContents>no</drawContents>
+ <popupShow>Always</popupShow>
+ <popupPosition>Top</popupPosition>
+ <popupFixedPosition>
+ <x>0</x>
+ <y>0</y>
+ </popupFixedPosition>
+ </resize>
+
+ <!-- Settings for specific windows -->
+ <applications>
+ <application name="moonroot">
+ <!-- <decor>no</decor> -->
+ <!-- <desktop>all</desktop> -->
+ <position>
+ <x>-10</x>
+ <y>10</y>
+ </position>
+ </application>
+ <application name="dclock">
+ <decor>no</decor>
+ <!-- position doesn't work here: use -geometry in menu.xml instead
+ <position>
+ <x>-0</x>
+ <y>0</y>
+ </position>
+ -->
+ </application>
+ </applications>
+ <!-- End settings for specific windows -->
+
+ <keyboard>
+ <chainQuitKey>C-g</chainQuitKey>
+ <!-- key binding for debugging when running with - - debug -->
+<!--
+ <keybind key="W-x">
+ <action name="Execute"><execute>vol</execute></action>
+ </keybind>
+ <keybind key="A-Return">
+ <action name="ToggleMaximizeFull"/>
+ </keybind>
+ <keybind key="A-S-asciitilde">
+ <action name="ToggleMaximizeFull"/>
+ </keybind>
+ -->
+
+ <keybind key="W-F10">
+ <action name="Debug">
+ <string>=======================================================</string>
+ </action>
+ </keybind>
+ <keybind key="W-F9">
+ <action name="ShowMenu">
+ <menu>root-menu</menu>
+ </action>
+ </keybind>
+
+ <!-- key bindings for the desktop -->
+ <keybind key="W-F5">
+ <action name="Execute">
+ <execute>/home/akkana/bin/linux/xbrightness -4298</execute>
+ </action>
+ </keybind>
+ <keybind key="W-F6">
+ <action name="Execute">
+ <execute>/home/akkana/bin/linux/xbrightness +4298</execute>
+ </action>
+ </keybind>
+
+ <!-- volume bindings for desktop keyboard: -->
+ <keybind key="W-F7">
+ <action name="Execute">
+ <execute>/home/akkana/bin/quieter</execute>
+ </action>
+ </keybind>
+ <keybind key="W-F8">
+ <action name="Execute">
+ <execute>/home/akkana/bin/louder</execute>
+ </action>
+ </keybind>
+
+ <!-- volume bindings for laptop keyboard: -->
+ <keybind key="XF86AudioLowerVolume">
+ <action name="Execute">
+ <execute>/home/akkana/bin/quieter</execute>
+ </action>
+ </keybind>
+ <keybind key="XF86AudioRaiseVolume">
+ <action name="Execute">
+ <execute>/home/akkana/bin/louder</execute>
+ </action>
+ </keybind>
+
+ <keybind key="W-F12">
+ <action name="Execute">
+ <execute>/home/akkana/bin/screenoff</execute>
+ </action>
+ </keybind>
+ <keybind key="A-F11">
+ <action name="Execute">
+ <execute>/home/akkana/bin/crikey/sayshortpw</execute>
+ </action>
+ </keybind>
+ <keybind key="A-F12">
+ <action name="Execute">
+ <execute>/home/akkana/bin/crikey/saypwd</execute>
+ </action>
+ </keybind>
+
+ <keybind key="W-t">
+ <action name="Execute">
+ <execute>/home/akkana/bin/countsel</execute>
+ </action>
+ </keybind>
+
+ <keybind key="W-Print">
+ <action name="Execute">
+ <execute>scrot /tmp/screenshot.jpg</execute>
+ </action>
+ </keybind>
+
+ <keybind key="A-F10">
+ <action name="MaximizeFull"/>
+ </keybind>
+ <keybind key="A-F5">
+ <action name="UnmaximizeFull"/>
+ </keybind>
+ <!-- Set dialog to no for desktop switching, because of a bug
+ that makes it sometimes steal focus
+ -->
+ <keybind key="C-A-Left">
+ <action name="DesktopLeft">
+ <wrap>yes</wrap>
+ <dialog>no</dialog>
+ </action>
+ </keybind>
+ <keybind key="C-A-Right">
+ <action name="DesktopRight">
+ <wrap>yes</wrap>
+ <dialog>no</dialog>
+ </action>
+ </keybind>
+ <keybind key="C-S-A-Left">
+ <action name="SendToDesktopLeft">
+ <wrap>yes</wrap>
+ <dialog>no</dialog>
+ </action>
+ </keybind>
+ <keybind key="C-S-A-Right">
+ <action name="SendToDesktopRight">
+ <wrap>yes</wrap>
+ <dialog>no</dialog>
+ </action>
+ </keybind>
+ <keybind key="C-A-d">
+ <action name="ToggleShowDesktop"/>
+ </keybind>
+ <keybind key="A-F4">
+ <action name="Close"/>
+ </keybind>
+ <keybind key="A-Tab">
+ <action name="NextWindow">
+ <dialog>no</dialog>
+ <raise>yes</raise>
+ <finalactions><action name="focus"/></finalactions>
+ </action>
+ </keybind>
+ <keybind key="A-S-Tab">
+ <action name="PreviousWindow">
+ <dialog>no</dialog>
+ </action>
+ </keybind>
+ <keybind key="W-Up">
+ <action name="DirectionalFocusNorth">
+ <dialog>no</dialog>
+ </action>
+ </keybind>
+ <keybind key="W-Down">
+ <action name="DirectionalFocusSouth">
+ <dialog>no</dialog>
+ </action>
+ </keybind>
+ <keybind key="W-Left">
+ <action name="DirectionalFocusWest">
+ <dialog>no</dialog>
+ </action>
+ </keybind>
+ <keybind key="W-Right">
+ <action name="DirectionalFocusEast">
+ <dialog>no</dialog>
+ </action>
+ </keybind>
+ <keybind key="A-F7">
+ <action name="Move"/>
+ </keybind>
+ <keybind key="A-F8">
+ <action name="Resize"/>
+ </keybind>
+ <keybind key="A-F9">
+ <action name="Iconify"/>
+ </keybind>
+ <keybind key="A-space">
+ <action name="ShowMenu">
+ <menu>client-menu</menu>
+ </action>
+ </keybind>
+ </keyboard>
+
+ <mouse>
+ <dragThreshold>3</dragThreshold>
+ <doubleClickTime>200</doubleClickTime>
+ <context name="Frame">
+ <mousebind button="W-Left" action="Drag">
+ <action name="Move"/>
+ </mousebind>
+ <mousebind button="W-Left" action="Click">
+ <action name="RaiseLower"/>
+ </mousebind>
+ <mousebind button="W-Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ <mousebind button="A-Middle" action="Drag">
+ <action name="Resize"/>
+ </mousebind>
+ <mousebind button="W-Right" action="Drag">
+ <action name="Resize"/>
+ </mousebind>
+ <mousebind button="A-Middle" action="Click">
+ <action name="Lower"/>
+ </mousebind>
+ <mousebind button="A-Right" action="Drag">
+ <action name="Resize"/>
+ </mousebind>
+ <mousebind button="A-Up" action="Click">
+ <action name="DesktopPrevious"/>
+ </mousebind>
+ <mousebind button="A-Down" action="Click">
+ <action name="DesktopNext"/>
+ </mousebind>
+ <mousebind button="C-A-Up" action="Click">
+ <action name="SendToDesktopPrevious"/>
+ </mousebind>
+ <mousebind button="C-A-Down" action="Click">
+ <action name="SendToDesktopNext"/>
+ </mousebind>
+ </context>
+ <context name="Titlebar">
+ <mousebind button="Left" action="Drag">
+ <action name="Move"/>
+ <!--
+ <action name="Execute">
+ <execute>play -q /home/akkana/Archive/Music/soundeffects/beeps/boing_2.wav</execute>
+ </action>
+ -->
+ </mousebind>
+ <mousebind button="Left" action="Click">
+ <action name="Raise"/>
+ </mousebind>
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ <!--
+ <action name="Execute">
+ <execute>play -q /home/akkana/Archive/Music/soundeffects/beeps/Red-Tailed_Hawk.wav</execute>
+ </action>
+ -->
+ </mousebind>
+ <!--
+ <mousebind button="Left" action="Release">
+ <action name="Execute">
+ <execute>play -q /home/akkana/Archive/Music/soundeffects/beeps/Laugh.wav</execute>
+ </action>
+ </mousebind>
+ -->
+ <mousebind button="Left" action="DoubleClick">
+ <action name="ToggleShade"/>
+ </mousebind>
+ <mousebind button="Middle" action="Press">
+ <action name="Lower"/>
+ </mousebind>
+ <mousebind button="Up" action="Click">
+ <action name="ShadeLower"/>
+ </mousebind>
+ <mousebind button="Down" action="Click">
+ <action name="Unshade"/>
+ </mousebind>
+ <mousebind button="Right" action="Press">
+ <action name="ShowMenu">
+ <menu>client-menu</menu>
+ </action>
+ </mousebind>
+ </context>
+ <context name="Right">
+ <mousebind button="Left" action="Drag">
+ <action name="Resize">
+ <edge>right</edge>
+ </action>
+ </mousebind>
+ </context>
+ <context name="Top">
+ <mousebind button="Left" action="Drag">
+ <action name="Resize">
+ <edge>top</edge>
+ </action>
+ </mousebind>
+ </context>
+ <context name="Left">
+ <mousebind button="Left" action="Drag">
+ <action name="Resize">
+ <edge>left</edge>
+ </action>
+ </mousebind>
+ </context>
+ <context name="Bottom">
+ <mousebind button="Left" action="Drag">
+ <action name="Resize">
+ <edge>bottom</edge>
+ </action>
+ </mousebind>
+ </context>
+ <context name="BLCorner">
+ <mousebind button="Left" action="Drag">
+ <action name="Resize"/>
+ </mousebind>
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ </context>
+ <context name="BRCorner">
+ <mousebind button="Left" action="Drag">
+ <action name="Resize"/>
+ </mousebind>
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ </context>
+ <context name="TLCorner">
+ <mousebind button="Left" action="Drag">
+ <action name="Resize"/>
+ </mousebind>
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ </context>
+ <context name="TRCorner">
+ <mousebind button="Left" action="Drag">
+ <action name="Resize"/>
+ </mousebind>
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ </context>
+ <context name="Client">
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ </context>
+
+ <!--
+ <mousebind button="Left" action="Release">
+ <action name="Execute">
+ <execute>play -q /home/akkana/Archive/Music/soundeffects/beeps/boing_2.wav</execute>
+ </action>
+ </mousebind>
+ <mousebind button="Middle" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ <mousebind button="Right" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ -->
+
+ <context name="Icon">
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ <mousebind button="Right" action="Press">
+ <action name="ShowMenu">
+ <menu>client-menu</menu>
+ </action>
+ </mousebind>
+ <mousebind button="Left" action="Press">
+ <action name="ShowMenu">
+ <menu>client-menu</menu>
+ </action>
+ </mousebind>
+ </context>
+ <context name="AllDesktops">
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ <mousebind button="Left" action="Click">
+ <action name="ToggleOmnipresent"/>
+ </mousebind>
+ </context>
+ <context name="Shade">
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ <mousebind button="Left" action="Click">
+ <action name="ToggleShade"/>
+ </mousebind>
+ </context>
+ <context name="Iconify">
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ <mousebind button="Left" action="Click">
+ <action name="Iconify"/>
+ </mousebind>
+ </context>
+ <context name="Maximize">
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ <mousebind button="Middle" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ <mousebind button="Right" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ <mousebind button="Left" action="Click">
+ <action name="ToggleMaximizeFull"/>
+ </mousebind>
+ <mousebind button="Middle" action="Click">
+ <action name="ToggleMaximizeVert"/>
+ </mousebind>
+ <mousebind button="Right" action="Click">
+ <action name="ToggleMaximizeHorz"/>
+ </mousebind>
+ </context>
+ <context name="Close">
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ </mousebind>
+ <mousebind button="Left" action="Click">
+ <action name="Close"/>
+ </mousebind>
+ </context>
+ <context name="Desktop">
+ <!--
+ <mousebind button="Left" action="Release">
+ <action name="Execute">
+ <execute>play -q /home/akkana/Archive/Music/soundeffects/beeps/WildEep.wav</execute>
+ </action>
+ </mousebind>
+ -->
+ <mousebind button="Up" action="Press">
+ <action name="DesktopPrevious"/>
+ </mousebind>
+ <mousebind button="Down" action="Press">
+ <action name="DesktopNext"/>
+ </mousebind>
+ <mousebind button="A-Up" action="Press">
+ <action name="DesktopPrevious"/>
+ </mousebind>
+ <mousebind button="A-Down" action="Press">
+ <action name="DesktopNext"/>
+ </mousebind>
+ <mousebind button="Left" action="Press">
+ <action name="Focus"/>
+ <action name="Raise"/>
+ </mousebind>
+ <!-- Move the normal desktop menu to W-middle since I seldom use it -->
+ <mousebind button="W-Middle" action="Press">
+ <action name="ShowMenu">
+ <menu>client-list-combined-menu</menu>
+ </action>
+ </mousebind>
+ <mousebind button="Middle" action="Press">
+ <action name="Execute">
+ <execute>sh -c 'firefox `pyclip`'</execute>
+ </action>
+ </mousebind>
+ <mousebind button="C-Middle" action="Press">
+ <action name="Execute">
+ <execute>sh -c 'firefox -new-tab `pyclip`'</execute>
+ </action>
+ </mousebind>
+ <mousebind button="Right" action="Press">
+ <action name="ShowMenu">
+ <menu>root-menu</menu>
+ </action>
+ </mousebind>
+ </context>
+ <context name="MoveResize">
+ <mousebind button="Up" action="Press">
+ <action name="DesktopPrevious"/>
+ </mousebind>
+ <mousebind button="Down" action="Press">
+ <action name="DesktopNext"/>
+ </mousebind>
+ <mousebind button="A-Up" action="Press">
+ <action name="DesktopPrevious"/>
+ </mousebind>
+ <mousebind button="A-Down" action="Press">
+ <action name="DesktopNext"/>
+ </mousebind>
+ </context>
+ <screenEdgeWarpTime>0</screenEdgeWarpTime>
+ </mouse>
+
+ <menu>
+ <!-- You can specify more than one menu file in here and they are all loaded,
+ just don't make menu ids clash or, well, it'll be kind of pointless -->
+ <!-- system menu files on Debian systems
+ <file>/var/lib/openbox/debian-menu.xml</file>
+ <file>debian-menu.xml</file>
+ -->
+ <!-- default menu file(s) (or custom one in $HOME/.config/openbox/) -->
+ <file>menu.xml</file>
+ </menu>
+ <margins>
+ <left>0</left>
+ <right>0</right>
+ <top>0</top>
+ <bottom>0</bottom>
+ </margins>
+</openbox_config>
View
104 .config/openbox/wifi-pipe.py
@@ -0,0 +1,104 @@
+#! /usr/bin/env python
+
+#
+# Openbox pipe menu script to show wifi connections
+# Inspired by http://tuxtraining.com/2009/08/26/scan-for-and-connect-to-networks-from-an-openbox-pipe-menu
+#
+# Copyright 2009 by Akkana Peck akkana@shallowsky.com
+# ... share and enjoy under the GPLv2 or (at your option) later.
+#
+
+import subprocess
+import re
+import sys
+
+if len(sys.argv) > 1 :
+ interface = sys.argv[1]
+else :
+ interface = "eth0"
+
+print "<openbox_pipe_menu>"
+
+proc = subprocess.Popen('iwlist scan 2>/dev/null', shell=True, stdout=subprocess.PIPE, )
+stdout_str = proc.communicate()[0]
+stdout_list = stdout_str.split('\n')
+
+class AccessPoint :
+
+ """ One Cell or AccessPoint from iwlist output"""
+
+ def __init__(self) :
+ self.address = ""
+ self.essid = ""
+ self.protocol = ""
+ self.encryptionType = ""
+
+aplist=[]
+ap = None
+
+for line in stdout_list:
+ line=line.strip()
+
+ match = re.search('Cell ', line)
+ if match :
+ print "Creating a new cell:", line
+ ap = AccessPoint()
+ aplist.append(ap)
+
+ match = re.search('ESSID:"(\S+)"', line)
+ if match and match.group(1) != "<hidden>":
+ ap.essid = match.group(1)
+
+ match = re.search('Address: (\S+)', line)
+ if match:
+ ap.address = match.group(1)
+
+ match = re.search('Encryption key:([onf]+)', line)
+ if match:
+ if match.group(1) == "off" :
+ ap.encrypted = False
+ else :
+ ap.encrypted = True
+
+ match = re.search('Protocol:(.+)', line)
+ if match:
+ ap.protocol = match.group(1)
+
+ match = re.search('WPA', line)
+ if match:
+ ap.encryptionType = "WPA"
+
+for ap in aplist :
+ print ap.essid + ":", ap.address, ap.protocol
+# encflag = ""
+# if ap.encrypted :
+# encflag = " -s"
+ essidstr = ""
+ essidlabel = "(Hidden)"
+ if ap.essid != "" :
+ # XXX Should look for a known scheme matching the essid
+ essidstr = "essid " + ap.essid
+ essidlabel = ap.essid
+
+ print "<item label=\"" + essidlabel + "\">"
+ if essidstr != "" :
+ print " <action name=\"Execute\">"
+ cmdstr = " <command>echo sudo /etc/network/schemes/netscheme -g " \
+ + essidstr
+ if ap.encrypted :
+ cmdstr += " -p"
+ cmdstr += "</command>"
+ print cmdstr
+# if ap.encrypted :
+# print " <command>echo /home/akkana/bin/wifi-connect " \
+# + interface + " " + essidstr + "</command>"
+# else :
+# print " <command>echo sudo iwconfig " + interface \
+# + " " + essidstr + "</command>"
+ print " </action>"
+ print "</item>"
+
+print "</openbox_pipe_menu>"
+
+
+
View
583 .cshrc
@@ -0,0 +1,583 @@
+########################
+# Akkana's .cshrc
+#########################
+
+#set debug=1
+#set verbose
+if ($?debug) echo -n "[.cshrc] "
+
+if ( ! $?prompt || ! $?term ) then
+ # not interactive -- skip the hard stuff
+ unset debug
+ exit 0
+endif
+
+# Do case insensitive completion
+#set complete=enhance
+
+# OS-specific stuff
+set opsys = `uname -s`
+
+switch ($opsys)
+ case IRIX:
+ source $HOME/.cshrc.irix
+ breaksw
+
+ case Linux:
+ # Keep the linux stuff here, since it's most likely to be used
+ set path = ( $HOME/bin/linux $HOME/bin /usr/local/bin /usr/sbin /usr/bin /bin /usr/bin/X11 . /sbin /usr/games $HOME/android/eclipse $HOME/android/android-sdk-linux_x86/tools /opt/meego/meego-sdk-qt-creator/bin )
+
+ setenv PAGER less
+ # On Gentoo, manuals only work if LESS is set to -R -M --shift 5
+ if (-e /etc/gentoo-release) then
+ setenv LESS '-E -R -M --shift 5'
+ else
+ setenv LESS -E
+ endif
+ setenv EDITOR vim
+# if ( $TERM == 'xterm' && -f /usr/share/terminfo/x/xterm-256color ) then
+# setenv TERM xterm-256color
+ endif
+
+ # Make patch actually obey -p0
+ # setenv POSIXLY_CORRECT 1
+
+ # ls 4.0.36 changed its sort so that by default, dot and non-dot files
+ # are grouped together. Apparently this is a POSIX misfeature and
+ # can be turned off thusly:
+ setenv LC_COLLATE C
+
+ # For mutt:
+ #setenv LC_ALL en_US.UTF-8
+
+ # Linux doesn't have enscript, but it has mprint:
+ alias ens 'mpage -2 -f -p \!* | lpr'
+ alias ens4 'mpage -4 -f -p \!* | lpr'
+
+ # CUPS on Debian with the C86 prints normal text starting
+ # two characters off the left side of the page.
+ # lp -o page-left=16 will print it pretty much flush.
+ # But by default I want some margins, so:
+ #alias lpr "lp -o page-left=38 -o page-top=17"
+ # Turns out that xpp (X printer panel) can adjust margins systemwide!
+ # Except it may not actually work.
+
+ # But on Karmic, it has another bug and I have to set the cpi
+ # explicitly wrong:
+ #alias lpr /usr/bin/lpr -o cpi=17
+
+ breaksw
+
+ case SunOS:
+ source $HOME/.cshrc.sunos
+ breaksw
+
+ default:
+ set path = ( $HOME/bin /usr/sbin /usr/bin /usr/ucb /usr/local/bin /usr/java/bin /usr/bsd /bin /usr/bin/X11 . )
+ breaksw
+endsw
+# end of switch over different OSes
+
+###############################
+# General aliases and settings
+###############################
+
+# Alias to set the title on xterm compatibles:
+alias titlebar "echo ']2;\!*'"
+alias ntitlebar "echo '_;\!*\\'"
+
+# Set some editing bindings for tcsh:
+if ($?tcsh) then
+ bindkey ^W backward-delete-word
+ set autolist=ambiguous
+endif
+
+set notify
+
+set mail = (0 $HOME/Msgs/in/Inbox /var/mail/akkana)
+
+unset autologout
+# setenv MORE -cs
+#setenv EXINIT "set ai sm wm=9"
+#setenv ENSCRIPT -2r
+
+# Make rsync work, since ssh is the only option actually enabled
+# in most linux distros:
+setenv RSYNC_RSH ssh
+
+set history=200
+set filec
+
+alias m /usr/bin/mutt
+
+alias beep echo 
+alias pop play -q $HOME/.xchat2/sounds/pop.wav
+alias pd pushd
+alias pd2 pushd +2
+alias ls ls -FH
+alias ll ls -lsFhH
+alias lla ls -AlsFhH
+alias llt ls -lsFhtH
+alias llth '/bin/ls -lshHFt \!* | head -20'
+alias j jobs
+alias ap man -k
+alias s suspend
+alias xx 'startx >& .xsession-errors'
+alias mpl2 mplayer -zoom -xy 2
+alias mpl3 mplayer -zoom -xy 3
+
+###############################
+# Recursive greps
+alias gr "find . \( -type f -and -not -name '*.o' -and -not -name '*.so' -and -not -name '*.a' -and -not -name '*.pdf' -and -not -name '*.doc' \) -print0 | xargs -0 grep \!* /dev/null | fgrep -v .svn"
+alias ggr "find . \( -type f -and -not -name '*.o' -and -not -name '*.so' -and -not -name '*.a' \) -print0 | xargs -0 grep \!* /dev/null | grep -v 'Binary file'"
+alias cgr "find . \( -name '*.[CchH]' -or -name '*.cpp' -or -name '*.cc' \) -print0 | xargs -0 grep \!* /dev/null"
+alias hgr "find . \( -name '*.h' -or -name '*.idl' \) -print0 | xargs -0 grep \!* /dev/null"
+#alias rgr "find . \( -name '*.rb' -or -name '*.rhtml' \) -print0 | xargs -0 grep \!* /dev/null | fgrep -v .svn | fgrep -v /db/"
+alias rgr "find . \( -name .svn -or -name db -prune \) -or \( -name '*.rb' -or -name '*.rhtml' -or -name '*.yml' \) -print0 | xargs -0 grep \!* /dev/null"
+alias jcgr "find . \( -name '*.cChH' -or -name '*.cpp' -or -name '*.cc' -or -name '*.js' \) -print0 | xargs -0 grep \!* /dev/null"
+alias htgr "find . -name '*.*htm*' -print0 | xargs -0 grep \!* /dev/null"
+alias jgr "find . -name '*.js' -print0 | xargs -0 grep \!* /dev/null"
+alias xgr "find . \( -name '*.cChH' -or -name '*.cpp' -or -name '*.xul' -or -name '*.html' -or -name '*.js' -or -name '*.css' \) -print0 | xargs -0 grep \!* /dev/null"
+alias cssgr "find . -name '*.css' -print0 | xargs -0 grep \!* /dev/null"
+alias mgr "find . -name '*akefile*' -print0 | xargs -0 grep \!* /dev/null"
+alias tgr "find . -type f -and -name '*.txt' -print0 | xargs -0 grep \!* /dev/null | fgrep -v .svn"
+alias agr "find . -type f -print0 | xargs -0 grep \!* /dev/null"
+alias zgr "find . \( -type f -and -not -name '*.o' -and -not -name '*.so' -and -not -name '*.a' \) -print0 | xargs -0 zgrep \!* /dev/null"
+
+###############################
+# Java
+alias av appletviewer
+alias jc javac
+
+alias df df -k
+
+# halt and reboot don't always work on the Vaio,
+# and can't be run suid.
+alias off sudo shutdown -h now
+alias halt sudo shutdown -h now
+alias reboot sudo shutdown -r now
+
+# Check what sort of line endings a file has -- courtesy of pjf:
+#alias lineendings 'perl -lne\'print /\r$/ && "CR","LF"; exit\''
+# and another clever way from Kathryn:
+#alias lineendings2 'head -n 1 \!* | sed -e \'s/<.*>//\' | file -'
+# <kathryn> i'd rather just do sed -e 's/^.*//' but that replaces
+# whatever line endings you have with \n
+
+# Get ink status from Epson printers
+alias epsonink escputil -r /dev/usblp0 -mC86 -u -i
+alias epsonnozzle escputil -r /dev/usblp0 -mC86 -u -n
+alias epsonclean escputil -r /dev/usblp0 -mC86 -u -c
+
+# Pluck/scoop news sites for the Palm:
+#setenv PILOTRATE 57600
+# PILOTPORT needs to be /dev/ttyUSB0 for Tungsten, /dev/ttyUSB0 all else.
+setenv PILOTPORT /dev/ttyUSB0
+alias pluck 'plucker-build -f plucked -H \!* --noimages --stayonhost --zlib-compression'
+
+# Sitescooper doesn't let these be configured in sitescooper.cf:
+# noheaders/nofooters screws up I,Cringely
+#alias scoop 'setenv LANG C; rm $HOME/.sitescooper/prc/*.pdb; \
+# sitescooper -debug \!* |& setsid tee $HOME/scoop.out; \
+# cat $HOME/web/xtraurls.html >> $HOME/.../xtraurls.html; \
+# rm $HOME/web/xtraurls.html; \
+# ls $HOME/.sitescooper/prc'
+#alias rscoop "rm $HOME/.sitescooper/prc/*; nohup sitescooper >& $HOME/scoop.out &"
+#alias scoopsite "sitescooper -sites \!*"
+#unset scoopcmd
+#alias piscoop 'pilot-xfer -i ~/.sitescooper/prc/*.pdb'
+#alias pifeed 'pilot-xfer -i ~/.plucker/feedme/*.pdb'
+#alias pils 'echo "In ~/.plucker/feedme : "; ls ~/.plucker/feedme'
+#alias picd 'cd ~/.sitescooper/prc'
+#alias palmbak 'set palmname = \!:1; \
+# rm -rf ~/Pilot/$palmname.bak; \
+# cp -a ~/Pilot/$palmname ~/Pilot/$palmname.bak; \
+# pilot-xfer -s ~/Pilot/$palmname; \
+# pluckmemos -f $HOME/Pilot/$palmname/MemoDB.pdb; \
+# if (-f ~/.plucker/html/xtraurls.html) cat ~/.plucker/html/xtraurls.html >>$HOME/Docs/Lists/xtraurls.html '
+
+#alias zirebak 'setenv PILOTPORT /dev/ttyUSB1; palmbak Zire'
+#alias tungbak 'setenv PILOTPORT /dev/ttyUSB0; palmbak Tungsten'
+#alias cliebak 'setenv PILOTPORT /dev/ttyUSB1; palmbak Clie'
+#alias treobak 'setenv PILOTPORT /dev/ttyUSB1; palmbak Treo'
+
+alias feed 'rsync -av --delete moon:.cache/feedme/ ~/.cache/feedme/ \
+ mount /droidsd; \
+ urlrss; \
+ feedme; \
+ echo Copying `date +%m-%d-%a` to /droidsd/feeds/ ; \
+ cp -r ~/feeds/`date +%m-%d-%a` /droidsd/feeds/ ; \
+ umount /droidsd &; \
+ echo "Syncing back to the server"; \
+ rsync -av ~/.cache/feedme/ moon:.cache/feedme/'
+
+# Clavius has moby-thesaurus locally, but default dict goes to moon.
+alias thes dict -h localhost -d moby-thesaurus
+# Translation dictionaries:
+alias en-spa dict -h localhost -d fd-eng-spa
+alias spa-en dict -h localhost -d fd-spa-eng
+alias en-lat dict -h localhost -d fd-eng-spa
+alias lat-en dict -h localhost -d fd-lat-eng
+
+# Turn flash on and off in Firefox, because as of FF3 it crashes
+# so often, even when blocked by flashblock:
+#alias flashoff 'mv $HOME/.mozilla/plugins/libflashplayer.so $HOME/.mozilla/plugins/flashplayer.xpt $HOME/.mozilla/noplugins'
+#alias flashon 'mv $HOME/.mozilla/noplugins/libflashplayer.so $HOME/.mozilla/noplugins/flashplayer.xpt $HOME/.mozilla/plugins'
+
+###############################
+# Trn from multiple servers
+###############################
+# trn options: add -e -L for screen clearing (but it doesn't work right),
+# omit -x and -X options for regular non-threaded rn
+# -q is supposed to ask about new groups, but doesn't.
+# But doing "a*" gets a prompt for all the newsgroups.
+#setenv TRNINIT "-C7 -I -M -s -x -X15X -m=u -EATTRIBUTION='%)f <%>f> wrote:' -ESAVEDIR=$HOME/Msgs"
+# Can add "-EXTERMMOUSE=y" to TRNINIT but then you can't
+# select with the mouse any more
+# $HOME/.newsrc is for news.mozilla.org.
+# To use other .newsrcs, change DOTDIR and NNTPSERVER
+#alias moztrn "setenv NNTPSERVER news.mozilla.org; setenv DOTDIR $HOME/nntpservers/news.mozilla.org; \trn"
+
+###############################
+# Terminal setting:
+###############################
+set standout = ""
+set standout_end = ""
+#if ( $?COLORTERM && $COLORTERM == gnome-terminal ) then
+# # gnome-terminal doesn't colorize bold, so we need a separate clause.
+# echo "Ewwww, gnome-terminal!"
+# setenv TERM xterm-noalt
+# # However, it also doesn't handle color escape sequences in prompts. Sigh.
+# set standout = "%B"
+# set standout_end = "%b"
+if ($?tcsh) then
+ #set standout = "%U"
+ #set standout_end = "%u"
+ set standout = "%B"
+ set standout_end = "%b"
+else if ( $term =~ iris* ) then
+ # Set the prompt to be yellow. This puts the prompt in boldface:
+ # set standout = ""
+ # set standout_end = ""
+ # but this is more reliable, setting the color explicitly:
+ set standout = ""
+ set standout_end = ""
+ # colors: 30-37 Set the text color to black, red, green, yellow, blue,
+ # magenta, cyan or white, respecotively (ISO 6429).
+ # 40-47 Set the page color to black, red, green, yellow, blue,
+ # magenta, cyan or white, respectively (ISO 6429).
+else if ( $term =~ hp* ) then
+ set standout = "&v2S"
+ set standout_end = "&v3S"
+else if ($term == "xterm") then
+ set standout = ""
+ set standout_end = ""
+else if ($term == "vt100") then
+ # a couple of items for pcplus and netcom
+ if ( -x /usr/5bin/tabs ) /usr/5bin/tabs
+ set standout = ""
+ set standout_end = ""
+else if ($term == "ansi" || $term == 'vt102') then
+ stty -tabs
+ set standout = ""
+ set standout_end = ""
+endif
+
+###############################
+# Prompt setting:
+###############################
+# and set the prompt with the correct number of primes in it:
+if (! $?PRIMES) setenv PRIMES ""
+setenv PRIMES $PRIMES\'
+
+# SunOS has different args for hostname than everyone else, sigh.
+# It also doesn't have whoami.
+if ($opsys == SunOS) then
+ set host = `hostname`
+ set me = "akkana"
+else
+ set host = `hostname -s`
+ set me = `whoami`
+endif
+
+if ($me == 'akkana') then
+ set prompt = "$standout($host$PRIMES)-$standout_end "
+else if ($me == 'root') then
+ # square brackets in next line cause a "variable syntax" error, so:
+ set prompt = "$standout<$host#$PRIMES>-$standout_end "
+else
+ set prompt = "$standout($me@$host$PRIMES)-$standout_end "
+endif
+
+unset me
+unset host
+unset standout
+unset standout_end
+
+###########################################
+# Colorizing for other apps, e.g. man/less
+###########################################
+# Colors for man pages. See
+# http://wiki.clug.org.za/wiki/Colour_on_the_command_line
+#
+# Black 0;30 Dark Gray 1;30
+# Blue 0;34 Light Blue 1;34
+# Green 0;32 Light Green 1;32
+# Cyan 0;36 Light Cyan 1;36
+# Red 0;31 Light Red 1;31
+# Purple 0;35 Light Purple 1;35
+# Brown 0;33 Yellow 1;33
+# Light Gray 0;37 White 1;37
+#
+setenv LESS_TERMCAP_mb ''
+setenv LESS_TERMCAP_md ''
+setenv LESS_TERMCAP_me ''
+setenv LESS_TERMCAP_se ''
+setenv LESS_TERMCAP_so ''
+setenv LESS_TERMCAP_ue ''
+setenv LESS_TERMCAP_us ''
+
+###############################
+# Location-specific stuff:
+###############################
+
+#
+# from here to near the end, Company-specific stuff:
+#
+set company=netscape
+
+switch ($company)
+
+# Settings for Netscape:
+ case 'netscape':
+
+ #
+ # Mozilla build
+ #
+ setenv CVSROOT :ext:akkzilla%shallowsky.com@cvs.mozilla.org:/cvsroot
+ alias cvsblame cvs annotate
+
+ alias build "gmake -f client.mk build; echo "
+ alias pullfox "gmake -f client.mk checkout MOZ_CO_PROJECT=browser"
+ alias newmoz "cvs co mozilla/client.mk; cd mozilla; gmake -f client.mk pull_all build_all; echo "
+
+ alias t 'set _moz=`trees \!*`; if ("$_moz" != "") cd "$_moz"; endif; unset _moz; pwd'
+ alias mozconfig "../mozilla/configure --enable-editor --enable-debug --with-pthreads --enable-md; echo "
+ alias ml \
+ 'foreach mdir (../build* ../../build* ../../../build* ) \
+ echo updating $mdir \
+ pushd $mdir \
+ rm -f lib* \
+ gmake \
+ popd \
+ end'
+# setenv LD_LIBRARY_PATH .
+
+ # Helper for tkdiff
+ alias cdiff 'foreach fil ( \!* ) \
+ tkdiff $fil & \
+ end'
+
+ # Testing moz in various forms:
+ alias moz ./mozilla -P Debug
+ alias mozed ./mozilla -P Debug -edit
+
+ # Here's how to dump core on assertions:
+ # stack=dump core, trap=break in gdb
+ #setenv XPCOM_DEBUG_BREAK stack
+
+ alias update "cvs update \!* |& egrep -v '^cvs' ; echo "
+ alias updaten "cvs -n update \!* |& egrep -v '^cvs' ; echo "
+ alias showmod "cvs -n update \!* |& egrep -v '^cvs' |& egrep -v '^U' ; echo "
+ alias log "cvs log \!* | grep -v '^ ' | more"
+
+ alias ssera sudo /etc/init.d/vpn start
+ alias sera open_tunnel -e -n 443 sera25-mv.aoltw.net akkana
+ alias sera2 open_tunnel -e -n 443 sera25-rtc.aol.com akkana
+ alias nosera close_tunnel
+
+ breaksw
+
+# end of company-specific stuff
+ endsw
+
+endif
+# end of "only if interactive (i.e. prompt set)"
+
+# echo "."
+
+if ($?debug) then
+ echo "."
+ unset debug
+endif
+
+setenv PHO_ARGS p
+
+alias newraptor "cvs co mozilla/client.mk; cd mozilla; gmake -f client.mk"
+umask 22
+
+alias sargepkg 'links "http://packages.debian.org/cgi-bin/search_packages.pl?keywords=\!*&searchon=names&subword=1&version=testing&release=all"'
+alias sidpkg 'links "http://packages.debian.org/cgi-bin/search_packages.pl?keywords=\!*&searchon=names&subword=1&version=unstable&release=all"'
+alias sargefile 'links "http://packages.debian.org/cgi-bin/search_contents.pl?word=\!*&searchmode=searchword&case=insensitive&version=testing&arch=i386"'
+alias sidfile 'links "http://packages.debian.org/cgi-bin/search_contents.pl?word=\!*&searchmode=searchword&case=insensitive&version=unstable&arch=i386"'
+limit coredumpsize unlimited
+
+# gnumeric refuses to remember window size. So try to force it.
+alias gnumeric gnumeric -g 800x600
+
+# mencoder options are black magic.
+# This works for converting Minolta quicktime .mov to mpeg:
+alias mov2mpg1 'mencoder \!:1 -oac pcm -ovc lavc -lavcopts vcodec=mpeg1video -o \!:2'
+# -lavc is ffmpeg, and the default codec is divx:
+alias mov2divx 'mencoder \!:1 -oac pcm -ovc lavc -o \!:2'
+# From drc on #gimp:
+alias mov2mpeg4 'mencoder \!:1 -oac pcm -ovc lavc -lavcopts vcodec=mpeg4:vqmin=2:vlelim=-4:vcelim=9:lumi_mask=0.05:dark_mask=0.01:vhq -o \!:2'
+
+# use ffmpeg to convert to flash: the -ar 44100 isn't always needed,
+# but for input videos that sample at 48000, ffmpeg will die with an error.
+alias mov2flv 'ffmpeg -i \!:1 -ar 44100 \!:2'
+
+# Extract the audio from a flash (e.g. youtube) track:
+# Thanks http://en.gibney.org/convert_flv_files_to_mp3/ and
+# http://en.gibney.org/youtube_to_mp3/
+alias flv2mp3 'ffmpeg -i \!:1 -f mp3 \!:2'
+
+# This may not work with 2.6. Note, cdrecord dev=ATA: -scanbus
+# as per /usr/share/doc/cdrecord/README.ATAPI.setup
+alias burniso 'cdrecord -v speed=0 \!*'
+#alias cddup "cdrecord -v speed=0 -isosize /dev/cdrom"
+
+# Recipes for ebook-convert
+alias pdf2epub 'ebook-convert \!:1 `echo \!:1 | sed "s/.pdf/.epub/"` --authors "\!:2" --title "\!:3"'
+
+# alias pho pho -d
+
+# Remove the line matching $1 from ~/.ssh/known_hosts.
+# Ssh refuses to operate if anything has changed about the host:
+# network card, distro it's running, etc.
+alias sshrm 'mv $HOME/.ssh/known_hosts $HOME/.ssh/known_hosts.bak; grep -v \!^ $HOME/.ssh/known_hosts.bak >$HOME/.ssh/known_hosts'
+
+# Get the temperature from /proc/acpi/thermal_zone/THRM/temperature
+# and convert it to F
+alias xxtemp "cat /proc/acpi/thermal_zone/THRM/temperature; \
+ awk '{print $2}' < /proc/acpi/thermal_zone/THRM/temperature | xargs -i units 'tempC({})' tempF"
+
+# Screenshot for Apress style guidelines: tiff, lzw compression.
+alias bookss "import -frame -density 150x150 -label "Figure 2-1: The Toolbox" -compress LZW"
+
+# Record a realaudio stream.
+# This used to work to mp3 but now it only works to wav.
+alias getreal 'mplayer -playlist \!:1 -ao pcm:file=\!:2 -vc null -vo null'
+# Then transcode it with:
+# lame --tg Other --ta artist -tl album file.wav file.mp3
+
+alias ratings 'links -dump "http://www.amazon.com/gp/product/1590595874" | grep "in Books" | grep -v Explore'
+alias ratings2 'links -dump "http://www.amazon.com/gp/product/1430210702" | grep "in Books" | grep -v Explore'
+
+#alias newbg 'xsetbg -fullscreen -border black `find $HOME/Backgrounds/ -name "*.*" | randomline`'
+alias newbg 'hsetroot -center `find -L $HOME/Backgrounds/ -name "*.*" | randomline`'
+
+alias white xsetroot -bg white
+
+alias sp 'spell \!* | sort | uniq'
+
+# Suspend to RAM
+if (-x /usr/sbin/pm-suspend) then
+ alias zzz sudo /usr/sbin/pm-suspend --auto-quirks
+ alias hib sudo /usr/sbin/pm-hibernate --auto-quirks
+else if (-x /etc/acpi/suspend.sh) then
+ alias zzz sudo /etc/acpi/suspend.sh
+ alias hib sudo /etc/acpi/hibernate.sh
+else if (-x /usr/sbin/hibernate) then
+ # add --force if necessary
+ alias zzz 'sudo hibernate -v 4 -F /etc/hibernate/ram.conf'
+ alias hib hibernate
+endif
+
+alias falconcam2 vlc http://falconcam.sanjoseca.gov/nest
+alias falconcam vlc rtsp://bird-mirror.ucsc.edu/birdie-sj.sdp
+
+# How to run xnest, in case they ever fix it
+alias xxnest 'xinit ~/.xinitrc.xnest -- /usr/bin/Xnest -ac :1 -geometry 1024x768'
+# Start a second X server on F8 -- this only works from tty2
+alias secondx 'startx $HOME/.xinitrc.xnest -- :1'
+
+# Image to help with resistor color codes
+alias resist pho -P $HOME/Docs/hardware/resistors.jpg
+
+# I can never remember the name audacious, and besides, it doesn't
+# autocomplete because of audacity.
+alias xmms audacious
+
+# For the Apple cinema display:
+#alias brighter /home/akkana/bin/linux/acdcontrol /dev/usb/hiddev0 +10
+#alias dimmer /home/akkana/bin/linux/acdcontrol /dev/usb/hiddev0 -- -10
+#alias screenoff 'sleep 1; xset s activate'
+
+alias xb '@ b1 = \!:1; @ b2 = $b1 * 65536 / 100 - 1; xbrightness $b2; unset b1 b2'
+
+# Print only odd or even pages on a printer (for dual-sided printing):
+alias lpodd lp -o page-set=odd
+alias lpeven lp -o page-set=even
+
+# Try to remember ssh password, for version control systems:
+# http://automorphic.blogspot.com/2007/01/using-ssh-agent-to-stop-getting.html
+alias sshpwd 'eval `/usr/bin/ssh-agent`; ssh-add ~/.ssh/id_rsa'
+
+# I can never remember this name, and gtkfontsel has gone away, so:
+alias gtkfontsel "echo Use gnome-specimen instead"
+
+# Some useful ps arguments:
+alias pscpu ps axSO -C o user,pid,pcpu,pmem,vsz,rss,stat,time,comm
+alias psmem ps axSO -r o user,pid,pcpu,pmem,vsz,rss,stat,time,comm
+
+# Find all files beneath the current dir that lack a Keywords file:
+# (switched to using a more reliable python script).
+# alias nokeywords "find . -type d -exec ls '{}/Keywords' \; |& grep -v \\./Keywords | grep 'No such file' | sed -e 's_.*cannot access \./__' -e 's_/Keywords: No such.*__' "
+
+# Remove podget podcast files except recent ones:
+#alias prunepod 'find ~/Archive/Sounds/talk -maxdepth 1 -name "*.mp3" -ctime +6 -exec rm "{}" \;'
+alias prunepod 'find ~/POD -ctime +20 -exec rm "{}" \;'
+
+# Show podcasts recently downloaded:
+alias pods 'cd ~/POD; ls -1t `find . -type f ` | head -30'
+
+# cryptmount device name
+alias cryptmount 'sudo cryptsetup luksOpen \!:1 \!:2; sudo mount /dev/mapper/\!:2 /media/\!:2'
+alias world cryptmount /dev/sdb2 world
+alias unworld sudo umount /media/world
+
+# Gentoo aliases
+alias update "emerge --update --deep --newuse world"
+
+# updating gentoo:
+# emerge --sync
+# emerge -puD world
+# OR
+# emerge-delta-webrsync -u
+# THEN:
+# emerge -uD world
+# eix-update
+
+# Python snippets
+setenv SNIPPETS_DIR /home/akkana/outsrc/python-snippets
+
+# For ubuntu development
+setenv DEBFULLNAME "Akkana Peck"
+setenv DEBEMAIL "akkana@shallowsky.com"
+
+# Serial connections to plugs and other embedded devices:
+alias serial screen /dev/ttyUSB0 115200
+alias serial1 screen /dev/ttyUSB1 115200
+
+# ssh to get around stupid non-turnoffable known hosts checking
+# http://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html
+#alias sssh ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
+
+# Meego OSC
+alias mosc 'osc -Ahttps://api.pub.meego.com --no-keyring --no-gnome-keyring \!*'
+
+# Update website blog entries -- helpers for pyblosxom.
+alias blogup 'cd ~/web/blogfiles; pyblosxom-cmd staticrender --incremental; cd'
+alias blogupdate 'cd ~/web/blogfiles; pyblosxom-cmd staticrender --incremental && ~/bin/blogtopics && mv ../blog/topics.html ../blog/oldtopics.html && mv ../blog/newtopics.html ../blog/topics.html && blog-tag-index; cd'
+
View
2  .emacs
@@ -0,0 +1,2 @@
<