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

This commit is contained in:
Hunter S Haugen 2010-05-14 08:15:37 -07:00
commit 7459a60fe6
12 changed files with 935 additions and 507 deletions

View file

@ -1,22 +1,29 @@
Xft.antialias: true
URxvt*scrollBar: false
URxvt*background: rgba:0000/0000/0000/aaaa
URxvt*background: rgba:0000/0000/0000/cccc
!URxvt*background: rgba:1111/1111/1111/dddd
URxvt*depth: 32
URxvt*foreground: #dddddd
#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*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.perl-ext-common: default,matcher
URxvt*urlLauncher: urxvt-to-uzbl.sh
URxvt.colorUL: #cc0000
URxvt.searchable-scrollback: CM-S
!URxvt.colorUL: #007998
!URxvt.borderLess:True
!URxvt.reverseVideo:True
@ -34,7 +41,7 @@ URxvt.colorUL: #cc0000
!UXTerm*foreground:gray
!UXTerm*cursorColor:yellow
!UXTerm*pointerColor:white
!XTerm*vt100.metaSendsEscape:true
XTerm*vt100.metaSendsEscape:true
!Requiresxfonts-terminusandaXrestartforanychanges
!UXTerm*font:terminus-16
@ -61,4 +68,13 @@ URxvt.colorUL: #cc0000
Emacs*font: Bitstream Vera Sans Mono-8:antialias=True
Emacs*menuBar: off
Emacs*toolBar: off
Emacs.verticalScrollBars: off
Emacs*verticalScrollBars: off
XClock*Foreground: #007998
XClock*Background: #222222
XClock*chime: True
XClock*update: 1
!XCalc*Foreground: #007998
!XCalc*Background: #222222
XCalc*customization: -color
XCalc*rpn: True

235
.emacs
View file

@ -1,226 +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 show-trailing-whitespace 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)
;; 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)))))
;; Set my location sunrise-sunset
;; (setq calendar-latitude 40.1)
;; (setq calendar-longitude -88.2)
;; (setq calendar-location-name "Portland, OR")
(setq calendar-latitude 17.5)
(setq calendar-longitude 78.5)
(setq calendar-location-name "Hyderabad, India")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 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))
(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-mode . dark)
(border-color . "#454545")
(cursor-color . "#A8FF60")
(;; (background-color . "black")
;; (background-mode . dark)
(border-color . "gray10")
(cursor-color . "DarkOliveGreen2")
(foreground-color . "#F6F3E8")
(mouse-color . "#A8FF60"))
(default ((t (:background "#000000" :foreground "#F6F3E8"))))
(vertical-border ((t (:background "#666666"))))
(mouse-color . "DarkOliveGreen2"))
(default ((t (:foreground "#F6F3E8"))))
(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"))))
(buffers-tab ((t (:background "#141414" :foreground "#cacaca"))))
(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,11 +83,32 @@
;; 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-dangerous-host-face
;; erc-keyword-face
(erc-current-nick-face ((t (:foreground "#007998"))))
;; (erc-command-indicator-face ((t (:bold t :weight bold))))
;; (erc-header-line ((t (:background "grey90" :foreground "grey20"))))
;; (erc-my-nick-face ((t (:bold t :foreground "brown" :weight bold))))
)))
(provide 'irblack)

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 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))))

3
.gitconfig Normal file
View file

@ -0,0 +1,3 @@
[user]
name = Hunter Haugen
email = h.haugen@gmail.com

View file

@ -56,7 +56,7 @@ if has("gui_running")
hi CursorLine guibg=#2e2e37
hi IncSearch gui=BOLD guifg=#303030 guibg=#cd8b60
hi Search gui=NONE guifg=#303030 guibg=#cd8b60
hi Search gui=NONE guifg=#303030 guibg=#ad7b57
hi ErrorMsg gui=BOLD guifg=#ffffff guibg=#ce4e4e
hi WarningMsg gui=BOLD guifg=#ffffff guibg=#ce8e4e
hi ModeMsg gui=BOLD guifg=#7e7eae guibg=NONE
@ -148,7 +148,7 @@ else
endif
exec "hi IncSearch cterm=BOLD ctermfg=" . <SID>X(80) . " ctermbg=" . <SID>X(73)
exec "hi Search cterm=NONE ctermfg=" . <SID>X(80) . " ctermbg=" . <SID>X(73)
exec "hi Search cterm=NONE ctermfg=" . <SID>X(80) . " ctermbg=" . <SID>X(52)
exec "hi ErrorMsg cterm=BOLD ctermfg=" . <SID>X(16) . " ctermbg=" . <SID>X(48)
exec "hi WarningMsg cterm=BOLD ctermfg=" . <SID>X(16) . " ctermbg=" . <SID>X(68)
exec "hi ModeMsg cterm=BOLD ctermfg=" . <SID>X(38) . " ctermbg=" . "NONE"

364
.vimrc
View file

