Merge branch 'master' of git@github.com:hunner/hunners-homedir-configs

This commit is contained in:
Hunter Haugen 2010-03-08 10:34:58 -08:00
commit e44b09286c
7 changed files with 394 additions and 368 deletions

View file

@ -1,28 +1,29 @@
Xft.antialias: true
URxvt*scrollBar: false
URxvt*background: rgba:0000/0000/0000/aaaa
#URxvt*background: rgba:1111/1111/1111/dddd
URxvt*background: rgba:0000/0000/0000/cccc
!URxvt*background: rgba:1111/1111/1111/dddd
URxvt*depth: 32
URxvt*foreground: #dddddd
#URxvt*foreground: #c3c6c8
#URxvt*transparent: true
!URxvt*foreground: #c3c6c8
!URxvt*transparent: true
URxvt*transparent: false
#URxvt*fading: 2%
#URxvt*shading: 30
#URxvt*fadeColor: grey
!URxvt*fading: 2%
!URxvt*shading: 30
!URxvt*fadeColor: grey
URxvt*buffered: true
URxvt*cursorColor: green
#URxvt*cursorColor: #007998
!URxvt*cursorColor: #007998
!URxvt*font: xft:Terminus:pixelsize=11,xft:IPAGothic:antialias=true
URxvt*font: 6x13,xft:IPAGothic:antialias=true
!URxvt*perl-ext-common: default
#URxvt*color1: #007998
#URxvt*color9: #228bba
!URxvt*color1: #007998
!URxvt*color9: #228bba
URxvt.perl-ext-common: default,matcher
URxvt*urlLauncher: urxvt-to-uzbl.sh
URxvt.colorUL: #cc0000
#URxvt.colorUL: #007998
URxvt.searchable-scrollback: CM-S
!URxvt.colorUL: #007998
!URxvt.borderLess:True
!URxvt.reverseVideo:True

317
.emacs
View file

