From c9fc6d9f7f42fdde59839814fa06d30f7147941c Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 20 Aug 2010 12:08:56 -0700 Subject: [PATCH 01/34] Going cmus -> mpd again --- .xmonad/xmonad.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index df707fc..ef7db2d 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -71,10 +71,10 @@ mKeys = [ ("M-S-n", sendMessage MirrorShrink ) -- Expand current window , ("M-S-g", warpToCentre >> goToSelected gsConfig ) -- Multimedia - , ("" , spawn "cmus-remote --pause" ) -- play/pause mpd - , ("" , spawn "cmus-remote --stop" ) -- stop mpd - , ("" , spawn "cmus-remote --prev" ) -- prev song - , ("" , spawn "cmus-remote --next" ) -- next song + , ("" , spawn "mpc toggle" ) -- play/pause mpd + , ("" , spawn "mpc stop" ) -- stop mpd + , ("" , spawn "mpc prev" ) -- prev song + , ("" , spawn "mpc next" ) -- next song , ("", spawn "amixer -q set PCM 1-") -- volume down , ("", spawn "amixer -q set PCM 1+") -- volume up , ("" , spawn "amixer -q set Headphone toggle") -- toggle mute From ff4cadcde74233f47ae31d12e948c48fcc25429e Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 28 Sep 2010 15:47:24 -0700 Subject: [PATCH 02/34] Various things that have collected up --- .emacs.hunner.el | 4 ++++ .vimrc | 2 +- .zshrc | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.emacs.hunner.el b/.emacs.hunner.el index cd7ffe0..e32a2cc 100644 --- a/.emacs.hunner.el +++ b/.emacs.hunner.el @@ -176,6 +176,10 @@ ("C-c s a" shellfm-add-to-playlist) ("C-c s q" shellfm 0) ("C-c s i" shellfm-track-info) + ("C-S-" shrink-window-horizontally) + ("C-S-" enlarge-window-horizontally) + ("C-S-" shrink-window) + ("C-S-" enlarge-window) ("M-s" save-buffer) ("M-n" global-linum-mode) ("M-N" make-frame) diff --git a/.vimrc b/.vimrc index afcbe76..b00de0e 100644 --- a/.vimrc +++ b/.vimrc @@ -977,7 +977,7 @@ au Filetype html,xml,xsl,sgml ",docbook " explorador vertical let g:explVertical=1 " define leader como = -let mapleader = "=" +"let mapleader = "=" " Terminal companability map diff --git a/.zshrc b/.zshrc index 3cfd7a5..79a2777 100644 --- a/.zshrc +++ b/.zshrc @@ -128,6 +128,7 @@ alias ll="l -Fl" alias la="l -Fa" alias lla="ll -Fa" alias c="cd" +cl() { cd $@ && ls } alias e="TERM=rxvt-256color; emacs -nw" alias et="TERM=rxvt-256color; emacsclient -t" alias ec="emacsclient -c --eval '(set-background-color \"black\")'" @@ -150,7 +151,7 @@ alias gpg-add="/usr/libexec/gpg-preset-passphrase" alias rsync="rsync -azPHe ssh" #-a equals -rlptgoD alias mang="cd ~/zips/mangband ; DISPLAY=\"\" ./mangclient" alias nh="export HISTFILE=/dev/null" -alias cl="co -l" +#alias cl="co -l" alias cu="ci -u" alias sl="screen -ls" alias sr="screen -r" From 8e6d3480fccf45a404020580cb1e24c8aceddac3 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Wed, 13 Oct 2010 11:21:24 -0700 Subject: [PATCH 03/34] Updating paths for puppet --- .zshrc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.zshrc b/.zshrc index 79a2777..250ca4d 100644 --- a/.zshrc +++ b/.zshrc @@ -23,11 +23,11 @@ esac #zsh's path export PATH=/usr/sbin:/usr/bin:/sbin:/bin export MANPATH=~/local/share/man:/usr/man:/usr/share/man -paths=(/cat/bin /cat/games/bin /opt/csw/sbin /opt/csw/bin -/pkgs/ghc/current/bin /pkgs/chromium/bin /usr/sfw/sbin /usr/sfw/bin -/opt/SUNWut/sbin /opt/SUNWut/bin /usr/ccs/bin /usr/local/bin /usr/openwin/bin -/usr/bin/X11 /usr/local/bin/X11 /usr/openwin/bin/xview /opt/java/bin -/opt/java5/bin /opt/java/jre/bin /opt/openoffice/program) +paths=(/opt/local/sbin /opt/local/bin /cat/bin /cat/games/bin /opt/csw/sbin +/opt/csw/bin /pkgs/ghc/current/bin /pkgs/chromium/bin /usr/sfw/sbin +/usr/sfw/bin /opt/SUNWut/sbin /opt/SUNWut/bin /usr/ccs/bin /usr/local/bin +/usr/openwin/bin /usr/bin/X11 /usr/local/bin/X11 /usr/openwin/bin/xview +/opt/java/bin /opt/java5/bin /opt/java/jre/bin /opt/openoffice/program) prepaths=(~/.cabal/bin ~/local/bin ~/local/sbin ~/local/share/bin) for dir in $paths ; do if [ -d $dir ] ; then From 3b5a270a2324d5be77422dccf46975b127ef5886 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Wed, 13 Oct 2010 11:23:13 -0700 Subject: [PATCH 04/34] Whitespace formatting --- .emacs.d/irblack.el | 6 ++++-- .emacs.hunner.el | 27 +++++++++++++++++++++------ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.emacs.d/irblack.el b/.emacs.d/irblack.el index f456190..950b1b3 100644 --- a/.emacs.d/irblack.el +++ b/.emacs.d/irblack.el @@ -22,8 +22,8 @@ (interactive) (color-theme-install '(color-theme-irblack - (;; (background-color . "black") - ;; (background-mode . dark) + ((background-color . "black") + (background-mode . dark) (border-color . "gray10") (cursor-color . "DarkOliveGreen2") (foreground-color . "#F6F3E8") @@ -67,6 +67,8 @@ (show-paren-mismatch ((t (:background "#FF1100")))) (underline ((nil (:underline nil)))) + ;; whitespace + (trailing-whitespace ((t (:background "gray22")))) ;; mumamo ;(mumamo-background-chunk-major ((t (:background "#000000")))) ;(mumamo-background-chunk-submode ((t (:background "#222222")))) diff --git a/.emacs.hunner.el b/.emacs.hunner.el index e32a2cc..5463a0f 100644 --- a/.emacs.hunner.el +++ b/.emacs.hunner.el @@ -32,6 +32,7 @@ (bar-cursor-mode 1) (menu-bar-mode 0) +(scroll-bar-mode -1) (tool-bar-mode 0) (setq linum-format "%3d ") (setq-default indent-tabs-mode nil) @@ -96,6 +97,7 @@ ;; Highlight bad whitespace (global-whitespace-mode t) (setq whitespace-style (quote (tabs tab-mark))) +(setq-default show-trailing-whitespace t) ;; Make % work like vi (global-set-key "%" 'match-paren) @@ -107,12 +109,12 @@ (t (self-insert-command (or arg 1))))) ;; Prevent Emacs from stupidly auto-changing my working directory -(defun find-file-save-default-directory () - (interactive) - (setq saved-default-directory default-directory) - (ido-find-file) - (setq default-directory saved-default-directory)) -(global-set-key "\C-x\C-f" 'find-file-save-default-directory) +;; (defun find-file-save-default-directory () +;; (interactive) +;; (setq saved-default-directory default-directory) +;; (ido-find-file) +;; (setq default-directory saved-default-directory)) +;; (global-set-key "\C-x\C-f" 'find-file-save-default-directory) ;; Give killing lines advice (defadvice kill-ring-save (before slick-copy activate compile) @@ -194,8 +196,21 @@ ("M-O" other-window) ("M-`" switch-to-next-frame) ("M-~" switch-to-previous-frame) + ("M-RET" ns-toggle-fullscreen) )) +;;toggle full-screen +(defun toggle-fullscreen () +(interactive) +(set-frame-parameter + nil + 'fullscreen + (if (frame-parameter nil 'fullscreen) + nil + 'fullboth))) + +(global-set-key [(meta return)] 'toggle-fullscreen) + ;; Transparency (set-frame-parameter (selected-frame) 'alpha '(85 85)) (add-to-list 'default-frame-alist '(alpha 85 85)) From b2659b6d84f8002a86afab9be7ac32857cc18faf Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 18 Oct 2010 09:47:04 -0700 Subject: [PATCH 05/34] Allow ssh-agent forward in screen/tmux --- .zshrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 250ca4d..5b064b2 100644 --- a/.zshrc +++ b/.zshrc @@ -110,6 +110,9 @@ else export VISUAL=vi export EDITOR=vi fi +if [ -n "$SSH_AUTH_SOCK" ] ; then + ln -fs $SSH_AUTH_SOCK $HOME/.ssh-agent +fi #xset fp+ /usr/APL2/fonts/X11 #xset fp rehash #if [ -d $HOME/.gems/gems ] ; then @@ -157,7 +160,7 @@ alias sl="screen -ls" alias sr="screen -r" alias sx="screen -x" alias srd="screen -rd" -alias t="SSH_AUTH_SOCK=$HOME/.tmux-ssh-agent TERM=xterm-256color tmux at" +alias t="SSH_AUTH_SOCK=$HOME/.ssh-agent TERM=xterm-256color tmux at" alias tl="tmux ls" alias bc="bc -q" alias fm="fmstatus.sh&;shell-fm" From 430a8dd7edb30dd0395b153bc32a568aa660ab39 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 19 Oct 2010 11:56:58 -0700 Subject: [PATCH 06/34] This is bad for macgem --- .zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 5b064b2..c156be6 100644 --- a/.zshrc +++ b/.zshrc @@ -62,8 +62,8 @@ fi # Setting vars #TERM=rxvt -export GEM_HOME="$HOME/.gems" -export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/1.8" +#export GEM_HOME="$HOME/.gems" +#export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/1.8" zshhosts=(serenity.cat.pdx.edu hunner@mint.cic.pdx.edu drkatz.cat.pdx.edu walt.ece.pdx.edu bunny.cat.pdx.edu spof.cat.pdx.edu fops.cat.pdx.edu narsil.cat.pdx.edu hunner@odin.pdx.edu hunnur@alcmaeonllc.com mir.cat.pdx.edu geppetto.cat.pdx.edu) HISTSIZE=1000 SAVEHIST=1000 From 596f5badff928bf80ba5d1733b2f15179137521f Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Sat, 23 Oct 2010 12:11:40 -0700 Subject: [PATCH 07/34] Adding erc/saveplace/shortcuts to emacs. +useful --- .emacs | 14 ++++++------ .emacs.hunner.el | 59 +++++++++++++++++++++++++++++++++++------------- 2 files changed, 50 insertions(+), 23 deletions(-) diff --git a/.emacs b/.emacs index 9b94895..6861bf1 100644 --- a/.emacs +++ b/.emacs @@ -1,15 +1,15 @@ (defconst dot-emacs (concat (getenv "HOME") "/" ".emacs.hunner.el") - "My dot emacs file") + "My dot emacs file") (require 'bytecomp) (setq compiled-dot-emacs (byte-compile-dest-file dot-emacs)) (if (or (not (file-exists-p compiled-dot-emacs)) - (file-newer-than-file-p dot-emacs compiled-dot-emacs) - (equal (nth 4 (file-attributes dot-emacs)) (list 0 0))) - (load dot-emacs) - (load compiled-dot-emacs)) + (file-newer-than-file-p dot-emacs compiled-dot-emacs) + (equal (nth 4 (file-attributes dot-emacs)) (list 0 0))) + (load dot-emacs) + (load compiled-dot-emacs)) (add-hook 'kill-emacs-hook - '(lambda () (and (file-newer-than-file-p dot-emacs compiled-dot-emacs) - (byte-compile-file dot-emacs)))) + '(lambda () (and (file-newer-than-file-p dot-emacs compiled-dot-emacs) + (byte-compile-file dot-emacs)))) diff --git a/.emacs.hunner.el b/.emacs.hunner.el index 5463a0f..cc5047c 100644 --- a/.emacs.hunner.el +++ b/.emacs.hunner.el @@ -1,6 +1,6 @@ -(require 'cl) +;; (require 'cl) -(mapcar (lambda (x) (add-to-list 'load-path (expand-file-name x))) +(mapc (lambda (x) (add-to-list 'load-path (expand-file-name x))) '("~/.emacs.d" )) @@ -8,10 +8,13 @@ (mapcar #'require packages)) (require-all '( + saveplace color-theme irblack parenface bar-cursor + tls + erc )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -30,6 +33,12 @@ ;(load-file "~/.emacs.d/color-theme-inkpot.el") ;(color-theme-inkpot) +;; OS X settings +;; (setq mac-option-key-is-meta nil) +;; (setq mac-command-key-is-meta t) +;; (setq mac-command-modifier 'meta) +;; (setq mac-option-modifier nil) + (bar-cursor-mode 1) (menu-bar-mode 0) (scroll-bar-mode -1) @@ -166,6 +175,7 @@ commands)) (set-keys '( ("C-c t" totd) + ("C-c n" global-linum-mode) ("C-c s p" (lambda () (interactive) (if (shellfm-running-p) (shellfm-pause) @@ -183,7 +193,8 @@ ("C-S-" shrink-window) ("C-S-" enlarge-window) ("M-s" save-buffer) - ("M-n" global-linum-mode) + ("M-p" ctrl-y-in-vi) + ("M-n" ctrl-e-in-vi) ("M-N" make-frame) ("M-W" delete-frame) ("M-w" ido-kill-buffer) @@ -200,16 +211,16 @@ )) ;;toggle full-screen -(defun toggle-fullscreen () -(interactive) -(set-frame-parameter - nil - 'fullscreen - (if (frame-parameter nil 'fullscreen) - nil - 'fullboth))) +;; (defun toggle-fullscreen () +;; (interactive) +;; (set-frame-parameter +;; nil +;; 'fullscreen +;; (if (frame-parameter nil 'fullscreen) +;; nil +;; 'fullboth))) -(global-set-key [(meta return)] 'toggle-fullscreen) +;; (global-set-key [(meta return)] 'toggle-fullscreen) ;; Transparency (set-frame-parameter (selected-frame) 'alpha '(85 85)) @@ -219,11 +230,20 @@ (interactive) (if (/= (cadr (find 'alpha (frame-parameters nil) :key #'car)) - 10) - (set-frame-parameter nil 'alpha '(10 10)) + 40) + (set-frame-parameter nil 'alpha '(40 40)) (set-frame-parameter nil 'alpha '(85 85)))) (global-set-key (kbd "C-c T") 'toggle-transparency) +;; Vim-like scrolling +(defun ctrl-e-in-vi (n) + (interactive "p") + (scroll-up n)) + +(defun ctrl-y-in-vi (n) + (interactive "p") + (scroll-down n)) + ;; (global-set-key (kbd "") ;; (lambda () (interactive) ;; (if (shellfm-running-p) @@ -232,8 +252,15 @@ ;; ERC stuff ;; (setq erc-encoding-coding-alist (quote (("#lisp" . utf-8) -;; ("#nihongo" . iso-2022-jp) ("#truelambda" . iso-latin-1) -;; ("#bitlbee" . iso-latin-1)))) +;; ("#nihongo" . iso-2022-jp) +;; ("#" . iso-latin-1) +;; ("#" . iso-latin-1)))) +(autoload 'erc "erc") +(add-hook 'erc-mode-hook + '(lambda () + (setq scroll-margin 0) + (setq erc-scrolltobottom-mode 1))) +(load "~/.emacs.d/erc-bip") ;; Passwords here ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Haskell mode From 2e4664e2481a7cf553f88afc2e728714895fe0ab Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 19 Nov 2010 11:13:23 -0800 Subject: [PATCH 08/34] Updated for color theme, and a bit of erc --- .emacs.d/irblack.el | 2 ++ .emacs.hunner.el | 35 +++++++++++++++++++++++++---------- .zshrc | 16 ++++++++++++++-- 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/.emacs.d/irblack.el b/.emacs.d/irblack.el index 950b1b3..38efe13 100644 --- a/.emacs.d/irblack.el +++ b/.emacs.d/irblack.el @@ -57,8 +57,10 @@ (font-lock-variable-name-face ((t (:foreground "steel blue")))) (font-lock-warning-face ((t (:background "#CC1503" :foreground "#FFFFFF")))) (gui-element ((t (:background "#D4D0C8" :foreground "black")))) + (fringe ((t (:background "grey10")))) (region ((t (:background "dark red")))) (mode-line ((t (:background "dim gray" :foreground "dark gray")))) + (mode-line-buffer-id ((t (:bold t :background "dim gray" : foreground "dark gray" :weight bold)))) (highlight ((t (:background "#111111")))) (highline-face ((t (:background "SeaGreen")))) (left-margin ((t (nil)))) diff --git a/.emacs.hunner.el b/.emacs.hunner.el index cc5047c..5622fca 100644 --- a/.emacs.hunner.el +++ b/.emacs.hunner.el @@ -21,9 +21,9 @@ ;; GLOBAL (color-theme-initialize) -(if window-system - (set-background-color "black") - ()) +;; (if window-system +;; (set-background-color "black") +;; ()) (color-theme-irblack) ;(if window-system ; (color-theme-gentooish) @@ -188,6 +188,7 @@ ("C-c s a" shellfm-add-to-playlist) ("C-c s q" shellfm 0) ("C-c s i" shellfm-track-info) + ("C-c e" ido-erc-buffer) ("C-S-" shrink-window-horizontally) ("C-S-" enlarge-window-horizontally) ("C-S-" shrink-window) @@ -261,6 +262,20 @@ (setq scroll-margin 0) (setq erc-scrolltobottom-mode 1))) (load "~/.emacs.d/erc-bip") ;; Passwords here +(defun ido-erc-buffer() + (interactive) + (switch-to-buffer + (ido-completing-read "Channel:" + (save-excursion + (delq + nil + (mapcar (lambda (buf) + (when (buffer-live-p buf) + (with-current-buffer buf + (and (eq major-mode 'erc-mode) + (buffer-name buf))))) + (buffer-list))))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Haskell mode @@ -328,6 +343,13 @@ '(scroll-step 1) '(scroll-up-aggressively 0.0) '(show-paren-mode t nil (paren))) +(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. + '(mumamo-border-face-in ((t nil))) + '(mumamo-border-face-out ((t nil)))) ;;; This was installed by package-install.el. @@ -340,10 +362,3 @@ (expand-file-name "~/.emacs.d/elpa/package.el")) (package-initialize) (require 'starter-kit-elpa)) -(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. - '(mumamo-border-face-in ((t nil))) - '(mumamo-border-face-out ((t nil)))) diff --git a/.zshrc b/.zshrc index c156be6..1bd1ff1 100644 --- a/.zshrc +++ b/.zshrc @@ -3,7 +3,7 @@ setopt appendhistory hist_ignore_space hist_ignore_all_dups extendedglob nomatch unsetopt beep bindkey -e zstyle :compinstall filename '~/.zshrc' -autoload -Uz compinit +autoload -Uz compinit colors && colors compinit -u #bindkey '^L' push-line bindkey "^I" expand-or-complete-prefix @@ -69,7 +69,15 @@ HISTSIZE=1000 SAVEHIST=1000 HISTFILE=~/.history export GPGKEY="48C7AF0C" -PS1="%m%# " +#C[0]="$reset_color" +#C[1]="$fg[red]" +C=(foo bar) +#PS1="%m%# " +return_red="%(?..$fg[red])" +git_unstaged_green="%($GIT..$fg[green])" +git_staged_yellow="%(?..$fg[yellow])" +PS1="%m$git_changed_green$git_staged_yellow$return_red%#%{$reset_color%} " +#PS1=${FACE[$[($?)?1:0]]} export LANG="en_US.UTF-8" #export LC_CTYPE="en_US.UTF-8" export LC_COLLATE="C" #order files in ls @@ -84,6 +92,10 @@ export MAILCHECK=0 #export AWT_TOOLKIT=MToolkit #export AWT_TOOLKIT=XToolkit export _JAVA_AWT_WM_NONREPARENTING=1 +if [ -x `which git` ] ; then + GIT_STATUS="git status" + GIT_STAGED="git status" +fi if [ -x `which less` ] ; then export PAGER==less else From 2fa4711997c68f4d08d4d0f8251e6f267602d6da Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 19 Nov 2010 11:14:32 -0800 Subject: [PATCH 09/34] Meant to do this with zsh. color --- .zshrc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.zshrc b/.zshrc index 1bd1ff1..45727c3 100644 --- a/.zshrc +++ b/.zshrc @@ -69,9 +69,10 @@ HISTSIZE=1000 SAVEHIST=1000 HISTFILE=~/.history export GPGKEY="48C7AF0C" -#C[0]="$reset_color" -#C[1]="$fg[red]" -C=(foo bar) +if [ -x `which git` ] ; then + GIT_STATUS="git status|grep 'Changed but not updated:' > /dev/null" + GIT_STAGED="git status|grep 'Changes to be committed:' > /dev/null" +fi #PS1="%m%# " return_red="%(?..$fg[red])" git_unstaged_green="%($GIT..$fg[green])" @@ -92,10 +93,6 @@ export MAILCHECK=0 #export AWT_TOOLKIT=MToolkit #export AWT_TOOLKIT=XToolkit export _JAVA_AWT_WM_NONREPARENTING=1 -if [ -x `which git` ] ; then - GIT_STATUS="git status" - GIT_STAGED="git status" -fi if [ -x `which less` ] ; then export PAGER==less else From ed791d3672ac1ba4c2d5a5ace03cf3471aa375a6 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Sat, 20 Nov 2010 10:00:28 -0800 Subject: [PATCH 10/34] Better buffer management --- .vimrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index b00de0e..4c01b49 100644 --- a/.vimrc +++ b/.vimrc @@ -513,8 +513,10 @@ endif " Go to buffers nmap :bprev nmap :bnext -nmap , :bp -nmap . :bn +nmap , :bprev +nmap . :bnext +nmap gT :bprev +nmap gt :bnext " v_K is really really annoying vmap K k From 9ee678eb8d99e86f7def0c9c549ae20e80bf5fa6 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Sat, 20 Nov 2010 10:00:56 -0800 Subject: [PATCH 11/34] Fix saveplace and set default font --- .emacs.hunner.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.emacs.hunner.el b/.emacs.hunner.el index 5622fca..3d90955 100644 --- a/.emacs.hunner.el +++ b/.emacs.hunner.el @@ -8,7 +8,6 @@ (mapcar #'require packages)) (require-all '( - saveplace color-theme irblack parenface @@ -90,8 +89,9 @@ ;; (setq url-proxy-services '(("no_proxy" . "localhost") ;; ("http" . "localhost:8118"))) -(setq-default save-place t) ;; activate it for all buffers (setq save-place-file "~/.emacs.d/saveplace") ;; keep my ~/ clean +(setq-default save-place t) ;; activate it for all buffers +(require 'saveplace) ;; Need to require after setq (setq backup-directory-alist `((".*" . "~/.emacs.d/backups/"))) @@ -226,6 +226,7 @@ ;; Transparency (set-frame-parameter (selected-frame) 'alpha '(85 85)) (add-to-list 'default-frame-alist '(alpha 85 85)) +(set-frame-font "Droid Sans Mono Dotted-12") (eval-when-compile (require 'cl)) (defun toggle-transparency () (interactive) From f6de79b9b92430597c625f367fb0d9798161900e Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Sat, 20 Nov 2010 22:12:35 -0800 Subject: [PATCH 12/34] Adding zgitinit functions --- .zsh/func/zgitinit | 246 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 .zsh/func/zgitinit diff --git a/.zsh/func/zgitinit b/.zsh/func/zgitinit new file mode 100644 index 0000000..3822836 --- /dev/null +++ b/.zsh/func/zgitinit @@ -0,0 +1,246 @@ +## +## Load with `autoload -U zgitinit; zgitinit' +## + +typeset -gA zgit_info +zgit_info=() + +zgit_chpwd_hook() { + zgit_info_update +} + +zgit_preexec_hook() { + if [[ $2 == git\ * ]] || [[ $2 == *\ git\ * ]]; then + zgit_precmd_do_update=1 + fi +} + +zgit_precmd_hook() { + if [ $zgit_precmd_do_update ]; then + unset zgit_precmd_do_update + zgit_info_update + fi +} + +zgit_info_update() { + zgit_info=() + + local gitdir="$(git rev-parse --git-dir 2>/dev/null)" + if [ $? -ne 0 ] || [ -z "$gitdir" ]; then + return + fi + + zgit_info[dir]=$gitdir + zgit_info[bare]=$(git rev-parse --is-bare-repository) + zgit_info[inwork]=$(git rev-parse --is-inside-work-tree) +} + +zgit_isgit() { + if [ -z "$zgit_info[dir]" ]; then + return 1 + else + return 0 + fi +} + +zgit_inworktree() { + zgit_isgit || return + if [ "$zgit_info[inwork]" = "true" ]; then + return 0 + else + return 1 + fi +} + +zgit_isbare() { + zgit_isgit || return + if [ "$zgit_info[bare]" = "true" ]; then + return 0 + else + return 1 + fi +} + +zgit_head() { + zgit_isgit || return 1 + + if [ -z "$zgit_info[head]" ]; then + local name='' + name=$(git symbolic-ref -q HEAD) + if [ $? -eq 0 ]; then + if [[ $name == refs/(heads|tags)/* ]]; then + name=${name#refs/(heads|tags)/} + fi + else + name=$(git name-rev --name-only --no-undefined --always HEAD) + if [ $? -ne 0 ]; then + return 1 + elif [[ $name == remotes/* ]]; then + name=${name#remotes/} + fi + fi + zgit_info[head]=$name + fi + + echo $zgit_info[head] +} + +zgit_branch() { + zgit_isgit || return 1 + zgit_isbare && return 1 + + if [ -z "$zgit_info[branch]" ]; then + local branch=$(git symbolic-ref HEAD 2>/dev/null) + if [ $? -eq 0 ]; then + branch=${branch##*/} + else + branch=$(git name-rev --name-only --always HEAD) + fi + zgit_info[branch]=$branch + fi + + echo $zgit_info[branch] + return 0 +} + +zgit_tracking_remote() { + zgit_isgit || return 1 + zgit_isbare && return 1 + + local branch + if [ -n "$1" ]; then + branch=$1 + elif [ -z "$zgit_info[branch]" ]; then + branch=$(zgit_branch) + [ $? -ne 0 ] && return 1 + else + branch=$zgit_info[branch] + fi + + local k="tracking_$branch" + local remote + if [ -z "$zgit_info[$k]" ]; then + remote=$(git config branch.$branch.remote) + zgit_info[$k]=$remote + fi + + echo $zgit_info[$k] + return 0 +} + +zgit_tracking_merge() { + zgit_isgit || return 1 + zgit_isbare && return 1 + + local branch + if [ -z "$zgit_info[branch]" ]; then + branch=$(zgit_branch) + [ $? -ne 0 ] && return 1 + else + branch=$zgit_info[branch] + fi + + local remote=$(zgit_tracking_remote $branch) + [ $? -ne 0 ] && return 1 + if [ -n "$remote" ]; then # tracking branch + local merge=$(git config branch.$branch.merge) + if [ $remote != "." ]; then + merge=$remote/$(basename $merge) + fi + echo $merge + return 0 + else + return 1 + fi +} + +zgit_isindexclean() { + zgit_isgit || return 1 + if git diff --quiet --cached 2>/dev/null; then + return 0 + else + return 1 + fi +} + +zgit_isworktreeclean() { + zgit_isgit || return 1 + if git diff --quiet 2>/dev/null; then + return 0 + else + return 1 + fi +} + +zgit_hasuntracked() { + zgit_isgit || return 1 + local -a flist + flist=($(git ls-files --others --exclude-standard)) + if [ $#flist -gt 0 ]; then + return 0 + else + return 1 + fi +} + +zgit_hasunmerged() { + zgit_isgit || return 1 + local -a flist + flist=($(git ls-files -u)) + if [ $#flist -gt 0 ]; then + return 0 + else + return 1 + fi +} + +zgit_svnhead() { + zgit_isgit || return 1 + + local commit=$1 + if [ -z "$commit" ]; then + commit='HEAD' + fi + + git show --raw $commit | \ + grep git-svn-id | \ + sed -re 's/^\s*git-svn-id: .*@([0-9]+).*$/\1/' +} + +zgit_rebaseinfo() { + zgit_isgit || return 1 + if [ -d $zgit_info[dir]/rebase-merge ]; then + dotest=$zgit_info[dir]/rebase-merge + elif [ -d $zgit_info[dir]/.dotest-merge ]; then + dotest=$zgit_info[dir]/.dotest-merge + elif [ -d .dotest ]; then + dotest=.dotest + else + return 1 + fi + + zgit_info[dotest]=$dotest + + zgit_info[rb_onto]=$(cat "$dotest/onto") + if [ -f "$dotest/upstream" ]; then + zgit_info[rb_upstream]=$(cat "$dotest/upstream") + else + zgit_info[rb_upstream]= + fi + if [ -f "$dotest/orig-head" ]; then + zgit_info[rb_head]=$(cat "$dotest/orig-head") + elif [ -f "$dotest/head" ]; then + zgit_info[rb_head]=$(cat "$dotest/head") + fi + zgit_info[rb_head_name]=$(cat "$dotest/head-name") + + return 0 +} + +chpwd_functions+=zgit_chpwd_hook +preexec_functions+=zgit_preexec_hook +precmd_functions+=zgit_precmd_hook + +zgit_info_update + +# vim:set ft=zsh: From 74b45c95203ed903ea78fd801f5fa5efbb5f129f Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Sat, 20 Nov 2010 22:13:57 -0800 Subject: [PATCH 13/34] zsh prompt uses color for git status --- .zshrc | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.zshrc b/.zshrc index 45727c3..4fdfee3 100644 --- a/.zshrc +++ b/.zshrc @@ -1,9 +1,16 @@ +typeset -ga preexec_functions +typeset -ga precmd_functions +typeset -ga chpwd_functions +fpath=($fpath $HOME/.zsh/func) +typeset -u fpath + # Options setopt appendhistory hist_ignore_space hist_ignore_all_dups extendedglob nomatch notify dvorak # correct unsetopt beep bindkey -e + zstyle :compinstall filename '~/.zshrc' -autoload -Uz compinit colors && colors +autoload -Uz compinit colors zgitinit && colors && zgitinit compinit -u #bindkey '^L' push-line bindkey "^I" expand-or-complete-prefix @@ -69,16 +76,22 @@ HISTSIZE=1000 SAVEHIST=1000 HISTFILE=~/.history export GPGKEY="48C7AF0C" -if [ -x `which git` ] ; then - GIT_STATUS="git status|grep 'Changed but not updated:' > /dev/null" - GIT_STAGED="git status|grep 'Changes to be committed:' > /dev/null" -fi + +# Prompt #PS1="%m%# " -return_red="%(?..$fg[red])" -git_unstaged_green="%($GIT..$fg[green])" -git_staged_yellow="%(?..$fg[yellow])" -PS1="%m$git_changed_green$git_staged_yellow$return_red%#%{$reset_color%} " -#PS1=${FACE[$[($?)?1:0]]} +prompt_precmd() { + if ! zgit_isindexclean ; then + #PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f](%F{cyan}$(zgit_branch)%f)>" + gitcolor=$fg[blue] + elif ! zgit_isworktreeclean ; then + #PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f]>" + gitcolor=$fg[green] + fi + color="%(?.$gitcolor.$fg[red])" + PROMPT="%m$color%#%{$reset_color%} " +} +precmd_functions+=prompt_precmd + export LANG="en_US.UTF-8" #export LC_CTYPE="en_US.UTF-8" export LC_COLLATE="C" #order files in ls From f40f1108baf52cd107d1bf023347074c0a1edf3d Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Sat, 20 Nov 2010 22:18:49 -0800 Subject: [PATCH 14/34] trying out * again for ignoring --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index eae99f4..02a18e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .emacs.d/auto-save-list/* .emacs.d/history +* From bb5204b76d466e70cca89f9f8d660c3e5bbbbb56 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Sat, 20 Nov 2010 22:20:02 -0800 Subject: [PATCH 15/34] need to reset color sometime --- .zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.zshrc b/.zshrc index 4fdfee3..b8f2db3 100644 --- a/.zshrc +++ b/.zshrc @@ -80,6 +80,7 @@ export GPGKEY="48C7AF0C" # Prompt #PS1="%m%# " prompt_precmd() { + gitcolor="" if ! zgit_isindexclean ; then #PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f](%F{cyan}$(zgit_branch)%f)>" gitcolor=$fg[blue] From 179df718cacf053c79b6173e7722849be790cab6 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 30 Nov 2010 10:51:56 -0800 Subject: [PATCH 16/34] fixing git colors outside of git --- .zshrc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.zshrc b/.zshrc index b8f2db3..defdc0b 100644 --- a/.zshrc +++ b/.zshrc @@ -81,12 +81,14 @@ export GPGKEY="48C7AF0C" #PS1="%m%# " prompt_precmd() { gitcolor="" - if ! zgit_isindexclean ; then - #PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f](%F{cyan}$(zgit_branch)%f)>" - gitcolor=$fg[blue] - elif ! zgit_isworktreeclean ; then - #PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f]>" - gitcolor=$fg[green] + if zgit_isgit ; then + if ! zgit_isindexclean ; then + #PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f](%F{cyan}$(zgit_branch)%f)>" + gitcolor=$fg[blue] + elif ! zgit_isworktreeclean ; then + #PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f]>" + gitcolor=$fg[green] + fi fi color="%(?.$gitcolor.$fg[red])" PROMPT="%m$color%#%{$reset_color%} " From 1265916fb9fc62513121fa3b2f0ff0f7920986f6 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Thu, 2 Dec 2010 14:58:13 -0800 Subject: [PATCH 17/34] This messes up on older zsh --- .zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index defdc0b..9a7e6a5 100644 --- a/.zshrc +++ b/.zshrc @@ -2,7 +2,7 @@ typeset -ga preexec_functions typeset -ga precmd_functions typeset -ga chpwd_functions fpath=($fpath $HOME/.zsh/func) -typeset -u fpath +#typeset -u fpath # Options setopt appendhistory hist_ignore_space hist_ignore_all_dups extendedglob nomatch notify dvorak # correct From 11efab0bde9b8fcb76470214688831b6fd0216b7 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Thu, 2 Dec 2010 15:39:54 -0800 Subject: [PATCH 18/34] No more nice gems --- .zshrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.zshrc b/.zshrc index 9a7e6a5..5712dda 100644 --- a/.zshrc +++ b/.zshrc @@ -194,7 +194,6 @@ alias d="dtach -a /tmp/dtach" alias eo="xmodmap ~/keymaps/eo_dv_hunner.pke" alias vt="export TERM=vt220" alias rm=rm; unalias rm #hack -alias gem="nice -n19 gem" alias uzbl="uzbl-browser" #startup aliases alias -s pdf="zathura" From dc5a47cd8106a613bfa96098c01973b118bc225b Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 3 Dec 2010 13:41:58 -0800 Subject: [PATCH 19/34] Adding ragel syntax for vim --- .vim/filetype.vim | 1 + .vim/syntax/ragel.vim | 149 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 .vim/syntax/ragel.vim diff --git a/.vim/filetype.vim b/.vim/filetype.vim index 37f11f3..ac7ba80 100644 --- a/.vim/filetype.vim +++ b/.vim/filetype.vim @@ -10,6 +10,7 @@ augroup filetypedetect "au! BufNewFile,BufRead *.rhtml setfiletype rhtml au! BufNewFile,BufRead *.rhtml setfiletype eruby au! BufNewFile,BufRead *.s setfiletype asmx86 + au! BufNewFile,BufRead *.rl setfiletype ragel au! BufRead,BufNewFile *.ijs,*.ijt,*.ijp,*.ijx setfiletype j augroup END diff --git a/.vim/syntax/ragel.vim b/.vim/syntax/ragel.vim new file mode 100644 index 0000000..fa77e43 --- /dev/null +++ b/.vim/syntax/ragel.vim @@ -0,0 +1,149 @@ +" Vim syntax file +" +" Language: Ragel +" Author: Adrian Thurston + +syntax clear + +" +" Outside code +" + +" Comments +syntax region ocComment start="\/\*" end="\*\/" +syntax match ocComment "\/\/.*$" + +" Anything preprocessor +syntax match ocPreproc "#\(.\|\\\n\)*$" +syntax region ocPreproc start="#" end="[^\\]$" + +" Strings +syntax match ocLiteral "'\(\\.\|[^'\\]\)*'" +syntax match ocLiteral "\"\(\\.\|[^\"\\]\)*\"" + +" C/C++ Keywords +syntax keyword ocType unsigned signed void char short int long float double bool +syntax keyword ocType inline static extern register const volatile auto +syntax keyword ocType union enum struct class typedef +syntax keyword ocType namespace template typename mutable +syntax keyword ocKeyword break continue default do else for +syntax keyword ocKeyword goto if return switch while +syntax keyword ocKeyword new delete this using friend public private protected sizeof +syntax keyword ocKeyword throw try catch operator typeid +syntax keyword ocKeyword and bitor xor compl bitand and_eq or_eq xor_eq not not_eq +syntax keyword ocKeyword static_cast dynamic_cast + +" Numbers +syntax match ocNumber "[0-9][0-9]*" +syntax match ocNumber "0x[0-9a-fA-F][0-9a-fA-F]*" + +" Booleans +syntax keyword ocBoolean true false + +" Identifiers +syntax match anyId "[a-zA-Z_][a-zA-Z_0-9]*" + +" Inline code only +syntax keyword fsmType fpc fc fcurs fbuf fblen ftargs fstack +syntax keyword fsmKeyword fhold fgoto fcall fret fentry fnext fexec fbreak + +syntax cluster rlItems contains=rlComment,rlLiteral,rlAugmentOps,rlOtherOps,rlKeywords,rlWrite,rlCodeCurly,rlCodeSemi,rlNumber,anyId,rlLabelColon,rlExprKeywords + +syntax region machineSpec1 matchgroup=beginRL start="%%{" end="}%%" contains=@rlItems +syntax region machineSpec2 matchgroup=beginRL start="%%[^{]"rs=e-1 end="$" keepend contains=@rlItems +syntax region machineSpec2 matchgroup=beginRL start="%%$" end="$" keepend contains=@rlItems + +" Comments +syntax match rlComment "#.*$" contained + +" Literals +syntax match rlLiteral "'\(\\.\|[^'\\]\)*'[i]*" contained +syntax match rlLiteral "\"\(\\.\|[^\"\\]\)*\"[i]*" contained +syntax match rlLiteral /\/\(\\.\|[^\/\\]\)*\/[i]*/ contained +syntax match rlLiteral "\[\(\\.\|[^\]\\]\)*\]" contained + +" Numbers +syntax match rlNumber "[0-9][0-9]*" contained +syntax match rlNumber "0x[0-9a-fA-F][0-9a-fA-F]*" contained + +" Operators +syntax match rlAugmentOps "[>$%@]" contained +syntax match rlAugmentOps "<>\|<" contained +syntax match rlAugmentOps "[>\<$%@][!\^/*~]" contained +syntax match rlAugmentOps "[>$%]?" contained +syntax match rlAugmentOps "<>[!\^/*~]" contained +syntax match rlAugmentOps "=>" contained +syntax match rlOtherOps "->" contained + +syntax match rlOtherOps ":>" contained +syntax match rlOtherOps ":>>" contained +syntax match rlOtherOps "<:" contained + +" Keywords +" FIXME: Enable the range keyword post 5.17. +" syntax keyword rlKeywords machine action context include range contained +syntax keyword rlKeywords machine action context include import export prepush postpop contained +syntax keyword rlExprKeywords when inwhen outwhen err lerr eof from to contained + +" Case Labels +syntax keyword caseLabelKeyword case contained +syntax cluster caseLabelItems contains=ocComment,ocPreproc,ocLiteral,ocType,ocKeyword,caseLabelKeyword,ocNumber,ocBoolean,anyId,fsmType,fsmKeyword +syntax match caseLabelColon "case" contains=@caseLabelItems +syntax match caseLabelColon "case[\t ]\+.*:$" contains=@caseLabelItems +syntax match caseLabelColon "case[\t ]\+.*:[^=:]"me=e-1 contains=@caseLabelItems + +" Labels +syntax match ocLabelColon "^[\t ]*[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:$" contains=anyLabel +syntax match ocLabelColon "^[\t ]*[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:[^=:]"me=e-1 contains=anyLabel + +syntax match rlLabelColon "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:$" contained contains=anyLabel +syntax match rlLabelColon "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:[^=:>]"me=e-1 contained contains=anyLabel +syntax match anyLabel "[a-zA-Z_][a-zA-Z_0-9]*" contained + +" All items that can go in a code block. + +syntax cluster inlineItems contains=rlCodeCurly,ocComment,ocPreproc,ocLiteral,ocType,ocKeyword,ocNumber,ocBoolean,ocLabelColon,anyId,fsmType,fsmKeyword,caseLabelColon + +" Blocks of code. rlCodeCurly is recursive. +syntax region rlCodeCurly matchgroup=NONE start="{" end="}" contained contains=@inlineItems +syntax region rlCodeSemi matchgroup=Type start="\" start="\" start="\" start="\" matchgroup=NONE end=";" contained contains=@inlineItems + +syntax region rlWrite matchgroup=Type start="\" matchgroup=NONE end="[;)]" contained contains=rlWriteKeywords,rlWriteOptions + +syntax keyword rlWriteKeywords init data exec exports start error first_final contained +syntax keyword rlWriteOptions noerror nofinal noprefix noend nocs contained + +" +" Sync at the start of machine specs. +" +" Match The ragel delimiters only if there quotes no ahead on the same line. +" On the open marker, use & to consume the leader. +syntax sync match ragelSyncPat grouphere NONE "^[^\'\"%]*%%{&^[^\'\"%]*" +syntax sync match ragelSyncPat grouphere NONE "^[^\'\"%]*%%[^{]&^[^\'\"%]*" +syntax sync match ragelSyncPat grouphere NONE "^[^\'\"]*}%%" + +" +" Specifying Groups +" +hi link ocComment Comment +hi link ocPreproc Macro +hi link ocLiteral String +hi link ocType Type +hi link ocKeyword Keyword +hi link ocNumber Number +hi link ocBoolean Boolean +hi link rlComment Comment +hi link rlNumber Number +hi link rlLiteral String +hi link rlAugmentOps Keyword +hi link rlExprKeywords Keyword +hi link rlWriteKeywords Keyword +hi link rlWriteOptions Keyword +hi link rlKeywords Type +hi link fsmType Type +hi link fsmKeyword Keyword +hi link anyLabel Label +hi link caseLabelKeyword Keyword +hi link beginRL Type + +let b:current_syntax = "ragel" From d0f11e7118022f385859bef37a985e1cce3417fb Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 6 Dec 2010 11:11:36 -0800 Subject: [PATCH 20/34] Moving /usr/local up in $PATH for macports --- .zshrc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.zshrc b/.zshrc index 5712dda..904f182 100644 --- a/.zshrc +++ b/.zshrc @@ -30,12 +30,13 @@ esac #zsh's path export PATH=/usr/sbin:/usr/bin:/sbin:/bin export MANPATH=~/local/share/man:/usr/man:/usr/share/man -paths=(/opt/local/sbin /opt/local/bin /cat/bin /cat/games/bin /opt/csw/sbin -/opt/csw/bin /pkgs/ghc/current/bin /pkgs/chromium/bin /usr/sfw/sbin -/usr/sfw/bin /opt/SUNWut/sbin /opt/SUNWut/bin /usr/ccs/bin /usr/local/bin -/usr/openwin/bin /usr/bin/X11 /usr/local/bin/X11 /usr/openwin/bin/xview -/opt/java/bin /opt/java5/bin /opt/java/jre/bin /opt/openoffice/program) -prepaths=(~/.cabal/bin ~/local/bin ~/local/sbin ~/local/share/bin) +paths=(/cat/bin /cat/games/bin /opt/csw/sbin /opt/csw/bin /pkgs/ghc/current/bin +/pkgs/chromium/bin /usr/sfw/sbin /usr/sfw/bin /opt/SUNWut/sbin /opt/SUNWut/bin +/usr/ccs/bin /usr/local/bin /usr/openwin/bin /usr/bin/X11 /usr/local/bin/X11 +/usr/openwin/bin/xview /opt/java/bin /opt/java5/bin /opt/java/jre/bin +/opt/openoffice/program) +prepaths=(/opt/local/sbin /opt/local/bin ~/.cabal/bin ~/local/bin ~/local/sbin +~/local/share/bin) for dir in $paths ; do if [ -d $dir ] ; then export PATH=$PATH:$dir From 70d8b84350280f3849d392638df677c4e07a5987 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 6 Dec 2010 16:19:38 -0800 Subject: [PATCH 21/34] Adding Vagrantfile as ruby syntax --- .vim/filetype.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/.vim/filetype.vim b/.vim/filetype.vim index ac7ba80..ba988e8 100644 --- a/.vim/filetype.vim +++ b/.vim/filetype.vim @@ -8,6 +8,7 @@ augroup filetypedetect "au! BufNewFile,BufRead *.rhtml set syn=eruby "au! BufNewFile,BufRead *.haml setfiletype haml "au! BufNewFile,BufRead *.rhtml setfiletype rhtml + au! BufNewFile,BufRead Vagrantfile setfiletype ruby au! BufNewFile,BufRead *.rhtml setfiletype eruby au! BufNewFile,BufRead *.s setfiletype asmx86 au! BufNewFile,BufRead *.rl setfiletype ragel From c6137a555b90b4f0f4412f35e5a8eeff6195b8c7 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 10 Dec 2010 20:18:17 -0800 Subject: [PATCH 22/34] Revert back to normal font --- .emacs.hunner.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.emacs.hunner.el b/.emacs.hunner.el index 3d90955..a8b3a3c 100644 --- a/.emacs.hunner.el +++ b/.emacs.hunner.el @@ -226,7 +226,7 @@ ;; Transparency (set-frame-parameter (selected-frame) 'alpha '(85 85)) (add-to-list 'default-frame-alist '(alpha 85 85)) -(set-frame-font "Droid Sans Mono Dotted-12") +;; (set-frame-font "Droid Sans Mono Dotted-12") (eval-when-compile (require 'cl)) (defun toggle-transparency () (interactive) From 8b71f7a7006ca0bc4c62e6ddc8c5571924068a1f Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 13 Dec 2010 10:50:13 -0800 Subject: [PATCH 23/34] Use 2 spaces tabs in puppet --- .vimrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.vimrc b/.vimrc index 4c01b49..4c79b03 100644 --- a/.vimrc +++ b/.vimrc @@ -305,6 +305,10 @@ endif " content creation if has("autocmd") + augroup puppet + autocmd BufRead,BufNewFile *.pp + \ set tabstop=2 shiftwidth=2 softtabstop=2 + augroup END augroup text autocmd BufRead,BufNewFile *.txt \ set nonumber tw=80 From 8a666c127b2be13a04ff4068a6953fbec9da6c96 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Thu, 16 Dec 2010 19:38:27 -0800 Subject: [PATCH 24/34] Adding color for git status. nibz++ --- .gitconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitconfig b/.gitconfig index d4f0b1d..fdb3a13 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,3 +1,5 @@ [user] name = Hunter Haugen email = h.haugen@gmail.com +[color] + ui = true From 678cd48786d212b42a918dd38e8581393f27ae77 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 21 Dec 2010 13:56:59 -0800 Subject: [PATCH 25/34] muttrc now dynamic? --- .muttrc | 19 ++----------------- .muttrc.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 17 deletions(-) create mode 100755 .muttrc.sh diff --git a/.muttrc b/.muttrc index 8a9825a..2b6d0e8 100644 --- a/.muttrc +++ b/.muttrc @@ -1,20 +1,5 @@ -# Gmail stuff -#set imap_user="hunter.haugen@gmail.com" -set imap_user="hunner" -#set imap_pass="password" - -#set smtp_url="smtp://hunter.haugen@smtp.gmail.com:587/" -set smtp_url="smtp://mailhost.cecs.pdx.edu:587/" -#set ssl_min_dh_prime_bits=512 -#set smtp_pass="password" -set from="hunner@cat.pdx.edu" -set realname="Hunter Haugen" - -#set folder="imaps://imap.gmail.com:993" -set folder="imaps://mailhost.cecs.pdx.edu:993" -set spoolfile="+INBOX" -#set postponed="+[Gmail]/Drafts" -#set record="+[Gmail]/Sent Mail" +# Accound information +source '~/.muttrc.sh|' # Cache message headers for quick retrieval set header_cache=~/.mutt/cache/headers diff --git a/.muttrc.sh b/.muttrc.sh new file mode 100755 index 0000000..85772d5 --- /dev/null +++ b/.muttrc.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +if [ x$HOST = xcz ] ; then + echo 'set imap_user="hunter@puppetlabs.com"' + #set imap_pass="password" + + #set smtp_url="smtp://hunter.haugen@smtp.gmail.com:587/" + + echo 'set folder="imaps://imap.gmail.com:993"' + echo 'set spoolfile="+INBOX"' + #set postponed="+[Gmail]/Drafts" + #set record="+[Gmail]/Sent Mail" +else + # IMAP + echo 'set imap_user="hunner"' + #set imap_pass="password" + + # SMTP + echo 'set smtp_url="smtp://mailhost.cecs.pdx.edu:587/"' + #set ssl_min_dh_prime_bits=512 + #set smtp_pass="password" + echo 'set from="hunner@cat.pdx.edu"' + echo 'set realname="Hunter Haugen"' + + # Folders + echo 'set folder="imaps://mailhost.cecs.pdx.edu:993"' + echo 'set spoolfile="+INBOX"' +fi From cc5f223ddd92814e647bf19444e29afcc7ab3b03 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 3 Jan 2011 15:33:59 -0800 Subject: [PATCH 26/34] disabling color for now --- .zshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 904f182..0dfbdd5 100644 --- a/.zshrc +++ b/.zshrc @@ -64,6 +64,9 @@ fi if [ -d ~/.gems/bin ] ; then export PATH="$HOME/.gems/bin:$PATH" fi +for dir in `find ~/.gem/ruby/*/bin|grep /bin$` ; do + export PATH=$PATH:$dir +done #for dir in `find /opt/*/bin|grep /bin$` `find /opt/csw/*/bin|grep /bin$` ; do # export PATH=$PATH:$dir #done @@ -94,7 +97,8 @@ prompt_precmd() { color="%(?.$gitcolor.$fg[red])" PROMPT="%m$color%#%{$reset_color%} " } -precmd_functions+=prompt_precmd +#precmd_functions+=prompt_precmd +PROMPT="%m%# " export LANG="en_US.UTF-8" #export LC_CTYPE="en_US.UTF-8" From 92cb087dc75cdfcc6097eb43af0794cd03e7054c Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 4 Jan 2011 10:28:21 -0800 Subject: [PATCH 27/34] More like this --- .zshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.zshrc b/.zshrc index 0dfbdd5..86f7af6 100644 --- a/.zshrc +++ b/.zshrc @@ -64,9 +64,9 @@ fi if [ -d ~/.gems/bin ] ; then export PATH="$HOME/.gems/bin:$PATH" fi -for dir in `find ~/.gem/ruby/*/bin|grep /bin$` ; do - export PATH=$PATH:$dir -done +if [ -d ~/.gem/ruby/1.8/bin ] ; then + export PATH="$PATH:$HOME/.gem/ruby/1.8/bin" +fi #for dir in `find /opt/*/bin|grep /bin$` `find /opt/csw/*/bin|grep /bin$` ; do # export PATH=$PATH:$dir #done From a37cc1aaca854525572f8214aa20395740b6a5fc Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 8 Feb 2011 10:33:40 -0800 Subject: [PATCH 28/34] Updating puppet vim syntax --- .vim/syntax/puppet.vim | 99 +++++++++++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 35 deletions(-) diff --git a/.vim/syntax/puppet.vim b/.vim/syntax/puppet.vim index 7764278..9605210 100644 --- a/.vim/syntax/puppet.vim +++ b/.vim/syntax/puppet.vim @@ -1,10 +1,10 @@ " puppet syntax file " Filename: puppet.vim -" Language: puppet configuration file +" Language: puppet configuration file " Maintainer: Luke Kanies -" URL: -" Last Change: -" Version: +" URL: +" Last Change: +" Version: " " Copied from the cfengine, ruby, and perl syntax files @@ -16,37 +16,66 @@ elseif exists("b:current_syntax") finish endif -syn region puppetDefine start="^\s*\(class\|define\|site\|node\)" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments -syn keyword puppetDefType class define site node inherits contained -syn keyword puppetInherits inherits contained -syn region puppetDefArguments start="(" end=")" contains=puppetArgument +" match class/definition/node declarations +syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments,puppetNodeRe +syn keyword puppetDefType class define node inherits contained +syn region puppetDefArguments start="(" end=")" contained contains=puppetArgument,puppetString syn match puppetArgument "\w\+" contained -syn match puppetDefName "\w\+" contained +syn match puppetArgument "\$\w\+" contained +syn match puppetArgument "'[^']+'" contained +syn match puppetArgument '"[^"]+"' contained +syn match puppetDefName "\w\+" contained +syn match puppetNodeRe "/.*/" contained -syn match puppetInstance "\w\+\s*{" contains=puppetTypeBrace,puppetTypeName,puppetTypeDefault -syn match puppetTypeBrace "{" contained -syn match puppetTypeName "[a-z]\w*" contained -syn match puppetTypeDefault "[A-Z]\w*" contained +" match 'foo' in 'class foo { ...' +" match 'foo::bar' in 'class foo::bar { ...' +" match 'Foo::Bar' in 'Foo::Bar["..."] +"FIXME: "Foo-bar" doesn't get highlighted as expected, although "foo-bar" does. +syn match puppetInstance "[A-Za-z0-9_-]\+\(::[A-Za-z0-9_-]\+\)*\s*{" contains=puppetTypeName,puppetTypeDefault +syn match puppetInstance "[A-Z][a-z_-]\+\(::[A-Z][a-z_-]\+\)*\s*[[{]" contains=puppetTypeName,puppetTypeDefault +syn match puppetInstance "[A-Z][a-z_-]\+\(::[A-Z][a-z_-]\+\)*\s*<\?<|" contains=puppetTypeName,puppetTypeDefault +syn match puppetTypeName "[a-z]\w*" contained +syn match puppetTypeDefault "[A-Z]\w*" contained -syn match puppetParam "\w\+\s*=>" contains=puppetTypeRArrow,puppetParamName -syn match puppetParamRArrow "=>" contained -syn match puppetParamName "\w\+" contained -syn match puppetVariable "$\w\+" -syn match puppetVariable "${\w\+}" -syn match puppetParen "(" -syn match puppetParen ")" -syn match puppetBrace "{" -syn match puppetBrace "}" +" match 'foo' in 'foo => "bar"' +syn match puppetParam "\w\+\s*[=+]>" contains=puppetParamName +syn match puppetParamName "\w\+" contained -syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable +" match 'present' in 'ensure => present' +" match '2755' in 'mode => 2755' +" don't match 'bar' in 'foo => bar' +syn match puppetParam "\w\+\s*[=+]>\s*[a-z0-9]\+" contains=puppetParamString,puppetParamName +syn match puppetParamString "[=+]>\s*\w\+" contains=puppetParamKeyword,puppetParamSpecial,puppetParamDigits contained +syn keyword puppetParamKeyword present absent purged latest installed running stopped mounted unmounted role configured file directory link contained +syn keyword puppetParamSpecial true false undef contained +syn match puppetParamDigits "[0-9]\+" -syn keyword puppetBoolean true false -syn keyword puppetKeyword import inherits include -syn keyword puppetControl case default +" match 'template' in 'content => template("...")' +syn match puppetParam "\w\+\s*[=+]>\s*\w\+\s*(" contains=puppetFunction,puppetParamName +" statements +syn region puppetFunction start="^\s*\(alert\|crit\|debug\|emerg\|err\|fail\|include\|info\|notice\|realize\|require\|search\|tag\|warning\)\s*(" end=")" contained contains=puppetString +" rvalues +syn region puppetFunction start="^\s*\(defined\|file\|fqdn_rand\|generate\|inline_template\|regsubst\|sha1\|shellquote\|split\|sprintf\|tagged\|template\|versioncmp\)\s*(" end=")" contained contains=puppetString + +syn match puppetVariable "$[a-zA-Z0-9_:]\+" +syn match puppetVariable "${[a-zA-Z0-9_:]\+}" + +" match anything between simple/double quotes. +" don't match variables if preceded by a backslash. +syn region puppetString start=+'+ skip=+\\\\\|\\'+ end=+'+ +syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable,puppetNotVariable +syn match puppetString "/[^/]*/" +syn match puppetNotVariable "\\$\w\+" contained +syn match puppetNotVariable "\\${\w\+}" contained + +syn keyword puppetKeyword import inherits include +syn keyword puppetControl case default if else elsif +syn keyword puppetSpecial true false undef " comments last overriding everything else -syn match puppetComment "\s*#.*$" contains=puppetTodo -syn keyword puppetTodo TODO NOTE FIXME XXX contained +syn match puppetComment "\s*#.*$" contains=puppetTodo +syn region puppetComment start="/\*" end="\*/" contains=puppetTodo extend +syn keyword puppetTodo TODO NOTE FIXME XXX BUG HACK contained " Define the default highlighting. " For version 5.7 and earlier: only when not done already @@ -60,25 +89,25 @@ if version >= 508 || !exists("did_puppet_syn_inits") endif HiLink puppetVariable Identifier - HiLink puppetBoolean Boolean HiLink puppetType Identifier - HiLink puppetDefault Identifier HiLink puppetKeyword Define - HiLink puppetTypeDefs Define HiLink puppetComment Comment HiLink puppetString String + HiLink puppetParamKeyword String + HiLink puppetParamDigits String + HiLink puppetNotVariable String + HiLink puppetParamSpecial Special + HiLink puppetSpecial Special HiLink puppetTodo Todo -" HiLink puppetBrace Delimiter -" HiLink puppetTypeBrace Delimiter -" HiLink puppetParen Delimiter - HiLink puppetDelimiter Delimiter HiLink puppetControl Statement HiLink puppetDefType Define HiLink puppetDefName Type + HiLink puppetNodeRe Type HiLink puppetTypeName Statement HiLink puppetTypeDefault Type HiLink puppetParamName Identifier HiLink puppetArgument Identifier + HiLink puppetFunction Function delcommand HiLink endif From 658d2802db29a2478b2ba5bbcae1aba7ea5be963 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 11 Feb 2011 11:16:04 -0800 Subject: [PATCH 29/34] Adding spiffy git aliases --- .gitconfig | 2 ++ .zshrc | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/.gitconfig b/.gitconfig index fdb3a13..0d3c437 100644 --- a/.gitconfig +++ b/.gitconfig @@ -3,3 +3,5 @@ email = h.haugen@gmail.com [color] ui = true +[alias] + lg = "log --pretty=format:'%C(yellow)%h%C(reset) %C(blue)%an%C(reset) %s %C(cyan)%cr%C(reset) %C(green)%d%C(reset)' --graph" diff --git a/.zshrc b/.zshrc index 86f7af6..edb9d8b 100644 --- a/.zshrc +++ b/.zshrc @@ -199,6 +199,17 @@ alias d="dtach -a /tmp/dtach" alias eo="xmodmap ~/keymaps/eo_dv_hunner.pke" alias vt="export TERM=vt220" alias rm=rm; unalias rm #hack +alias gl="git lg" +alias gp="git push" +alias gu="git pull" +alias gs="git status" +alias ga="git add" +alias gb="git branch" +alias gc="git commit" +alias gd="git diff" +alias go="git checkout" +alias gk="gitk --all&" +alias gx="gitx --all" alias uzbl="uzbl-browser" #startup aliases alias -s pdf="zathura" From 0899e0424c899367f0a0a6717689875ae5c157eb Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 11 Feb 2011 11:19:56 -0800 Subject: [PATCH 30/34] Adding a few more aliases for common arguments --- .zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.zshrc b/.zshrc index edb9d8b..19f77c4 100644 --- a/.zshrc +++ b/.zshrc @@ -204,10 +204,13 @@ alias gp="git push" alias gu="git pull" alias gs="git status" alias ga="git add" +alias gaf="git add --force" alias gb="git branch" alias gc="git commit" +alias gca="git commit --amend" alias gd="git diff" alias go="git checkout" +alias gob="git checkout -b" alias gk="gitk --all&" alias gx="gitx --all" alias uzbl="uzbl-browser" From e7987d0c9510a8fee19396245d181da05e6342f8 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 11 Feb 2011 11:22:33 -0800 Subject: [PATCH 31/34] Also adding alias for naked `git` --- .zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.zshrc b/.zshrc index 19f77c4..c1e9d7c 100644 --- a/.zshrc +++ b/.zshrc @@ -199,6 +199,7 @@ alias d="dtach -a /tmp/dtach" alias eo="xmodmap ~/keymaps/eo_dv_hunner.pke" alias vt="export TERM=vt220" alias rm=rm; unalias rm #hack +alias g="git" alias gl="git lg" alias gp="git push" alias gu="git pull" From 5859f9ec235073e7c9840ee92792a615798f3c70 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 11 Feb 2011 11:39:24 -0800 Subject: [PATCH 32/34] Adding rm and mv --- .zshrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.zshrc b/.zshrc index c1e9d7c..46f1031 100644 --- a/.zshrc +++ b/.zshrc @@ -204,6 +204,8 @@ alias gl="git lg" alias gp="git push" alias gu="git pull" alias gs="git status" +alias gm="git mv" +alias gr="git r" alias ga="git add" alias gaf="git add --force" alias gb="git branch" From c2e49216e43851cd634da1ac3c6a21a4747eb4e0 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 15 Feb 2011 15:02:56 -0800 Subject: [PATCH 33/34] Moving the date in `gl` --- .gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index 0d3c437..63657c9 100644 --- a/.gitconfig +++ b/.gitconfig @@ -4,4 +4,4 @@ [color] ui = true [alias] - lg = "log --pretty=format:'%C(yellow)%h%C(reset) %C(blue)%an%C(reset) %s %C(cyan)%cr%C(reset) %C(green)%d%C(reset)' --graph" + lg = "log --pretty=format:'%C(yellow)%h%C(reset) %C(blue)%an%C(reset) %C(cyan)%cr%C(reset) %s %C(green)%d%C(reset)' --graph" From 94ee50429b34d534a3cbd9c1333bec49279df458 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Tue, 22 Feb 2011 09:30:01 -0800 Subject: [PATCH 34/34] Clancy -> budda --- .zshrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 46f1031..83ba637 100644 --- a/.zshrc +++ b/.zshrc @@ -175,7 +175,7 @@ alias m="TERM=rxvt;ssh hunner@mint.cic.pdx.edu" alias chandra="TERM=rxvt;ssh hunner@chandra.cs.pdx.edu" export CS=cs.pdx.edu alias odin="TERM=xterm;ssh hunner@odin.pdx.edu" -alias clancy="ssh hunnur@clancy.dreamhost.com" +alias budda="ssh hunnur@budda.dreamhost.com" alias kvar="ssh hunner@131.252.134.134" alias kvin="ssh hunner@131.252.135.22" alias mutt="TERM=xterm-256color mutt" @@ -217,6 +217,8 @@ alias gob="git checkout -b" alias gk="gitk --all&" alias gx="gitx --all" alias uzbl="uzbl-browser" +alias hide="SetFile -a V" +alias show="SetFile -a v" #startup aliases alias -s pdf="zathura" alias -s txt="vi"