@ -1,26 +1,22 @@
scriptencoding utf-8
"-----------------------------------------------------------------------
"BaSS vimrc based con ciaran
"Hunner's vimrc based on BaSS & ciaran
"-----------------------------------------------------------------------
"-----------------------------------------------------------------------
" terminal setup
"-----------------------------------------------------------------------
" Extra terminal things
" Want utf8 at all times
set termencoding=utf-8
set encoding=utf-8
" Turn off the menubar so we don't get key accelerators with Meta.
" Don't include the toolbar
set guioptions=aegiLt
"colorscheme ir_black
set fenc=utf-8
" change cursor colour depending upon mode
if exists('&t_SI')
let &t_SI = "\<Esc>]12;lightgoldenrod\x7"
let &t_EI = "\<Esc>]12;grey80\x7"
let &t_EI = "\<Esc>]12;green\x7"
endif
"-----------------------------------------------------------------------
@ -46,8 +42,7 @@ set shortmess=a
" Make backspace delete lots of things
set backspace=indent,eol,start
" Create backups
"set backup
" Don't create backups
set nobackup
" Show us the command we're typing
@ -60,7 +55,7 @@ set showmatch
set hlsearch
set incsearch
" Selective case insensitivity
" Case insensitivity
set ignorecase
set infercase
@ -87,8 +82,8 @@ set whichwrap+=<,>,[,]
" Use the cool tab complete menu
set wildmenu
set wildignore+=*.o,*~
set suffixes+=.in,.a
set wildignore+=*.o,*~,.lo
set suffixes+=.in,.a,.1
" Allow edit buffers to be hidden
set hidden
@ -101,6 +96,9 @@ if has("syntax")
syntax on
endif
" enable virtual edit in vblock mode, and one past the end
set virtualedit=block,onemore
" Set our fonts
if has("gui_kde")
set guifont=Terminus/12/-1/5/50/0/0/0/0/0
@ -116,6 +114,9 @@ if ! has("gui_running")
colors inkpot
else
colors ir_black
" Turn off the menubar so we don't get key accelerators with Meta.
" Don't include the toolbar
set guioptions=aegit
endif
" set background=light gives a different style, feel free to choose between them.
set background=dark
@ -131,7 +132,7 @@ set background=dark
" set guioptions-=R
"end
" By default, go for an indent of 4 tab stuff
" By default, go for an indent of 4 and use spaces
set expandtab
set shiftwidth=4
set tabstop=4
@ -145,6 +146,7 @@ inoremap # X<BS>#
if has("folding")
set foldenable
set foldmethod=marker
"set foldlevelstart=99
endif
" Syntax when printing
@ -169,6 +171,22 @@ set laststatus=2
set statusline=
set statusline+=%2*%-3.3n%0*\ " buffer number
set statusline+=%f\ " file name
if has("eval")
let g:scm_cache = {}
fun! ScmInfo()
let l:key = getcwd()
if ! has_key(g:scm_cache, l:key)
if (isdirectory(getcwd() . "/.git"))
let g:scm_cache[l:key] = "[" . substitute(readfile(getcwd() . "/.git/HEAD", "", 1)[0],
\ "^.*/", "", "") . "] "
else
let g:scm_cache[l:key] = ""
endif
endif
return g:scm_cache[l:key]
endfun
set statusline+=%{ScmInfo()} " scm info
endif
set statusline+=%h%1*%m%r%w%0* " flags
set statusline+=\[%{strlen(&ft)?&ft:'none'}, " filetype
set statusline+=%{&encoding}, " encoding
@ -206,9 +224,10 @@ endif
" Nice window title
if has('title') && (has('gui_running') || &title)
set titlestring=
set titlestring+=%f\ " file name
set titlestring+=%h%m%r%w " flags
set titlestring+=\ -\ %{v:progname} " program name
set titlestring+=%f\ " file name
set titlestring+=%h%m%r%w " flags
set titlestring+=\ -\ %{v:progname} " program name
set titlestring+=\ -\ %{substitute(getcwd(),\ $HOME,\ '~',\ '')} " working directory
endif
" If possible, try to use a narrow number column.
@ -226,6 +245,7 @@ endif
" Better include path
set path+=src/
let &inc.=' ["<]'
" Show tabs and trailing whitespace visually
if (&termencoding == "utf-8") || has("gui_running")
@ -241,7 +261,7 @@ else
set list listchars=tab:>-,trail:.,extends:>
endif
endif
map <F9> :set nolist listchars<CR>
map <silent> <F9> :set nolist listchars<CR>:set noet<CR>:set sw=8<CR>:set ts=8<CR>
" Show lines longer than 80 characters
"au BufWinEnter * let w:m1=matchadd('Search', '\%<81v.\%>77v', -1)
@ -273,7 +293,7 @@ if has("eval")
" If we're in a wide window, enable line numbers.
fun! <SID>WindowWidth()
if winwidth(0) > 90
setlocal foldcolumn=1
setlocal foldcolumn=2
setlocal number
else
setlocal nonumber
@ -284,9 +304,17 @@ endif
" content creation
if has("autocmd")
augroup content
autocmd!
augroup text
autocmd BufRead,BufNewFile *.txt
\ set nonumber tw=80
augroup END
augroup helphelp
" For help files, move them to the top window and make <Return>
" behave like <C-]> (jump to tag)
autocmd FileType help :call <SID>WindowToTop()
autocmd FileType help nmap <buffer> <Return> <C-]>
augroup END
augroup interplangs
autocmd BufNewFile *.rb 0put ='# vim: set sw=2 sts=2 et tw=80 :' |
\ 0put ='#!/usr/bin/env ruby' | set sw=2 sts=2 et tw=80 |
\ norm G
@ -297,7 +325,8 @@ if has("autocmd")
autocmd BufNewFile,BufRead *.php
\ set ai
augroup END
augroup html
autocmd BufNewFile *.htm,*.html
\ 0put ='<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">' |
\ $put ='<html xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">' |
@ -313,12 +342,18 @@ if has("autocmd")
\ $put ='</html>' |
\ $put ='<!-- vim: set sw=2 sts=2 et tw=80 : -->' |
\ set sw=2 sts=2 et tw=80 | norm G
augroup END
augroup autotools
autocmd BufNewFile *.hh 0put ='/* vim: set sw=4 sts=4 et foldmethod=syntax : */' |
\ 1put ='' | call MakeIncludeGuards() |
\ 5put ='#include \"config.h\"' |
\ set sw=4 sts=4 et tw=80 | norm G
autocmd BufNewFile *.c 0put ='/* vim: set sw=4 sts=4 et foldmethod=syntax : */' |
\ 1put ='' | 2put ='' | call setline(3, '#include "' .
\ substitute(expand("%:t"), ".c$", ".h", "") . '"') |
\ set sw=4 sts=4 et tw=80 | norm G
autocmd BufNewFile *.cc 0put ='/* vim: set sw=4 sts=4 et foldmethod=syntax : */' |
\ 1put ='' | 2put ='' | call setline(3, '#include "' .
\ substitute(expand("%:t"), ".cc$", ".hh", "") . '"') |
@ -328,25 +363,26 @@ if has("autocmd")
\ 0put ='dnl vim: set sw=8 sts=8 noet :' |
\ $put ='' |
\ call setline(line('$'), 'AC_INIT([' . substitute(expand('%:p:h'),
\ '^.\{-}/\([^/]\+\)\(/trunk\)\?$', '\1', '') . '], [0.0])') |
\ $put ='AC_PREREQ(2.5)' |
\ '^.\{-}/\([^/]\+\)\(/trunk\)\?$', '\1', '') . '], [0.1], [h.haugen@gmail.com])') |
\ $put ='AC_PREREQ(2.63)' |
\ $put ='AC_CONFIG_SRCDIR([])' |
\ $put ='AC_CONFIG_AUX_DIR(config)' |
\ $put ='AM_INIT_AUTOMAKE(1.9)' |
\ $put ='AM_INIT_AUTOMAKE([foreign -Wall -Werror 1.10])' |
\ $put ='' |
\ $put ='dnl check for required programs' |
\ $put ='AC_PROG_CXX' |
\ $put ='AC_PROG_CC dnl CXX' |
\ $put ='AC_PROG_INSTALL' |
\ $put ='AC_PROG_LN_S' |
\ $put ='AC_PROG_RANLIB' |
\ $put ='AC_PROG_MAKE_SET' |
\ $put ='' |
\ $put ='dnl output' |
\ $put ='AM_CONFIG_HEADER(config.h)' |
\ $put ='AC_OUTPUT(' |
\ $put ='AC_CONFIG_HEADERS([config.h])' |
\ $put ='AC_CONFIG_FILES([' |
\ $put =' Makefile' |
\ $put =' src/Makefile' |
\ $put =' )' |
\ $put ='])' |
\ $put ='AC_OUTPUT' |
\ set sw=8 sts=8 noet |
\ norm ggjjjjf]
@ -370,14 +406,15 @@ if has("autocmd")
\ $put ='}' |
\ $put ='' |
\ $put ='run mkdir -p config' |
\ $put ='run $(get libtoolize 1.5 ) --copy --force --automake' |
\ $put ='run $(get libtoolize 2.2 ) --copy --force --automake' |
\ $put ='rm -f config.cache' |
\ $put ='run $(get aclocal 1.9 )' |
\ $put ='run $(get autoheader 2.59 )' |
\ $put ='run $(get autoconf 2.59 )' |
\ $put ='run $(get automake 1.9 ) -a --copy' |
\ $put ='run $(get aclocal 1.10 )' |
\ $put ='run $(get autoheader 2.63 )' |
\ $put ='run $(get autoconf 2.63 )' |
\ $put ='run $(get automake 1.10 ) -a --copy' |
\ set sw=4 sts=4 et tw=80 |
\ norm gg=Ggg
autocmd BufWritePost autogen.bash !chmod 744 %
autocmd BufNewFile Makefile.am
\ 0put ='CLEANFILES = *~' |
@ -385,20 +422,94 @@ if has("autocmd")
\ $put ='MAINTAINERCLEANFILES = Makefile.in configure config/* aclocal.m4 \' |
\ $put ='' |
\ call setline(line('$'), "\t\t\tconfig.h config.h.in") |
\ $put ='SUBDIRS = src' |
\ $put ='AUTOMAKE_OPTIONS = foreign dist-bzip2' |
\ $put ='EXTRA_DIST = autogen.bash' |
\ $put ='' |
\ $put ='maintainer-clean-local:' |
\ $put =' -rmdir config' |
\ else |
\ $put ='MAINTAINERCLEANFILES = Makefile.in' |
\ $put ='bin_PROGRAMS = ' . substitute(expand('%:p:h'),'^.\{-}/\([^/]\+\)\(/src\)\?$', '\1', '') |
\ $put = substitute(expand('%:p:h'), '^.\{-}/\([^/]\+\)\(/src\)\?$','\1', '') . '_SOURCES = main.c' |
\ endif
augroup END
augroup making
try
" if we have a vim which supports QuickFixCmdPost (vim7),
" give us an error window after running make, grep etc, but
" only if results are available.
autocmd QuickFixCmdPost * botright cwindow 5
autocmd QuickFixCmdPre make
\ let g:make_start_time=localtime()
let g:paludis_configure_command = "! ./configure --prefix=/usr --sysconfdir=/etc" .
\ " --localstatedir=/var/lib --enable-qa " .
\ " --enable-ruby --enable-python --enable-vim --enable-bash-completion" .
\ " --enable-zsh-completion --with-repositories=all --with-clients=all --with-environments=all" .
\ " --enable-visibility --enable-gnu-ldconfig --enable-htmltidy" .
\ " --enable-ruby-doc --enable-python-doc --enable-xml"
" Similarly, try to automatically run ./configure and / or
" autogen if necessary.
autocmd QuickFixCmdPre make
\ if ! filereadable('Makefile') |
\ if ! filereadable("configure") |
\ if filereadable("autogen.bash") |
\ exec "! ./autogen.bash" |
\ elseif filereadable("quagify.sh") |
\ exec "! ./quagify.sh" |
\ endif |
\ endif |
\ if filereadable("configure") |
\ if (isdirectory(getcwd() . "/paludis/util")) |
\ exec g:paludis_configure_command |
\ elseif (match(getcwd(), "libwrapiter") >= 0) |
\ exec "! ./configure --prefix=/usr --sysconfdir=/etc" |
\ else |
\ exec "! ./configure" |
\ endif |
\ endif |
\ endif
autocmd QuickFixCmdPost make
\ let g:make_total_time=localtime() - g:make_start_time |
\ echo printf("Time taken: %dm%2.2ds", g:make_total_time / 60,
\ g:make_total_time % 60)
autocmd QuickFixCmdPre *
\ let g:old_titlestring=&titlestring |
\ let &titlestring="[ " . expand("<amatch>") . " ] " . &titlestring |
\ redraw
autocmd QuickFixCmdPost *
\ let &titlestring=g:old_titlestring
if hostname() == "snowmobile"
autocmd QuickFixCmdPre make
\ let g:active_line=getpid() . " vim:" . substitute(getcwd(), "^.*/", "", "") |
\ exec "silent !echo '" . g:active_line . "' >> ~/.config/awesome/active"
autocmd QuickFixCmdPost make
\ exec "silent !sed -i -e '/^" . getpid() . " /d' ~/.config/awesome/active"
endif
catch
endtry
augroup END
endif
"-----------------------------------------------------------------------
" mappings
"-----------------------------------------------------------------------
nmap <silent> <S-Right> :bnext<CR>
" Go to buffers
nmap <silent> <S-Left> :bprev<CR>
nmap <silent> <S-Right> :bnext<CR>
nmap <C-w>, :bp<CR>
nmap <C-w>. :bn<CR>
" v_K is really really annoying
vmap K k
@ -413,6 +524,8 @@ endif
nmap <Leader>cwc :cclose<CR>
nmap <Leader>cwo :botright copen 5<CR><C-w>p
nmap <Leader>cn :cnext<CR>
nmap - :cnext<CR>
nmap <Leader>cp :cprevious<CR>
" Annoying default mappings
inoremap <S-Up> <C-o>gk
@ -420,11 +533,21 @@ inoremap <S-Down> <C-o>gj
noremap <S-Up> gk
noremap <S-Down> gj
" Better Bépo movement
noremap © h
noremap þ j
noremap ß k
noremap ® l
" Make <space> in normal mode go down a page rather than left a
" character
" character, and backspace the opposite
noremap <space> <C-f>
noremap <backspace> <C-b>
" Scrolling with arrows controls the window
noremap <Up> <C-y>
noremap <Down> <C-e>
" Useful things from inside imode
inoremap <C-z>w <C-o>:w<CR>
inoremap <C-z>q <C-o>gq}<C-o>k<C-o>$
@ -434,10 +557,14 @@ inoremap <C-z>q <C-o>gq}<C-o>k<C-o>$
"imap <silent> <F3> <C-o>:silent nohlsearch<CR>
"nmap <F4> :Kwbd<CR>
"nmap <F5> <C-w>c
"nmap <F7> :make check<CR>
"nmap <F8> :make<CR>
"nmap <F10> :!svn update<CR>
"nmap <F11> :!svn status \| grep -v '^?' \| sort -k2<CR>
"nmap <F6> :exec "make check TESTS_ENVIRONMENT=true LOG_COMPILER=true XFAIL_TESTS="<CR>
"nmap <Leader><F6> :exec "make -C " . expand("%:p:h") . " check TESTS_ENVIRONMENT=true LOG_COMPILER=true XFAIL_TESTS="<CR>
nmap <F7> :make all-then-check<CR>
nmap <Leader><F7> :exec "make -C " . expand("%:p:h") . " check"<CR>
nmap <F8> :make<CR>
nmap <Leader><F8> :exec "make -C " . expand("%:p:h")<CR>
"nmap <F9> :exec "make -C " . expand("%:p:h") . " check SUBDIRS= check_PROGRAMS=" . GetCurrentTest()
" \ . " TESTS=" . GetCurrentTest() <CR>
" Insert a single char
noremap <Leader>i i<Space><Esc>r
@ -473,6 +600,9 @@ noremap <Leader>dbl :g/^$/d<CR>:nohls<CR>
noremap <Leader>enc :<C-w>execute
\ substitute(":'<,'>s/^.*/#&#/ \| :nohls", "#", input(">"), "g")<CR>
" Edit something in the current directory
noremap <Leader>ed :e <C-r>=expand("%:p:h")<CR>/<C-d>
" Enable fancy % matching
if has("eval")
runtime! macros/matchit.vim
@ -487,28 +617,98 @@ if has("digraphs")
endif
if has("eval")
" GNU format changelog entry
fun! MakeChangeLogEntry()
norm gg
/^\d
norm 2O
norm k
call setline(line("."), strftime("%Y-%m-%d") .
\ " J. Alberto Suárez López <bass@gentoo.org>")
norm 2o
call setline(line("."), "\t* ")
norm $
" Work out include guard text
fun! IncludeGuardText()
let l:p = substitute(substitute(getcwd(), "/trunk", "", ""), '^.*/', "", "")
let l:t = substitute(expand("%"), "[./]", "_", "g")
return substitute(toupper(l:p . "_GUARD_" . l:t), "-", "_", "g")
endfun
noremap <Leader>cl :call MakeChangeLogEntry()<CR>
" command aliases, can't call these until after cmdalias.vim is loaded
au VimEnter * if exists("loaded_cmdalias") |
\ call CmdAlias("mkdir", "!mkdir") |
\ call CmdAlias("cvs", "!cvs") |
\ call CmdAlias("svn", "!svn") |
\ call CmdAlias("commit", "!svn commit -m \"") |
\ call CmdAlias("upload", "make upload") |
\ endif
" Make include guards
fun! MakeIncludeGuards()
norm gg
/^$/
norm 2O
call setline(line("."), "#ifndef " . IncludeGuardText())
norm o
call setline(line("."), "#define " . IncludeGuardText() . " 1")
norm G
norm o
call setline(line("."), "#endif")
endfun
noremap <Leader>ig :call MakeIncludeGuards()<CR>
endif
" fast buffer switching
if v:version >= 700 && has("eval")
let g:switch_header_map = {
\ 'cc': 'hh',
\ 'hh': 'cc',
\ 'c': 'h',
\ 'h': 'c',
\ 'cpp': 'hpp',
\ 'hpp': 'cpp' }
fun! SwitchTo(f, split) abort
if ! filereadable(a:f)
echoerr "File '" . a:f . "' does not exist"
else
if a:split
new
endif
if 0 != bufexists(a:f)
exec ':buffer ' . bufnr(a:f)
else
exec ':edit ' . a:f
endif
endif
endfun
fun! SwitchHeader(split) abort
let filename = expand("%:p:r")
let suffix = expand("%:p:e")
if suffix == ''
echoerr "Cannot determine header file (no suffix)"
return
endif
let new_suffix = g:switch_header_map[suffix]
if new_suffix == ''
echoerr "Don't know how to find the header (suffix is " . suffix . ")"
return
end
call SwitchTo(filename . '.' . new_suffix, a:split)
endfun
fun! SwitchTest(split) abort
let filename = expand("%:p:r")
let suffix = expand("%:p:e")
if -1 != match(filename, '_TEST$')
let new_filename = substitute(filename, '_TEST$', '.' . suffix, '')
else
let new_filename = filename . '_TEST.' . suffix
end
call SwitchTo(new_filename, a:split)
endfun
fun! SwitchMakefile(split) abort
let dirname = expand("%:p:h")
if filereadable(dirname . "/Makefile.am.m4")
call SwitchTo(dirname . "/Makefile.am.m4", a:split)
elseif filereadable(dirname . "/Makefile.am")
call SwitchTo(dirname . "/Makefile.am", a:split)
else
call SwitchTo(dirname . "/Makefile", a:split)
endif
endfun
noremap <Leader>sh :call SwitchHeader(0)<CR>
noremap <Leader>st :call SwitchTest(0)<CR>
noremap <Leader>sk :call SwitchMakefile(0)<CR>
noremap <Leader>ssh :call SwitchHeader(1)<CR>
noremap <Leader>sst :call SwitchTest(1)<CR>
noremap <Leader>ssk :call SwitchMakefile(1)<CR>
endif
" super i_c-y / i_c-e
@ -614,6 +814,7 @@ if has("eval") && has("autocmd")
autocmd FileType cpp :call <SID>abbrev_cpp()
augroup END
endif
" NB: Need more of these for more than cpp
"-----------------------------------------------------------------------
" special less.sh and man modes
@ -658,12 +859,6 @@ if has("eval")
let ruby_operators=1
let ruby_space_errors=1
" clojure options
let g:clj_want_gorilla = 1
let g:clj_highlight_builtins = 1
let g:clj_highlight_contrib = 1
let g:clj_paren_rainbow = 1
" php specific options
let php_sql_query=1
let php_htmlInStrings=1
@ -675,7 +870,8 @@ if has("eval")
let Tlist_Compact_Format=1
let Tlist_WinWidth=28
let Tlist_Exit_OnlyWindow=1
let Tlist_File_Fold_Auto_Close = 1
let Tlist_File_Fold_Auto_Close=1
let Tlist_Inc_Winwidth=0
"nnoremap <silent> <F9> :Tlist<CR>
" Settings minibufexpl.vim
@ -749,7 +945,7 @@ endif
" final commands
"-----------------------------------------------------------------------
" mio
let Tlist_Ctags_Cmd="/usr/bin/exuberant-ctags"
"let Tlist_Ctags_Cmd="/usr/bin/exuberant-ctags"
" plegado ident para python
au FileType python set foldmethod=indent
" plegado syntax para sgml,htmls,xml y xsl
@ -780,11 +976,12 @@ map <S-F4> :set nu!<CR>
map <F5> ggVGg?
map <F6> :set encoding=utf-8<CR> | :set fenc=utf-8<CR>
map <S-F6> :set encoding=iso8859-15<CR> | :set fenc=iso8859-15<CR>
map <F7> :SpellProposeAlternatives<CR>
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>
"map <F7> :SpellProposeAlternatives<CR>
"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
@ -792,11 +989,13 @@ 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\ %
set errorformat=%A%f:%l:\ %m,%-Z%p^,%-C%.%#
map <F8> :make<CR>
"set makeprg=javac\ %
"set errorformat=%A%f:%l:\ %m,%-Z%p^,%-C%.%#
" CVS
nmap <leader>cadd <Plug>CVSAdd
@ -822,5 +1021,14 @@ if has("autocmd")
au VimEnter * nohls
endif
"ii irc stuff
" map c1 :.w! >> ~/irc/irc.cat.pdx.edu/in<cr>dd
" map c2 :.w! >> ~/irc/irc.cat.pdx.edu/\#hack/in<cr>dd
" map c3 :.w! >> ~/irc/irc.cat.pdx.edu/\#meow/in<cr>dd
" map c4 :.w! >> ~/irc/irc.cat.pdx.edu/\#rtttoee/in<cr>dd
" map c5 :.w! >> ~/irc/irc.cat.pdx.edu/\#robots/in<cr>dd
" map c17 :.w! >> ~/irc/irc.cat.pdx.edu/\#cschat/in<cr>dd
" imap /me <C-V><C-A>ACTION
"-----------------------------------------------------------------------
" vim: set shiftwidth=4 softtabstop=4 expandtab tw=72 :