@ -1,308 +1,15 @@
(require 'cl)
(defconst dot-emacs (concat (getenv "HOME") "/" ".emacs.hunner.el")
"My dot emacs file")
(mapcar (lambda (x) (add-to-list 'load-path (expand-file-name x)))
'("~/.emacs.d"
))
(require 'bytecomp)
(setq compiled-dot-emacs (byte-compile-dest-file dot-emacs))
(defun require-all (packages)
(mapcar #'require packages))
(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))
(require-all '(
ido
color-theme
gentooish
irblack
parenface
bar-cursor
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GLOBAL
(color-theme-initialize)
(if window-system
; (color-theme-gentooish)
(color-theme-dark-laptop))
(color-theme-irblack)
(bar-cursor-mode 1)
(menu-bar-mode 0)
(global-linum-mode)
(setq linum-format "%3d ")
(setq-default indent-tabs-mode nil)
(setq indent-tabs-mode nil)
(setq make-backup-files nil)
(set-language-environment "UTF-8")
(set-input-method "japanese-ascii")
(winner-mode t)
(display-battery-mode t)
(setq display-time-24hr-format t)
(display-time-mode t)
(tooltip-mode nil)
(setq midnight-mode t)
(setq column-number-mode nil)
(setq size-indication-mode nil)
(setq mode-line-position nil)
(mouse-avoidance-mode 'animate)
(ido-mode t)
(global-set-key "\C-m" 'reindent-then-newline-and-indent) ;No tabs
(global-set-key "\C-a" 'beginning-of-line-text)
(defun indent-or-expand (arg)
"Either indent according to mode, or expand the word preceding
point."
(interactive "*P")
(if (and
(or (bobp) (= ?w (char-syntax (char-before))))
(or (eobp) (not (= ?w (char-syntax (char-after))))))
(dabbrev-expand arg)
(indent-according-to-mode)))
(global-set-key [C-tab] 'indent-according-to-mode)
;; Proxy for ssh tunnel + privoxy
(setq url-proxy-services '(("no_proxy" . "localhost")
("http" . "localhost:8118")))
(setq save-place-file "~/.emacs.d/saveplace") ;; keep my ~/ clean
(setq-default save-place t) ;; activate it for all buffers
(require 'saveplace) ;; get the package
;; Enable ergoemacs layout
;; (setenv "ERGOEMACS_KEYBOARD_LAYOUT" "dv") ; US Dvorak layout
;; (load "~/.emacs.d/ergoemacs-keybindings-5.1/ergoemacs-mode")
;; (ergoemacs-mode 1)
;; Highlight bad whitespace
(global-whitespace-mode t)
(setq whitespace-style (quote (tabs tab-mark)))
;; Make % work like vi
(global-set-key "%" 'match-paren)
(defun match-paren (arg)
"Go to the matching paren if on a paren; otherwise insert %."
(interactive "p")
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
(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)
;; Give killing lines advice
(defadvice kill-ring-save (before slick-copy activate compile)
"When called interactively with no active region, copy a single line instead."
(interactive
(if mark-active (list (region-beginning) (region-end))
(message "Copied line")
(list (line-beginning-position)
(line-beginning-position 2)))))
(defadvice kill-region (before slick-cut activate compile)
"When called interactively with no active region, kill a single line instead."
(interactive
(if mark-active (list (region-beginning) (region-end))
(list (line-beginning-position)
(line-beginning-position 2)))))
;; Tip of the day!
(defun totd ()
(interactive)
(random t) ;; seed with time-of-day
(with-output-to-temp-buffer "*Tip of the day*"
(let* ((commands (loop for s being the symbols
when (commandp s) collect s))
(command (nth (random (length commands)) commands)))
(princ
(concat "Your tip for the day is:\n"
"========================\n\n"
(describe-function command)
"\n\nInvoke with:\n\n"
(with-temp-buffer
(where-is command t)
(buffer-string)))))))
;; Set my location sunrise-sunset
(setq calendar-latitude 45.4)
(setq calendar-longitude -122.6)
(setq calendar-location-name "Portland, OR")
;; (setq calendar-latitude 17.5)
;; (setq calendar-longitude 78.5)
;; (setq calendar-location-name "Hyderabad, India")
;; Start the server for emacsclient
;(server-start)
;; Custom key maps
(defun set-keys (commands)
(mapcar (lambda (x)
(global-set-key (read-kbd-macro (first x)) (second x)))
commands))
(set-keys '(
("C-c t" totd)
("C-c s p" (lambda () (interactive)
(if (shellfm-running-p)
(shellfm-pause)
((shellfm 1) (shellfm-station-recommended 1)))))
("C-c s n" shellfm-skip-track)
("C-c s r" shellfm-station-recommended)
("C-c s s" shellfm-station-artist)
("C-c s m" shellfm-station-playlist)
("C-c s l" shellfm-love-track)
("C-c s a" shellfm-add-to-playlist)
("C-c s q" shellfm 0)
("C-c s i" shellfm-track-info)
("M-s" save-buffer)
("M-N" make-frame)
("M-W" delete-frame)
("M-w" ido-kill-buffer)
("M-1" delete-other-windows)
("M-!" delete-window)
("M-2" split-window-horizontally)
("M-@" split-window-vertically)
("C-c C-a" beginning-of-line)
("M-o" other-window)
("M-O" other-window)
("M-`" switch-to-next-frame)
("M-~" switch-to-previous-frame)
))
;; Transparency
(set-frame-parameter (selected-frame) 'alpha '(85 85))
(add-to-list 'default-frame-alist '(alpha 85 85))
(eval-when-compile (require 'cl))
(defun toggle-transparency ()
(interactive)
(if (/=
(cadr (find 'alpha (frame-parameters nil) :key #'car))
10)
(set-frame-parameter nil 'alpha '(10 10))
(set-frame-parameter nil 'alpha '(85 85))))
(global-set-key (kbd "C-c C-t") 'toggle-transparency)
;; (global-set-key (kbd "<XF86AudioPlay>")
;; (lambda () (interactive)
;; (if (shellfm-running-p)
;; (shellfm-skip-track)
;; (shellfm 1))))
;; ERC stuff
;; (setq erc-encoding-coding-alist (quote (("#lisp" . utf-8)
;; ("#nihongo" . iso-2022-jp) ("#truelambda" . iso-latin-1)
;; ("#bitlbee" . iso-latin-1))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Haskell mode
;;
(load "~/.emacs.d/haskell-mode/haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Generic Lisp / Emacs Lisp
;; from http://www.emacswiki.org/emacs/AutoIndentation
(defadvice yank (after indent-region activate)
(if (member major-mode '(clojure-mode emacs-lisp-mode lisp-mode))
(let ((mark-even-if-inactive t))
(indent-region (region-beginning) (region-end) nil))))
(defun tab-fix ()
(local-set-key [tab] 'indent-or-expand))
(defun slime-tab-fix ()
(local-set-key [tab] 'slime-complete-symbol))
(add-hook 'emacs-lisp-mode-hook 'tab-fix)
(add-hook 'lisp-mode-hook 'slime-tab-fix)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Clojure / SLIME
(add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode))
;(define-key clojure-mode-map (kbd "<tab>") 'indent-or-expand)
(defmacro defclojureface (name color desc &optional others)
`(defface ,name '((((class color)) (:foreground ,color ,@others))) ,desc :group 'faces))
(defclojureface clojure-parens "DimGrey" "Clojure parens")
(defclojureface clojure-braces "#49b2c7" "Clojure braces")
(defclojureface clojure-brackets "SteelBlue" "Clojure brackets")
(defclojureface clojure-keyword "khaki" "Clojure keywords")
(defclojureface clojure-namespace "#c476f1" "Clojure namespace")
(defclojureface clojure-java-call "#4bcf68" "Clojure Java calls")
(defclojureface clojure-special "#b8bb00" "Clojure special")
(defclojureface clojure-double-quote "#b8bb00" "Clojure special" (:background "unspecified"))
(defun tweak-clojure-syntax ()
(mapcar (lambda (x) (font-lock-add-keywords nil x))
'((("#?['`]*(\\|)" . 'clojure-parens))
(("#?\\^?{\\|}" . 'clojure-brackets))
(("\\[\\|\\]" . 'clojure-braces))
((":\\w+" . 'clojure-keyword))
(("#?\"" 0 'clojure-double-quote prepend))
(("nil\\|true\\|false\\|%[1-9]?" . 'clojure-special))
(("(\\(\\.[^ \n)]*\\|[^ \n)]+\\.\\|new\\)\\([ )\n]\\|$\\)" 1 'clojure-java-call))
)))
(add-hook 'clojure-mode-hook 'tweak-clojure-syntax)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Translation
(autoload 'babel "babel"
"Use a web translation service to translate the message MSG." t)
(autoload 'babel-region "babel"
"Use a web translation service to translate the current region." t)
(autoload 'babel-as-string "babel"
"Use a web translation service to translate MSG, returning a string." t)
(autoload 'babel-buffer "babel"
"Use a web translation service to translate the current buffer." t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Custom
(custom-set-variables
;; custom-set-variables 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.
'(blink-cursor-mode nil)
'(case-fold-search t)
'(comint-scroll-to-bottom-on-input t)
'(fancy-splash-image "")
'(global-linum-mode t)
'(ido-decorations (quote ("" "" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]")))
'(ido-everywhere t)
'(inhibit-startup-screen t)
'(lisp-loop-forms-indentation 6)
'(lisp-loop-keyword-indentation 6)
'(lisp-simple-loop-indentation 6)
'(mode-line-format (quote ("%e--[" mode-line-buffer-identification "]" (vc-mode vc-mode) " " mode-line-modes " " global-mode-string " %-")))
'(mode-line-in-non-selected-windows t)
'(mode-line-modes (quote ("%[" "(" (:propertize ("" mode-name)) ("" mode-line-process) (:propertize ("" minor-mode-alist)) "%n" ")" "%]")))
'(require-final-newline t)
'(savehist-mode t nil (savehist))
'(scroll-conservatively 100000)
'(scroll-down-aggressively 0.0)
'(scroll-margin 4)
'(scroll-step 1)
'(scroll-up-aggressively 0.0)
'(show-paren-mode t nil (paren))
)
;;; 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)
(require 'starter-kit-elpa))
(add-hook 'kill-emacs-hook
'(lambda () (and (file-newer-than-file-p dot-emacs compiled-dot-emacs)
(byte-compile-file dot-emacs))))

View file

@ -8,50 +8,57 @@
;;
(require 'color-theme)
;; White #EEEEEE #FFFFFF
;; Black #4E4E4E #7C7C7C ? / dim gray
;; Blue #96CBFE #FFFFCB slate blue
;; Green #A8FF60 #CEFFAB DarkOliveGreen2
;; Cyan #C6C5FE #DFDFFE steel blue
;; Red #FF6C60 #FFB6B0
;; Magenta #FF73FD #FF9CFE
;; Yellow #FFFFB6 #FFFFCB pale goldenrod
(defun color-theme-irblack ()
"IR_black theme taken from Vim"
(interactive)
(color-theme-install
'(color-theme-irblack
(;; (background-color . "#000000")
(;; (background-color . "black")
;; (background-mode . dark)
(border-color . "#454545")
(cursor-color . "#A8FF60")
(border-color . "gray10")
(cursor-color . "DarkOliveGreen2")
(foreground-color . "#F6F3E8")
(mouse-color . "#A8FF60"))
(mouse-color . "DarkOliveGreen2"))
(default ((t (:foreground "#F6F3E8"))))
(vertical-border ((t (:background "#666666"))))
(vertical-border ((t (:background "gray20"))))
(blue ((t (:foreground "blue"))))
(border-glyph ((t (nil))))
(buffers-tab ((t (:background "#141414" :foreground "#cacaca"))))
(font-lock-comment-face ((t (:foreground "#7C7C7C"))))
(font-lock-constant-face ((t (:foreground "#99CC99"))))
(font-lock-doc-string-face ((t (:foreground "#A8FF60"))))
(font-lock-function-name-face ((t (:foreground "#FFD2A7"))))
(font-lock-builtin-face ((t (:foreground "#96CBFE"))))
(font-lock-keyword-face ((t (:foreground "#96CBFE"))))
(font-lock-preprocessor-face ((t (:foreground "#96CBFE"))))
(font-lock-reference-face ((t (:foreground "#C6C5FE"))))
(font-lock-comment-face ((t (:foreground "dim gray"))))
(font-lock-constant-face ((t (:foreground "light green"))))
(font-lock-doc-string-face ((t (:foreground "DarkOliveGreen2"))))
(font-lock-function-name-face ((t (:foreground "burlywood"))))
(font-lock-builtin-face ((t (:foreground "slate blue"))))
(font-lock-keyword-face ((t (:foreground "slate blue"))))
(font-lock-preprocessor-face ((t (:foreground "slate blue"))))
(font-lock-reference-face ((t (:foreground "steel blue"))))
(font-lock-regexp-grouping-backslash ((t (:foreground "#E9C062"))))
(font-lock-regexp-grouping-construct ((t (:foreground "red"))))
(linum ((t (:background "#000000" :foreground "#666666"))))
(linum ((t (:background "black" :foreground "dim gray"))))
(minibuffer-prompt ((t (:foreground "#888888"))))
(ido-subdir ((t (:foreground "#CF6A4C"))))
(ido-first-match ((t (:foreground "#8F9D6A"))))
(ido-only-match ((t (:foreground "#8F9D6A"))))
(mumamo-background-chunk-submode ((t (:background "#222222"))))
(font-lock-string-face ((t (:foreground "#A8FF60"))))
(font-lock-type-face ((t (:foreground "#FFFFB6"))))
(font-lock-variable-name-face ((t (:foreground "#C6C5FE"))))
(font-lock-string-face ((t (:foreground "DarkOliveGreen2"))))
(font-lock-type-face ((t (:foreground "pale goldenrod"))))
(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"))))
(region ((t (:background "#660000"))))
(mode-line ((t (:background "grey75" :foreground "black"))))
(region ((t (:background "dark red"))))
(mode-line ((t (:background "dim gray" :foreground "dark gray"))))
(highlight ((t (:background "#111111"))))
(highline-face ((t (:background "SeaGreen"))))
(left-margin ((t (nil))))
@ -61,11 +68,12 @@
(underline ((nil (:underline nil))))
;; mumamo
(mumamo-background-chunk-major ((t (:background "#000000"))))
(mumamo-background-chunk-submode1 ((t (:background "#0A0A0A"))))
(mumamo-background-chunk-submode2 ((t (:background "#0A0A0A"))))
(mumamo-background-chunk-submode3 ((t (:background "#0A0A0A"))))
(mumamo-background-chunk-submode4 ((t (:background "#0A0A0A"))))
;(mumamo-background-chunk-major ((t (:background "#000000"))))
;(mumamo-background-chunk-submode ((t (:background "#222222"))))
;(mumamo-background-chunk-submode1 ((t (:background "#0A0A0A"))))
;(mumamo-background-chunk-submode2 ((t (:background "#0A0A0A"))))
;(mumamo-background-chunk-submode3 ((t (:background "#0A0A0A"))))
;(mumamo-background-chunk-submode4 ((t (:background "#0A0A0A"))))
;; diff-mode
(diff-added ((t (:background "#253B22" :foreground "#F8F8F8"))))
@ -75,25 +83,25 @@
;; nxml
(nxml-delimiter ((t (:foreground "#96CBFE"))))
(nxml-name ((t (:foreground "#96CBFE"))))
(nxml-element-local-name ((t (:foreground "#96CBFE"))))
(nxml-attribute-local-name ((t (:foreground "#FFD7B1"))))
;(nxml-delimiter ((t (:foreground "#96CBFE"))))
;(nxml-name ((t (:foreground "#96CBFE"))))
;(nxml-element-local-name ((t (:foreground "#96CBFE"))))
;(nxml-attribute-local-name ((t (:foreground "#FFD7B1"))))
;; erc
(erc-default-face ((t (nil))))
(erc-direct-msg-face ((t (:foreground "#007998"))))
(erc-input-face ((t (:foreground "#feffff"))))
(erc-bold-face ((t (:bold t :weight bold))))
(erc-inverse-face ((t (:background "Black" :foreground "White"))))
(erc-underline-face ((t (:underline t))))
(erc-prompt-face ((t (:foreground "#c3c6c8"))))
(erc-notice-face ((t (:foreground "#7c7c7c"))))
(erc-action-face ((t (:bold t :weight bold))))
(erc-error-face ((t (:foreground "#007998"))))
(erc-timestamp-face ((t (:foreground "#7c7c7c"))))
(erc-nick-default-face ((t (:foreground "#feffff"))))
(erc-nick-msg-face ((t (:bold t :foreground "#007998" :weight bold))))
;(erc-default-face ((t (nil))))
;(erc-direct-msg-face ((t (:foreground "#007998"))))
;(erc-input-face ((t (:foreground "#feffff"))))
;(erc-bold-face ((t (:bold t :weight bold))))
;(erc-inverse-face ((t (:background "Black" :foreground "White"))))
;(erc-underline-face ((t (:underline t))))
;(erc-prompt-face ((t (:foreground "#c3c6c8"))))
;(erc-notice-face ((t (:foreground "#7c7c7c"))))
;(erc-action-face ((t (:bold t :weight bold))))
;(erc-error-face ((t (:foreground "#007998"))))
;(erc-timestamp-face ((t (:foreground "#7c7c7c"))))
;(erc-nick-default-face ((t (:foreground "#feffff"))))
;(erc-nick-msg-face ((t (:bold t :foreground "#007998" :weight bold))))
;; erc-dangerous-host-face
;; erc-keyword-face
(erc-current-nick-face ((t (:foreground "#007998"))))

304
.emacs.hunner.el Normal file
View file

@ -0,0 +1,304 @@
(require 'cl)
(mapcar (lambda (x) (add-to-list 'load-path (expand-file-name x)))
'("~/.emacs.d"
))
(defun require-all (packages)
(mapcar #'require packages))
(require-all '(
color-theme
irblack
parenface
bar-cursor
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GLOBAL
(color-theme-initialize)
(if window-system
(set-background-color "black")
())
(color-theme-irblack)
;(if window-system
; (color-theme-gentooish)
; (color-theme-dark-laptop))
;(load-file "~/.emacs.d/color-theme-twilight.el")
;(color-theme-twilight)
;(load-file "~/.emacs.d/color-theme-inkpot.el")
;(color-theme-inkpot)
(bar-cursor-mode 1)
(menu-bar-mode 0)
(tool-bar-mode 0)
(global-linum-mode)
(setq linum-format "%3d ")
(setq-default indent-tabs-mode nil)
(setq indent-tabs-mode nil)
(setq make-backup-files nil)
(set-language-environment "UTF-8")
(set-input-method "japanese-ascii")
(winner-mode t)
(display-battery-mode t)
(setq display-time-24hr-format t)
(display-time-mode t)
(line-number-mode 1)
(column-number-mode 1)
(tooltip-mode nil)
(setq midnight-mode t)
(setq column-number-mode nil)
(setq size-indication-mode nil)
(setq mode-line-position nil)
(mouse-avoidance-mode 'animate)
(ido-mode t)
;; Ido and uniquify options from http://curiousprogrammer.wordpress.com/2009/07/13/my-emacs-defaults/
(setq ido-enable-flex-matching t)
(setq ido-create-new-buffer 'always)
(setq uniquify-buffer-name-style 'reverse)
(setq uniquify-separator "|")
(setq uniquify-after-kill-buffer-p t)
(setq uniquify-ignore-buffers-re "^\\*")
(global-set-key "\C-m" 'reindent-then-newline-and-indent) ;No tabs
(global-set-key "\C-a" 'beginning-of-line-text)
(defun indent-or-expand (arg)
"Either indent according to mode, or expand the word preceding
point."
(interactive "*P")
(if (and
(or (bobp) (= ?w (char-syntax (char-before))))
(or (eobp) (not (= ?w (char-syntax (char-after))))))
(dabbrev-expand arg)
(indent-according-to-mode)))
(global-set-key [C-tab] 'indent-according-to-mode)
;; Proxy for ssh tunnel + privoxy
;; (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 backup-directory-alist
`((".*" . "~/.emacs.d/backups/")))
(setq auto-save-file-name-transforms
`((".*" "~/.emacs.d/backups/" t)))
;; Enable ergoemacs layout
;; (setenv "ERGOEMACS_KEYBOARD_LAYOUT" "dv") ; US Dvorak layout
;; (load "~/.emacs.d/ergoemacs-keybindings-5.1/ergoemacs-mode")
;; (ergoemacs-mode 1)
;; Highlight bad whitespace
(global-whitespace-mode t)
(setq whitespace-style (quote (tabs tab-mark)))
;; Make % work like vi
(global-set-key "%" 'match-paren)
(defun match-paren (arg)
"Go to the matching paren if on a paren; otherwise insert %."
(interactive "p")
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
(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)
;; Give killing lines advice
(defadvice kill-ring-save (before slick-copy activate compile)
"When called interactively with no active region, copy a single line instead."
(interactive
(if mark-active (list (region-beginning) (region-end))
(message "Copied line")
(list (line-beginning-position)
(line-beginning-position 2)))))
(defadvice kill-region (before slick-cut activate compile)
"When called interactively with no active region, kill a single line instead."
(interactive
(if mark-active (list (region-beginning) (region-end))
(list (line-beginning-position)
(line-beginning-position 2)))))
;; Tip of the day!
(defun totd ()
(interactive)
(random t) ;; seed with time-of-day
(with-output-to-temp-buffer "*Tip of the day*"
(let* ((commands (loop for s being the symbols
when (commandp s) collect s))
(command (nth (random (length commands)) commands)))
(princ
(concat "Your tip for the day is:\n"
"========================\n\n"
(describe-function command)
"\n\nInvoke with:\n\n"
(with-temp-buffer
(where-is command t)
(buffer-string)))))))
;; Set my location sunrise-sunset
(setq calendar-latitude 45.4)
(setq calendar-longitude -122.6)
(setq calendar-location-name "Portland, OR")
;; (setq calendar-latitude 17.5)
;; (setq calendar-longitude 78.5)
;; (setq calendar-location-name "Hyderabad, India")
;; Start the server for emacsclient
;(server-start)
;; Custom key maps
(defun set-keys (commands)
(mapcar (lambda (x)
(global-set-key (read-kbd-macro (first x)) (second x)))
commands))
(set-keys '(
("C-c t" totd)
("C-c s p" (lambda () (interactive)
(if (shellfm-running-p)
(shellfm-pause)
((shellfm 1) (shellfm-station-recommended 1)))))
("C-c s n" shellfm-skip-track)
("C-c s r" shellfm-station-recommended)
("C-c s s" shellfm-station-artist)
("C-c s m" shellfm-station-playlist)
("C-c s l" shellfm-love-track)
("C-c s a" shellfm-add-to-playlist)
("C-c s q" shellfm 0)
("C-c s i" shellfm-track-info)
("M-s" save-buffer)
("M-N" make-frame)
("M-W" delete-frame)
("M-w" ido-kill-buffer)
("M-1" delete-other-windows)
("M-!" delete-window)
("M-2" split-window-horizontally)
("M-@" split-window-vertically)
("M-a" beginning-of-line)
("M-o" other-window)
("M-O" other-window)
("M-`" switch-to-next-frame)
("M-~" switch-to-previous-frame)
))
;; Transparency
(set-frame-parameter (selected-frame) 'alpha '(85 85))
(add-to-list 'default-frame-alist '(alpha 85 85))
(eval-when-compile (require 'cl))
(defun toggle-transparency ()
(interactive)
(if (/=
(cadr (find 'alpha (frame-parameters nil) :key #'car))
10)
(set-frame-parameter nil 'alpha '(10 10))
(set-frame-parameter nil 'alpha '(85 85))))
(global-set-key (kbd "C-c C-t") 'toggle-transparency)
;; (global-set-key (kbd "<XF86AudioPlay>")
;; (lambda () (interactive)
;; (if (shellfm-running-p)
;; (shellfm-skip-track)
;; (shellfm 1))))
;; ERC stuff
;; (setq erc-encoding-coding-alist (quote (("#lisp" . utf-8)
;; ("#nihongo" . iso-2022-jp) ("#truelambda" . iso-latin-1)
;; ("#bitlbee" . iso-latin-1))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Haskell mode
;;
(load "~/.emacs.d/haskell-mode/haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Generic Lisp / Emacs Lisp
;; from http://www.emacswiki.org/emacs/AutoIndentation
(defadvice yank (after indent-region activate)
(if (member major-mode '(clojure-mode emacs-lisp-mode lisp-mode))
(let ((mark-even-if-inactive t))
(indent-region (region-beginning) (region-end) nil))))
(defun tab-fix ()
(local-set-key [tab] 'indent-or-expand))
(defun slime-tab-fix ()
(local-set-key [tab] 'slime-complete-symbol))
(add-hook 'emacs-lisp-mode-hook 'tab-fix)
(add-hook 'lisp-mode-hook 'slime-tab-fix)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Translation
(autoload 'babel "babel"
"Use a web translation service to translate the message MSG." t)
(autoload 'babel-region "babel"
"Use a web translation service to translate the current region." t)
(autoload 'babel-as-string "babel"
"Use a web translation service to translate MSG, returning a string." t)
(autoload 'babel-buffer "babel"
"Use a web translation service to translate the current buffer." t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Custom
(custom-set-variables
;; custom-set-variables 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.
'(blink-cursor-mode nil)
'(case-fold-search t)
'(comint-scroll-to-bottom-on-input t)
'(fancy-splash-image "")
;; '(frame-background-mode (quote dark))
'(global-linum-mode t)
'(ido-decorations (quote ("" "" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]")))
'(ido-everywhere t)
'(inhibit-startup-screen t)
'(lisp-loop-forms-indentation 6)
'(lisp-loop-keyword-indentation 6)
'(lisp-simple-loop-indentation 6)
'(mode-line-format (quote ("%e--[" mode-line-buffer-identification "]" (vc-mode vc-mode) " " mode-line-modes " " global-mode-string " %-")))
'(mode-line-in-non-selected-windows t)
'(mode-line-modes (quote ("%[" "(" (:propertize ("" mode-name)) ("" mode-line-process) (:propertize ("" minor-mode-alist)) "%n" ")" "%]")))
'(mumamo-background-colors nil)
'(require-final-newline t)
'(savehist-mode t nil (savehist))
'(scroll-conservatively 100000)
'(scroll-down-aggressively 0.0)
'(scroll-margin 4)
'(scroll-step 1)
'(scroll-up-aggressively 0.0)
'(show-paren-mode t nil (paren)))
;;; 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)
(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))))

4
.vimrc
View file

@ -782,6 +782,7 @@ map <S-F7> :SpellCheck<CR>
map <C-F7> :let spell_language_list = "english,spanish"
nnoremap <silent> <F8> :Tlist<CR>
nnoremap <silent> <S-F8> :TlistSync<CR>
nnoremap <esc> :noh<return><esc>
map <F11> !!date<CR>
map <F12> :TC<CR>
nmap :X :x
@ -789,6 +790,9 @@ nmap :W :w
nmap :Q :q
noremap <Leader>rg :color relaxedgreen<CR>
noremap <Leader>ip :color inkpot<CR>
noremap <F12> <Esc>:syntax sync fromstart<CR>
inoremap <F12> <C-o>:syntax sync fromstart<CR>
syntax sync minlines=200
" Javac
set makeprg=javac\ %

View file

@ -45,8 +45,8 @@ mWorkspaces = map show [1 .. 9 :: Int]
-- Border colors for unfocused and focused windows, respectively.
--
mNormalBorderColor = "#c3c6c8"
mFocusedBorderColor = "#007998"
mNormalBorderColor = "#999999"
mFocusedBorderColor = "#dd0000"
-- Custom keys
--
@ -55,7 +55,8 @@ mKeys = [ ("M-S-n", sendMessage MirrorShrink ) -- Expand current window
, ("M-b" , withFocused toggleBorder ) -- Toggle the border of the currently focused window
, ("M-g" , warpToCentre >> promptedWs) -- Gridselect to pick windows
, ("M-S-b", spawn "ps -U hunner|grep dzen2|awk '{print $1}'|xargs kill -USR1") -- Bring dzen to the front
, ("<Scroll_lock>", spawn "xlock -mode fzort" ) -- SCReen LocK
-- Sticky/unsticky windows (does not work on workspaces created after the fact)
, ("M-a" , windows copyToAll) -- Copy focused window to all workspaces
, ("M-S-a", killAllOtherCopies) -- Uncopy focused window from all workspaces
@ -113,7 +114,7 @@ mKeysExt = [((m .|. mModMask, k), f i) -- changing workspaces with bébo
-}
mXPConfig :: XPConfig
mXPConfig = defaultXPConfig { fgColor = "#007998", bgColor = "#222222", borderColor = "#007998" }
mXPConfig = defaultXPConfig { fgColor = "#dd0000", bgColor = "black", borderColor = "#dd0000" }
gsConfig = defaultGSConfig
{ gs_navigate = M.unions

13
.zshrc
View file

@ -123,7 +123,8 @@ alias la="l -Fa"
alias lla="ll -Fa"
alias c="cd"
alias e="TERM=rxvt-256color; emacs -nw"
alias ec="emacsclient"
alias et="TERM=rxvt-256color; emacsclient -t"
alias ec="emacsclient -c --eval '(set-background-color \"black\")'"
alias ecx="emacsclient --eval '(make-frame-on-display \"$DISPLAY\")'"
#alias s="TERM=xterm;ssh serenity.cat.pdx.edu"
alias s="TERM=rxvt;ssh hunner@serenity.cat.pdx.edu"
@ -175,11 +176,11 @@ if [ x$DISPLAY != x ] ; then
precmd() { [ -z "$WINTITLE" ] && print -Pn "\e]0;%m [%~]\a" || : }
preexec() { [ -z "$WINTITLE" ] && print -Pn "\e]0;%m [$1]\a" || : }
fi
resize() { printf '\33]50;%s%d\007' "xft:Terminus:pixelsize=" $1 ":antialias=true" }
asdf() { xkbcomp -w0 ~/keymaps/xkb/hunner.xkb $DISPLAY }
auie() { xkbcomp -w0 ~/keymaps/xkb/hunner.xkb $DISPLAY }
aoeu() { setxkbmap us }
bepo() { setxkbmap fr bepo "ctrl:swapcaps" }
alias resize="printf '\33]50;%s%d\007' 'xft:Terminus:pixelsize=' $1 ':antialias=true'"
alias asdf="xkbcomp -w0 ~/keymaps/xkb/hunner.xkb $DISPLAY"
alias auie="xkbcomp -w0 ~/keymaps/xkb/hunner.xkb $DISPLAY"
alias aoeu='setxkbmap us'
alias bepo='setxkbmap fr bepo "ctrl:swapcaps"'
type7() {
if [ `uname -s` = "SunOS" ] ; then
xmodmap ~/keymaps/eo_dv_hunner_type7_sol.pke