Commits

Toby Davies committed 039b1a7

so much stuff

Comments (0)

Files changed (13)

 (require 'ipython)
 (require 'mediawiki)
 (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
+(add-to-list 'auto-mode-alist '("\\.pl\\'" . prolog-mode))
 (global-set-key "\C-cl" 'org-store-link)
 (global-set-key "\C-ca" 'org-agenda)
 (global-set-key "\C-cb" 'org-iswitchb)
   ;; If you edit it by hand, you could mess it up, so be careful.
   ;; Your init file should contain only one such instance.
   ;; If there is more than one, they won't work right.
+ '(browse-url-browser-function (quote browse-url-generic))
+ '(browse-url-generic-program "sensible-browser")
  '(inhibit-startup-screen t)
  '(initial-buffer-choice t)
- '(org-agenda-files (quote ("~/settings/index.org")))
+ '(ispell-dictionary "british")
+ '(org-agenda-files (quote ("~/org.d/")))
  '(pop-up-frames nil))
 
 (define-button-type 'apropos-button
 )
 
 (add-hook 'after-make-frame-functions 'set-mouse-mode-function)
+
+(setq latex-mode-hook 
+      '(lambda ()
+	 (ispell-minor-mode)))
+(custom-set-faces
+  ;; custom-set-faces was added by Custom.
+  ;; If you edit it by hand, you could mess it up, so be careful.
+  ;; Your init file should contain only one such instance.
+  ;; If there is more than one, they won't work right.
+ )

.xmonad/xmonad.hs

   ("M-s", inputPrompt defaultXPConfig "Google" ?+ \t -> safeSpawn "search" [t]),
   ("M-S-s", spawn "bash -c 'search \"$(xclip -o)\"'"),
   ("M-g", spawn "sensible-browser --app=http://www.gmail.com"),
-  ("M-o", spawn "open"),
+  ("M-o", spawn "nautilus --no-desktop"),
   ("M-;", focusUrgent),
   ("<XF86AudioLowerVolume>", spawn "amixer sset -- Master playback 10-"),
   ("<XF86AudioRaiseVolume>", spawn "amixer sset -- Master playback 10+"),
+  ("S-<XF86AudioRaiseVolume>", spawn "amixer sset -- Master playback 100%"),
   ("<XF86AudioMute>", spawn "amixer sset -- Master playback 0%"),
   ("M-<F3>", spawn "xbacklight -inc 20"),
-  ("M-<F2>", spawn "xbacklight -dec 20 ; echo foo >> foo.bar")
+  ("M-<F2>", spawn "xbacklight -dec 20")
   ]
 
 manageHooks = [
   className =? "Xmessage" -->doFloat,
   className =? "Zenity" -->doFloat,
   className =? "Rhythmbox" -->doShift "music",
-  className =? "trayer" -->doShift "misc"
+  className =? "trayer" -->doShift "misc",
+  className =? "skype" -->doShift "skype"
   ]
               
 myLayoutHook = showWName $ smartBorders $ (tiled (9/15) ||| Grid ||| Mirror (tiled (13/15)) ||| simpleTabbedBottom ||| Full)
   "web",
   "code",
   "chat",
-  "extra-terminals",
-  "5",
-  "6",
+  "docs",
+  "terminals",
+  "skype",
   "7",
   "music",
   "misc"
-  ]
+  ]
+
+defaultApps = M.fromList [
+  ("web","sensible-browser"),
+  ("code","sensible-editor"),
+  ("chat","pidgin"),
+  ("terminals","urxvt"),
+  ("skype","skype"),
+  ("music","rhythmbox")
+  ]
+  
 cr="${$(print "_\r_")[2]}"
 crlf="$cr$lf"
 
+export uni=~/subjects/
+
+export brit=~/.purple/logs/jabber/tobyodavies@chat.facebook.com/-100000799571942@chat.facebook.com/
+
 if [ -d ~/py-src ] ; then
     export PYTHONPATH=~/py-src/
 fi
 alias visit='noglob visit'
 alias ll='ls -lh --color=auto '
 alias la='ll -A'
+alias can-has='sudo aptitude install '
 
 unalias run-help 2>/dev/null
 autoload -U run-help
 
 ### initialize for terminals - must be last so tramp doesn't die
 dumb_init(){
-    PS1='%n@%M:%~
-%! - %# '
+    PS1='%# '
     # for tramp to not hang, need the following. cf:
     # http://www.emacswiki.org/emacs/TrampMode
     unsetopt zle
+#!/usr/bin/zsh
+
+dot -Tpng -o $(dirname $1)/$(basename $1 '.dot').png $1
+#!/bin/bash
+if [ $# -ne 3 ]; then
+   echo Usage: $0 local base other
+   exit 1
+fi
+emacs --eval '(ediff-merge-with-ancestor "'$1'" "'$2'" "'$3'")' 
+
+#!/usr/bin/zsh
+DIR="${1:-.}" ;
+sed -e 's/\\\(input\|begin\|end\|documentclass\|usepackage\|cite\|biblio\w*\)\(\[.*\]\|\){\S*}//' -e 's/\\\w*//' -e 's/{\|}//g' -e 's/%.*$//' -e '/^\s*$/d' "$DIR/"**/*.tex | wc -w
+#!/usr/bin/zsh
+
+#!/usr/bin/zsh
+for file in $@ ; do
+    tpl=${file#*.}
+    while [ '!' -e ~/Templates/tpl.$tpl ] ; do
+	case $tpl in
+	    *.*)  tpl=${tpl#*.} ;;
+	*) 
+	echo "No Such template ~/Templates/tpl.${file#*.}"  1>&2
+	exit 1 ;;
+	esac
+    done
+
+    if [ -e "$file" ] ; then
+	read -q 'YN?Overwrite '"$file"'? [y/N] '
+    else
+	YN=y
+    fi
+
+
+    if [ "$YN" = 'y' ]; then 
+	env FILE=$file BASENAME=$(basename $file .$tpl) TPL=$tpl envsubst < ~/Templates/tpl.$tpl > $file
+
+    fi
+done
+    
+#!/usr/bin/zsh
+
+SOUND="/usr/share/sounds/ubuntu/stereo/dialog-question.ogg"
+
+DELAY=$((25*60))
+
+function 
+#!/usr/bin/zsh
+
+property(){
+    upower -d | grep "$1:" |sed 's/[^0-9]*\([0-9]*\.*[0-9]*\).*/\1/'
+}
+
+property percentage
+#!/usr/bin/zsh
+
+M=${1:-main}
+
+function notreallymain (){
+    if [ '!' -e "$M.tex" ] ; then
+	return 0
+    fi
+    if fgrep -q '\documentclass' $M.tex  ; then
+	return 1
+    fi
+    return 0
+}
+
+while [ $PWD != '/' ] && notreallymain ; do
+    cd ..
+done
+
+
+if [ -e $M.tex ] ; then
+    find '.' -name '*.dot' -exec dot2png '{}' ';'
+
+    pdflatex $M && bibtex $M && pdflatex $M && pdflatex $M
+fi
+#!/usr/bin/zsh
+
+function mainpdf {
+    pdflatex main.pdf
+}
+
+pdflatex $(basename main.pdf) && bibtex $(basename main.pdf) && pdflatex $(basename main.pdf) && pdflatex $(basename )