View file

@ -6,13 +6,13 @@
import XMonad hiding (Tall)
import System.Exit
import XMonad.Layout.Circle
import XMonad.Layout.HintedTile
import XMonad.Layout.MagicFocus
import XMonad.Layout.Magnifier
import XMonad.Layout.NoBorders (noBorders, smartBorders)
import XMonad.Layout.ResizableTile
import XMonad.Layout.SimplestFloat
import XMonad.Layout.Circle
import XMonad.Layout.MagicFocus
import XMonad.Layout.Magnifier
import XMonad.Layout.HintedTile
import XMonad.Actions.CopyWindow
import XMonad.Actions.DynamicWorkspaces
import XMonad.Actions.GridSelect
@ -20,9 +20,10 @@ import XMonad.Actions.NoBorders
import XMonad.Actions.Warp(warpToScreen)
import XMonad.Actions.WindowBringer
import XMonad.Prompt
import XMonad.Util.EZConfig (additionalKeysP)
import XMonad.Util.EZConfig
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.SetWMName
import Data.Monoid
import Data.List
@ -32,7 +33,7 @@ import qualified XMonad.StackSet as W
import qualified Data.Map as M
-- mTerminal = "urxvt;ps -U $USER |grep dzen2|awk '{print $1}'|xargs kill -USR1"
mTerminal = "urxvt"
mTerminal = "urxvtc"
mBorderWidth = 1
mModMask = mod4Mask
@ -40,7 +41,7 @@ mModMask = mod4Mask
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
--
mWorkspaces :: [WorkspaceId]
mWorkspaces = map show [1 .. 9 :: Int]
mWorkspaces = map show [0 .. 9 :: Int]
-- Border colors for unfocused and focused windows, respectively.
--
@ -51,10 +52,12 @@ mFocusedBorderColor = "#dd0000"
--
mKeys = [ ("M-S-n", sendMessage MirrorShrink ) -- Expand current window
, ("M-S-t", sendMessage MirrorExpand ) -- Shrink current window
, ("M-r" , warpToCorner ) -- Kill the rodent
, ("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
@ -65,13 +68,14 @@ mKeys = [ ("M-S-n", sendMessage MirrorShrink ) -- Expand current window
, ("M-S-g", warpToCentre >> goToSelected gsConfig )
-- Multimedia
, ("<XF86AudioPlay>" , spawn "mpc toggle" ) -- play/pause mpd
, ("<XF86AudioStop>" , spawn "mpc stop" ) -- stop mpd
, ("<XF86AudioPrev>" , spawn "mpc prev" ) -- prev song
, ("<XF86AudioNext>" , spawn "mpc next" ) -- next song
, ("<XF86AudioLowerVolume>", spawn "mpc volume -3" ) -- volume down via custom script
, ("<XF86AudioRaiseVolume>", spawn "mpc volume +3" ) -- volume up via custom script
, ("<XF86AudioMute>" , spawn "amixer -q -- sset Headphone togglemute") -- toggle mute via custom script
, ("<XF86AudioPlay>" , spawn "cmus-remote --pause" ) -- play/pause mpd
, ("<XF86AudioStop>" , spawn "cmus-remote --stop" ) -- stop mpd
, ("<XF86AudioPrev>" , spawn "cmus-remote --prev" ) -- prev song
, ("<XF86AudioNext>" , spawn "cmus-remote --next" ) -- next song
, ("<XF86AudioLowerVolume>", spawn "amixer -q set PCM 1-") -- volume down
, ("<XF86AudioRaiseVolume>", spawn "amixer -q set PCM 1+") -- volume up
, ("<XF86AudioMute>" , spawn "amixer -q set Headphone toggle") -- toggle mute
, ("M-<XF86AudioMute>" , spawn "amixer -q set Speaker toggle")
-- Dynamic workspace commands
, ("M-S-<Backspace>" , removeWorkspace)
@ -84,21 +88,29 @@ mKeys = [ ("M-S-n", sendMessage MirrorShrink ) -- Expand current window
-- if there is a workspace existing target name that is empty, delete it before moving
-- else leave everything as it is (no move/rename)
]
++ -- mod-[1..9] %! Switch to workspace N if it exists
zip (map (("M-" ++) . show) [0..9]) (map (windows . W.greedyView) (workspaces mConfig))
++ -- mod-shift-[1..9] %! Move window to workspace N if it exists
zip (map (("M-S-" ++) . show) [0..9]) (map (windows . W.shift) (workspaces mConfig))
-- Don't auto-assign the key shortcuts to dynamic workspaces. I want them staying on [1..9] only
-- ++ -- mod-[1..9] %! Switch to Nth workspace that exists in alphabetical order
-- zip (map (("M-" ++) . show) [0..9]) (map (withNthWorkspace W.greedyView) [0..])
-- ++ -- mod-[1..9] %! Move window to Nth workspace that exists in alphabetical order
-- zip (map (("M-S-" ++) . show) [0..9]) (map (withNthWorkspace W.shift) [0..])
++ -- mod-{o,e,u} %! Switch to physical/Xinerama screens 0, 1, or 2
zip (map ("M-" ++) ["o","e","u"]) (map (\x -> screenWorkspace x >>= flip whenJust (windows . W.view)) [0..])
++ -- mod-shift-{o,e,u} %! Move client to screen 0, 1, or 2
zip (map ("M-S-" ++) ["o","e","u"]) (map (\x -> screenWorkspace x >>= flip whenJust (windows . W.shift)) [0..])
-- Don't auto-assign the key shortcuts to dynamic workspaces. I want them staying on [1..9] only
-- ++
-- zip (map (("M-" ++) . show) [1..9]) (map (withNthWorkspace W.greedyView) [0..])
-- ++
-- zip (map (("M-S-" ++) . show) [1..9]) (map (withNthWorkspace W.shift) [0..])
where -- Make the mouse jump to the middle of the screen for gridselect
warpToCentre = gets (W.screen . W.current . windowset) >>= \x -> warpToScreen x 0.5 0.5
warpToCorner = gets (W.screen . W.current . windowset) >>= \x -> warpToScreen x 1.0 1.0
promptedWs = wsgrid >>= \x -> whenJust x $ \y -> windows $ W.greedyView y
wsgrid = gridselect gsConfig =<< gets (map (\x -> (x,x)) . (map W.tag . W.workspaces . windowset))
--wsgrid = gridselect gsConfig =<< gets (map (\x -> (x,x)) . (map W.tag . uncurry (++) . partition (isJust . W.stack) . W.workspaces . windowset)) -- (map W.tag . W.workspaces . windowset))
mKeysExt = [((m .|. mModMask, k), f i) -- changing workspaces with bébo
| (i, k) <- zip ([0..]) [0x2a,0x22,0xab,0xbb,0x28,0x29,0x40,0x2b,0x2d,0x2f]
, (f, m) <- [(withNthWorkspace W.greedyView, 0), (withNthWorkspace W.shift, shiftMask)]]
{-
[10:28] dschoepe : gets (map W.tag . W.workspaces . windowset) should work
[10:31] aavogt : somewhat useful variation on that is:
@ -159,12 +171,16 @@ mManageHook = composeAll
, title =? "VLC media player" --> doFloat
, className =? "Gimp" --> doFloat
, className =? "Anki" --> doFloat
, className =? "XCalc" --> doFloat
, className =? "XClock" --> doFloat
, className =? "Skype" --> doFloat
, className =? "googleearth" --> doFloat
, className =? "Pidgin" --> doFloat
, className =? "mangclient" --> doFloat
, className =? "CellWriter" --> doFloat
, className =? "Gvba" --> doFloat
, className =? "Thunar" --> doFloat
, className =? "feh" --> doFloat
, className =? "Cellwriter" --> doIgnore
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore
@ -195,17 +211,19 @@ pickyFocusEventHook _ = return $ All True
-- Run xmonad!
--
main = do
xmonad $ defaultConfig
{ terminal = mTerminal
, focusFollowsMouse = mFocusFollowsMouse
, borderWidth = mBorderWidth
, modMask = mModMask
, workspaces = mWorkspaces
, normalBorderColor = mNormalBorderColor
, focusedBorderColor = mFocusedBorderColor
, layoutHook = mLayout
, manageHook = mManageHook
, handleEventHook = pickyFocusEventHook
, startupHook = ewmhDesktopsStartup >> setWMName "LG3D"
} `additionalKeysP` mKeys
main = xmonad $ mConfig
mConfig = defaultConfig
{ terminal = mTerminal
, focusFollowsMouse = mFocusFollowsMouse
, borderWidth = mBorderWidth
, modMask = mModMask
, workspaces = mWorkspaces
, normalBorderColor = mNormalBorderColor
, focusedBorderColor = mFocusedBorderColor
, layoutHook = mLayout
, manageHook = mManageHook
, handleEventHook = pickyFocusEventHook
, startupHook = do
ewmhDesktopsStartup >> setWMName "LG3D"
return () >> checkKeymap mConfig mKeys
} `additionalKeysP` mKeys `additionalKeys` mKeysExt

73
.zshrc
View file

@ -1,11 +1,11 @@
# Options
setopt appendhistory autocd extendedglob nomatch notify dvorak # correct
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
compinit -u
bindkey '^L' push-line
#bindkey '^L' push-line
bindkey "^I" expand-or-complete-prefix
umask 022
@ -19,20 +19,29 @@ esac
#export LD_LIBRARY_PATH=/opt/csw/lib
#zsh's path
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
export MANPATH=/usr/man:/usr/share/man
paths=(~/.cabal/bin /cat/bin /cat/games/bin /opt/csw/sbin /opt/csw/bin
/pkgs/ghc/current/bin /usr/sfw/sbin /usr/sfw/bin /opt/SUNWut/sbin
/opt/SUNWut/bin /usr/ccs/bin /usr/local/bin /usr/openwin/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)
prepaths=(~/.cabal/bin ~/local/bin ~/local/sbin ~/local/share/bin)
for dir in $paths ; do
if [ -d $dir ] ; then
export PATH=$PATH:$dir
if [ -d `dirname $dir` ] ; then
if [ -d `dirname $dir`/man ] ; then
export MANPATH=$MANPATH:`dirname $dir`/man
fi
fi
done
for dir in $prepaths ; do
if [ -d $dir ] ; then
export PATH=$dir:$PATH
if [ -d `dirname $dir`/man ] ; then
export MANPATH=`dirname $dir`/man:$MANPATH
fi
fi
done
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
@ -40,11 +49,6 @@ if test -d /etc/profile.d/; then
done
unset profile
fi
if [ -d ~/local/bin ] ; then
export PATH=~/local/bin:~/local/sbin:$PATH
export MANPATH=~/local/man:$MANPATH
export MANPATH=~/local/share/man:$MANPATH
fi
#gem's path
if [ -d ~/.gems/bin ] ; then
export PATH="$HOME/.gems/bin:$PATH"
@ -58,8 +62,8 @@ fi
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=10000
SAVEHIST=10000
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.history
PS1="%m%# "
export LANG="en_US.UTF-8"
@ -73,7 +77,9 @@ export LC_COLLATE="C" #order files in ls
export DIALOGOPTS='--visit-items'
export MAIL=~/mail
export MAILCHECK=0
export AWT_TOOLKIT=MToolkit
#export AWT_TOOLKIT=MToolkit
#export AWT_TOOLKIT=XToolkit
export _JAVA_AWT_WM_NONREPARENTING=1
if [ -x `which less` ] ; then
export PAGER==less
else
@ -119,7 +125,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"
@ -150,7 +157,7 @@ alias rm=rm; unalias rm #hack
alias gem="nice -n19 gem"
alias uzbl="uzbl-browser"
#startup aliases
alias -s pdf="xpdf"
alias -s pdf="zathura"
alias -s txt="vi"
alias -s flv="mplayer"
alias -s avi="mplayer"
@ -171,33 +178,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() {
if [ `uname -s` = "SunOS" ] ; then
if [ x`hostname` = x"chandra.cs.pdx.edu" ] ; then
xmodmap ~/keymaps/eo_dv_hunner_type7.pke
else
xmodmap ~/keymaps/eo_dv_hunner_type7.pke
fi
else
if [ x`hostname` = x"ni" ] ; then
xmodmap ~/keymaps/nu_x61.pke
else
xmodmap ~/keymaps/nu_std.pke
fi
fi
}
aoeu() {
if [ `uname -s` = "SunOS" ] ; then
xmodmap ~/keymaps/original-type7-sol.pke
else
if [ x`hostname` = x"ni" ] ; then
xmodmap ~/keymaps/qwerty_x61.pke
else
xmodmap ~/keymaps/kvar.pke
fi
fi
}
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

View file

@ -8,64 +8,64 @@ clear Mod4
clear Mod5
keycode 8 =
keycode 9 = Escape dead_circumflex dead_grave dead_tilde NoSymbol Escape
keycode 10 = 7 ampersand 7 ampersand 7 ampersand
keycode 11 = 5 percent EuroSign cent 5 percent
keycode 12 = 3 numbersign 3 numbersign 3 numbersign
keycode 9 = Escape dead_circumflex dead_grave dead_tilde Escape
keycode 10 = 7 ampersand 7 ampersand 7 ampersand 7 ampersand
keycode 11 = 5 percent EuroSign cent 5 percent 5 percent EuroSign
keycode 12 = 3 numbersign 3 numbersign 3 numbersign sterling
keycode 13 = 1 exclam 1 exclam 1 exclam
keycode 14 = 9 parenleft leftsinglequotemark leftdoublequotemark 9 parenleft
keycode 15 = 0 parenright rightsinglequotemark rightdoublequotemark 0 parenright
keycode 14 = 9 parenleft leftsinglequotemark leftdoublequotemark 9 parenleft degree
keycode 15 = 0 parenright rightsinglequotemark rightdoublequotemark 0 parenright plusminus
keycode 16 = 2 at 2 at 2 at
keycode 17 = 4 dollar 4 dollar 4 dollar
keycode 18 = 6 asciicircum dead_circumflex asciicircum 6 asciicircum
keycode 19 = 8 asterisk 8 asterisk 8 asterisk
keycode 20 = bracketleft braceleft bracketleft braceleft bracketleft braceleft
keycode 21 = bracketright braceright bracketright braceright bracketright braceright
keycode 22 = BackSpace bar BackSpace brokenbar BackSpace bar
keycode 20 = bracketleft braceleft bracketleft braceleft bracketleft braceleft dead_dasia dead_dasia
keycode 21 = bracketright braceright bracketright braceright bracketright braceright dead_psili dead_psili
keycode 22 = BackSpace bar BackSpace brokenbar BackSpace
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 24 = apostrophe quotedbl dead_acute dead_diaeresis apostrophe quotedbl
keycode 25 = comma less dead_cedilla dead_caron comma less
keycode 26 = period greater dead_breve dead_abovedot period greater
keycode 27 = p P paragraph P p P
keycode 28 = y Y yen heart y Y
keycode 29 = f F f F f F
keycode 30 = g G gcircumflex Gcircumflex g G
keycode 31 = c C ccircumflex Ccircumflex c C
keycode 32 = r R r R r R
keycode 33 = l L l L l L
keycode 34 = slash question dead_hook dead_hook slash question
keycode 24 = apostrophe quotedbl dead_acute dead_diaeresis apostrophe quotedbl dead_grave dead_grave
keycode 25 = comma less dead_cedilla dead_caron comma greater guillemotleft
keycode 26 = period greater dead_breve dead_abovedot period less guillemotright
keycode 27 = p P paragraph P Greek_pi Greek_PI
keycode 28 = y Y yen heart Greek_upsilon Greek_UPSILON
keycode 29 = f F f F Greek_phi Greek_PHI
keycode 30 = g G gcircumflex Gcircumflex Greek_gamma Greek_GAMMA
keycode 31 = c C ccircumflex Ccircumflex Greek_psi Greek_PSI copyright
keycode 32 = r R r R Greek_rho Greek_RHO registered
keycode 33 = l L l L Greek_lamda Greek_LAMDA
keycode 34 = slash question dead_hook question slash question slash question
keycode 35 = equal plus dead_doubleacute dead_horn equal plus
keycode 36 = Return NoSymbol Return NoSymbol Return
keycode 37 = Control_L NoSymbol Control_L NoSymbol Control_L
keycode 38 = a A a A a A
keycode 39 = o O o O o O
keycode 40 = e E EuroSign cent e E
keycode 41 = u U U016D U016C u U
keycode 42 = i I i I i I
keycode 43 = d D d D d D
keycode 44 = h H hcircumflex Hcircumflex h H
keycode 45 = t T t T t T
keycode 46 = n N n N n N
keycode 47 = s S scircumflex Scircumflex s S
keycode 48 = minus underscore dead_macron dead_belowdot minus underscore
keycode 49 = grave asciitilde dead_grave dead_tilde grave asciitilde
keycode 38 = a A a A Greek_alpha Greek_ALPHA
keycode 39 = o O o O Greek_omicron Greek_OMICRON
keycode 40 = e E EuroSign cent Greek_epsilon Greek_EPSILON EuroSign
keycode 41 = u U U016D U016C Greek_theta Greek_THETA
keycode 42 = i I i I Greek_iota Greek_IOTA dead_iota dead_iota
keycode 43 = d D d D Greek_delta Greek_DELTA
keycode 44 = h H hcircumflex Hcircumflex Greek_eta Greek_ETA
keycode 45 = t T t T Greek_tau Greek_TAU
keycode 46 = n N n N Greek_nu Greek_NU
keycode 47 = s S scircumflex Scircumflex Greek_sigma Greek_SIGMA
keycode 48 = minus underscore dead_macron dead_belowdot minus underscore minus underscore
keycode 49 = grave asciitilde dead_grave dead_tilde grave asciitilde dead_grave dead_tilde
keycode 50 = Shift_L NoSymbol Shift_L NoSymbol Shift_L
keycode 51 = backslash bar brokenbar brokenbar backslash bar
keycode 52 = semicolon colon dead_ogonek dead_diaeresis semicolon colon
keycode 53 = q Q q Q q Q
keycode 54 = j J jcircumflex Jcircumflex j J
keycode 55 = k K k K k K
keycode 56 = x X x X x X
keycode 57 = b B b B b B
keycode 58 = m M m M m M
keycode 59 = w W w W w W
keycode 60 = v V v V v V
keycode 61 = z Z z Z z Z
keycode 62 = Shift_R NoSymbol Shift_R NoSymbol Shift_R
keycode 52 = semicolon colon dead_ogonek dead_diaeresis dead_acute dead_diaeresis dead_psili dead_psili
keycode 53 = q Q q Q semicolon colon periodcentered
keycode 54 = j J jcircumflex Jcircumflex Greek_xi Greek_XI
keycode 55 = k K k K Greek_kappa Greek_KAPPA
keycode 56 = x X x X Greek_chi Greek_CHI
keycode 57 = b B b B Greek_beta Greek_BETA
keycode 58 = m M m M Greek_mu Greek_MU
keycode 59 = w W w W Greek_finalsmallsigma Greek_SIGMA
keycode 60 = v V v V Greek_omega Greek_OMEGA
keycode 61 = z Z z Z Greek_zeta Greek_ZETA
keycode 62 = Shift_R ISO_Next_Group ISO_Group_Shift ISO_Next_Group ISO_Group_Shift ISO_First_Group
keycode 63 = KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L
keycode 65 = space NoSymbol space NoSymbol space
keycode 66 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock
keycode 66 = Mode_switch NoSymbol Mode_switch NoSymbol Mode_switch
keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3
@ -91,7 +91,7 @@ keycode 88 = KP_Down KP_2 KP_Down KP_2 KP_Down KP_2
keycode 89 = KP_Next KP_3 KP_Next KP_3 KP_Next KP_3
keycode 90 = KP_Insert KP_0 KP_Insert KP_0 KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal
keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 92 = Shift_R NoSymbol Shift_R NoSymbol Shift_R
keycode 93 =
keycode 94 = less greater less greater bar brokenbar
keycode 95 = F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11
@ -107,7 +107,7 @@ keycode 104 = KP_Enter NoSymbol KP_Enter NoSymbol KP_Enter
keycode 105 = Control_R NoSymbol Control_R NoSymbol Control_R
keycode 106 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab
keycode 107 = Print Sys_Req Print Sys_Req Print Sys_Req
keycode 108 = Alt_R Meta_R Alt_R Meta_R Alt_R Meta_R
keycode 108 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock
keycode 109 = Linefeed NoSymbol Linefeed NoSymbol Linefeed
keycode 110 = Home NoSymbol Home NoSymbol Home
keycode 111 = Up NoSymbol Up NoSymbol Up
@ -202,7 +202,7 @@ keycode 199 =
keycode 200 =
keycode 201 =
keycode 202 =
keycode 203 = Mode_switch NoSymbol Mode_switch NoSymbol Mode_switch
keycode 203 = Alt_R Meta_R Alt_R Meta_R Alt_R Meta_R
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L NoSymbol Alt_L
keycode 205 = NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_L
keycode 206 = NoSymbol Super_L NoSymbol Super_L NoSymbol Super_L
@ -212,7 +212,7 @@ keycode 209 = XF86AudioPause NoSymbol XF86AudioPause NoSymbol XF86AudioPause
keycode 210 = XF86Launch3 NoSymbol XF86Launch3 NoSymbol XF86Launch3
keycode 211 = XF86Launch4 NoSymbol XF86Launch4 NoSymbol XF86Launch4
keycode 212 =
keycode 213 = XF86Suspend NoSymbol XF86Suspend NoSymbol XF86Suspend
keycode 213 =
keycode 214 = XF86Close NoSymbol XF86Close NoSymbol XF86Close
keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay
keycode 216 = XF86Forward NoSymbol XF86Forward NoSymbol XF86Forward
@ -256,37 +256,11 @@ keycode 253 =
keycode 254 =
keycode 255 =
!Original
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Control_L (0x25)
!control , Control_R (0x6d), Caps_Lock (0x42)
!mod1 Alt_L (0x40), Alt_R (0x71), Meta_L (0x9c)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0x7f), Hyper_L (0x80)
!mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
!2nd
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Caps_Lock (0x25)
!control , Control_R (0x6d), Control_L (0x42)
!mod1 Alt_L (0x40), Alt_L (0x7d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c), Meta_L (0x9c)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0x73), Super_L (0x7f), Hyper_L (0x80)
!mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c)
add shift = Shift_L Shift_R
add lock = Caps_Lock
add control = Control_L Control_R
add mod1 = Alt_L Meta_L Alt_R Meta_R
add mod2 = Mode_switch
add mod3 = Num_Lock
add mod4 = Super_L Hyper_L Super_R Hyper_R
add mod5 = ISO_Level3_Shift
!remove Lock = Caps_Lock
!add Control = Caps_Lock
!remove Control = Control_L
!add Lock = Control_L
!keysym Caps_Lock = Mode_switch
add Shift = Shift_L Shift_R
add Lock = Caps_Lock
add Control = Control_L Control_R
add Mod1 = Alt_L Meta_L Alt_R Meta_R
add Mod2 = Num_Lock
add Mod3 = ISO_Level3_Shift
add Mod4 = Super_L Hyper_L Super_R Hyper_R
!add Mod5 = Mode_switch

