Commits

Toby Davies committed d0b4143 Merge

merge

Comments (0)

Files changed (5)

   ;; 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.
+ '(background-color "gray5")
  '(browse-url-browser-function (quote browse-url-generic))
  '(browse-url-generic-program "sensible-browser")
  '(comment-multi-line t)
  '(desktop-load-locked-desktop t)
  '(desktop-save-mode t)
  '(ecb-options-version "2.32")
+ '(font-use-system-font t)
+ '(foreground-color "ivory")
  '(inhibit-startup-screen t)
  ;;'(initial-buffer-choice t)
  '(ispell-dictionary "british" t)
 (add-to-list 'flymake-allowed-file-name-masks
              '("\\.py\\'" flymake-pyflakes-init))
 
+(add-hook 'python-mode-hook
+	  (lambda ()
+	    (unless (eq buffer-file-name nil)
+	      (flymake-mode 1)
+	      (local-set-key [f2] 'flymake-goto-prev-error)
+	      (local-set-key [f3] 'flymake-goto-next-error))))
 
 (defun woman-at-point ()
   (interactive)
   (insert "Choose from the available man pages:\n")
   (toggle-read-only 1))
 
-(add-hook 'after-make-frame-functions 'set-mouse-mode-function)
 
 (setq latex-mode-hook 
       '(lambda ()
 	 (ispell-minor-mode)))
 
+(defun set-colors-function (frame)
+  (select-frame frame)
+  (set-background-color "gray5")
+  (set-foreground-color "ivory"))
+
+(add-hook 'after-make-frame-functions 'set-colors-function)
+
+(tool-bar-mode nil)
+(menu-bar-mode nil)
+(scroll-bar-mode nil)
+
 (defun set-mouse-mode-function (frame)
   (xterm-mouse-mode t)
   (global-set-key [mouse-2] 'clipboard-yank)
                                (interactive)
                                (scroll-up 1))))
 
-(defun auto-save-desktop ()
-    (interactive)
-    ;; Don't call desktop-save-in-desktop-dir, as it prints a message.
-    (if (eq (desktop-owner) (emacs-pid))
-        (desktop-save desktop-dirname)))
-(add-hook 'auto-save-hook 'auto-save-desktop)
-
-
-;;; This was installed by package-install.el.
-;;; This provides support for the package system and
-;;; interfacing with ELPA, the package archive.
-;;; Move this code earlier if you want to reference
-;;; packages in your .emacs.
-(when
-    (load
-     (expand-file-name "~/.emacs.d/elpa/package.el"))
-  (package-initialize))
-
-
-
-(autoload 'semantic-mode "semantic" nil t)
-(autoload 'company-mode "company" nil t)
-(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.
- )
-
-(push "~/.emacs.d/" load-path)
-(push "~/.emacs.d/icicles/" load-path)
-(require 'el-swank-fuzzy)
-(require 'icicles)
 cr="${$(print "_\r_")[2]}"
 crlf="$cr$lf"
 
-export uni=~/subjects/
-
 if [ -d ~/py-src ] ; then
-    export PYTHONPATH=~/py-src/
+    export PYTHONPATH="$PYTHONPATH:"$(echo ~/py-src/)
 fi
 
 if [[ -d /vol/ ]] ; then
     hash -d workbench="/vol/workbench"
 fi
+if [ -d ~/pyproj ] ; then
+    export PYTHONPATH="$PYTHONPATH:"$(echo ~/pyproj/*/)
+fi
 
+<<<<<<< variant A
+>>>>>>> variant B
 
+
+if [[ -d /var/www ]] ; then
+    hash -d www="/var/www"
+fi
+####### Ancestor
+if [[ -d /var/www ]] ; then
+    hash -d www="/var/www"
+fi
+if [[ -d /var/www/test ]] ; then
+    hash -d test="/var/www/test"
+fi
+======= end
+
+<<<<<<< variant A
 export PATH="$PATH:$HOME/minizinc-1.5.1/bin"
 export MANPATH="$MANPATH:$HOME/minizinc-1.5.1/doc/man"
+>>>>>>> variant B
+####### Ancestor
+if [[ -d /var/www/new ]] ; then
+    hash -d new="/var/www/new"
+fi
+======= end
 eterm-color_init(){
     xterm_init
 }
-rxvt-unicode_init(){
+rxvt_init(){
     xterm_init
 }
 
-"${${TERM-dumb}:l}_init"
+case "${${TERM-dumb}:l}" in
+    *rxvt*|*xterm*|eterm-color)
+        #TERM=xterm #fixes broken backspace w/ rxvt
+        xterm_init
+        ;;
+    *) dumb_init
+        ;;
+esac
 TIME=$(date '+%I:%M %p %A')
 DATE=$(date '+%Y-%m-%d')
 BATT=$(acpi | sed 's/,\s*rate information unavailable//')
-MSG=$(echo "$DATE\n\n$BATT")
 
+NET="$(nmcli -t -f NAME con status | sed 's|AUTO \(.*\)$|\1:|i') $(nmcli -t -f STATE nm)"
 
-notify-send $TIME $MSG
+MSG=$(echo "$DATE\n\n$NET\n\n$BATT")
+
+notify-send $TIME "$MSG"
 if (( $# > 0)); then
     Fs=${~@}
 fi
-if [ -z "$TTY" ] ; then
-    urxvt -e $0 $Fs&!
-    sleep 0.5
-fi
+#if [ -z "$TTY" ] ; then
+#    urxvt -e $0 $Fs&!
+#    sleep 0.5
+#fi
 echo $Fs;
 if [ $Fs ] ; then 
     {for f in ${Fs}; do
-	emacsclient -nw $f 2>&/dev/null &
+	emacsclient $f 2>&/dev/null &
 	done}
 else
-    emacsclient -nw &
+    emacsclient -c &
 fi
 
-wait
+wait