View file

@ -0,0 +1,100 @@
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_geometry { include "thinkpad(us)" };
xkb_symbols "hunner" {
include "pc+us(dvorak)+inet(evdev)"
name[group1]="Dvorak";
//name[group2]="Colemak";
//name[group3]="QGMLWB";
// Alphanumeric section
// Unmodified Shift AltGr Shift+AltGr
key <ESC> { [ grave, asciitilde, dead_grave, dead_tilde ] };
// Number row, left side
key <TLDE> { [ Escape ] };
key <AE01> { [ 7, ampersand ] };
key <AE02> { [ 5, percent, EuroSign, cent ] };
key <AE03> { [ 3, numbersign, sterling, sterling ] };
key <AE04> { [ 1, exclam, 1, exclamdown ] };
key <AE05> { [ 9, parenleft, dead_grave ] };
// Number row, right side
key <AE06> { [ 0, parenright ] };
key <AE07> { [ 2, at ] };
key <AE08> { [ 4, dollar ] };
key <AE09> { [ 6, asciicircum, dead_circumflex, dead_circumflex ] };
key <AE10> { [ 8, asterisk ] };
key <AE11> { [ minus, underscore, endash, emdash ] };
key <AE12> { [ equal, plus, multiply, division ] };
key <BKSP> { [ backslash, bar ] };
// Upper row, left side
key <TAB> { [ Tab, ISO_Left_Tab ] };
key <AD01> { [ q, Q ] };
key <AD02> { [ g, G, gcircumflex, Gcircumflex ] };
key <AD03> { [ m, M ] };
key <AD04> { [ l, L ] };
key <AD05> { [ w, W ] };
// Upper row, right side
key <AD06> { [ b, B ] };
key <AD07> { [ y, Y, yen, heart ] };
key <AD08> { [ u, U, U016D, U016C ] };
key <AD09> { [ v, V ] };
key <AD11> { [ semicolon, colon, dead_ogonek, dead_diaeresis ] };
key <AD12> { [ bracketleft, braceleft, hyphen ] };
key <AD13> { [ bracketright, braceright, dead_tilde ] };
key <BKSL> { [ BackSpace, bar, brokenbar ] };
// Home row, left side
key <CAPS> { [ Control_L ] };
key <AC01> { [ d, D ] };
key <AC02> { [ s, S, scircumflex, Scircumflex ] };
key <AC03> { [ t, T, ssharp, ssharp ] };
key <AC04> { [ n, N ] };
key <AC05> { [ r, R ] };
// Home row, right side
key <AC06> { [ i, I ] };
key <AC07> { [ a, A ] };
key <AC08> { [ e, E, EuroSign ] };
key <AC09> { [ o, O ] };
key <AC10> { [ h, H, hcircumflex, Hcircumflex ] };
key <AC11> { [ apostrophe, quotedbl, dead_acute, dead_diaeresis ] };
key <RTRN> { [ Return ] };
// Lower row, left side
key <LFSH> { [ Shift_L ] };
key <AB01> { [ z, Z ] };
key <AB02> { [ x, X ] };
key <AB03> { [ c, C, ccircumflex, Ccircumflex ] };
key <AB04> { [ f, F ] };
key <AB05> { [ j, J, jcircumflex, Jcircumflex ] };
// Lower row, right side
key <AB06> { [ k, K ] };
key <AB07> { [ p, P, paragraph ] };
key <AB08> { [ comma, less, dead_cedilla, dead_caron ] };
key <AB09> { [ period, greater, dead_breve, dead_abovedot ] };
key <AB10> { [ slash, question, dead_hook, questiondown ] };
key <RTSH> { [ Shift_R ] };
// Mod row
key <LCTL> { [ Caps_Lock ] };
key <LWIN> { [ Super_L ] };
key <SPCE> { [ space, space ] };
key <COMP> { [ Super_R ] };
// key <COMP> { [ Menu ] };
modifier_map Lock { <LCTL> };
modifier_map Control { <CAPS> };
include "group(alts_toggle)+level3(ralt_switch_for_alts_toggle)"
};
};

View file

@ -5,13 +5,15 @@ xkb_keymap {
xkb_geometry { include "thinkpad(us)" };
xkb_symbols "hunner" {
include "pc+us(dvorak)+inet(evdev)"
include "pc+us(dvorak)+inet(evdev)+group(win_switch)"
name[group1]="Dvorak";
//name[group2]="Colemak";
//name[group3]="QGMLWB";
// Alphanumeric section
// Unmodified Shift AltGr Shift+AltGr
key <ESC> { [ backslash, bar ] };
key <ESC> { [ grave, asciitilde, dead_grave, dead_tilde ] };
// Number row, left side
key <TLDE> { [ Escape ] };
@ -29,7 +31,7 @@ xkb_keymap {
key <AE10> { [ 8, asterisk ] };
key <AE11> { [ bracketleft, braceleft, hyphen ] };
key <AE12> { [ bracketright, braceright, dead_tilde ] };
key <BKSP> { [ grave, asciitilde, dead_grave, dead_tilde ] };
key <BKSP> { [ backslash, bar ] };
// Upper row, left side
key <TAB> { [ Tab, ISO_Left_Tab ] };
@ -38,7 +40,6 @@ xkb_keymap {
key <AD03> { [ period, greater, dead_breve, dead_abovedot ] };
key <AD04> { [ p, P, paragraph ] };
key <AD05> { [ y, Y, yen, heart ] };
key <BKSL> { [ BackSpace, bar, brokenbar ] };
// Upper row, right side
key <AD06> { [ f, F ] };
@ -48,7 +49,7 @@ xkb_keymap {
key <AD10> { [ l, L ] };
key <AD11> { [ slash, question, dead_hook, questiondown ] };
key <AD12> { [ equal, plus, multiply, division ] };
key <RTRN> { [ Return ] };
key <BKSL> { [ BackSpace, bar, brokenbar ] };
// Home row, left side
key <CAPS> { [ Control_L ] };
@ -65,6 +66,7 @@ xkb_keymap {
key <AC09> { [ n, N ] };
key <AC10> { [ s, S, scircumflex, Scircumflex ] };
key <AC11> { [ minus, underscore, endash, emdash ] };
key <RTRN> { [ Return ] };
// Lower row, left side
key <LFSH> { [ Shift_L ] };