Merge remote-tracking branch 'origin/master' into phoenix

Conflicts:
	.emacs.d/init.el
This commit is contained in:
Tom Willemsen 2012-09-25 22:20:43 +02:00
commit 5b8d412cf7
6 changed files with 160 additions and 82 deletions

View file

@ -16,10 +16,9 @@ urxvt.perl-ext-common: default,matcher,searchable-scrollback
urxvt.urlLauncher: firefox
urxvt.matcher.button: 1
urxvt.font: xft:osaka_unicode:weight=medium:pixelsize=18
urxvt.boldFont: xft:osaka_unicode:weight=black:pixelsize=18
urxvt.italicFont: xft:osaka_unicode:slant=italic:pixelsize=18
! urxvt.transparent: true
urxvt.font: xft:Monaco:weight=medium:pixelsize=18
urxvt.boldFont: xft:Monaco:weight=black:pixelsize=18
urxvt.italicFont: xft:Monaco:slant=italic:pixelsize=18
urxvt.background: #252a2b
urxvt.foreground: #eeeeec
@ -53,11 +52,11 @@ Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
Emacs.font: DejaVu Sans Mono:weight=medium:pixelsize=18
! Emacs.font: DejaVu Sans Mono:weight=medium:pixelsize=18
Emacs.menuBar: off
Emacs.toolbar: off
Emacs.useXIM: off
Emacs.background: #252a2b
! Emacs.background: #252a2b
xfontsel.sampleText: \
static void print_sample_message(XWindow *win) {\n\

View file

@ -268,7 +268,7 @@ root.buttons(awful.util.table.join(
local bind = keychain
local sub = keychain.sub
globalkeys = awful.util.table.join(
bind({ "Control", }, "z",
bind({ "Control", }, "i",
{ sub({ }, "o",
function ()
awful.client.focus.byidx(1)

View file

@ -122,7 +122,7 @@ define_webjump("ddg",
$alternative="https://duckduckgo.com");
define_webjump("metal-archives",
"http://www.metal-archives.com/search?searchString=%s&type=band_name",
$alternative="http://www.metal-arhives.com");
$alternative="http://www.metal-archives.com");
define_webjump("djangodocs",
"https://docs.djangoproject.com/search/?q=%s&release=5",
$alternative="https://docs.djangoproject.com/");

View file

@ -26,7 +26,6 @@
(autoload 'identica-mode "identica-mode" nil t)
(autoload 'jabber-connect "jabber" nil t)
(autoload 'mu4e "mu4e" nil t)
(autoload 'naquadah-get-colors "naquadah-theme")
(autoload 'php-mode "php-mode" nil t)
(autoload 'po-mode "po-mode" nil t)
(autoload 'pony-mode "pony-mode" nil t)
@ -48,32 +47,6 @@
(defalias 'yes-or-no-p 'y-or-n-p)
(defconst oni:c-outline-regex
(eval-when-compile
(concat
"\\(?:static\\s +\\)?\\(?:\\sw+\\(?: \\|\t\\|\n\\)*?\\*?\\)"
"\\(?:\\s \\|\t\\|\n\\)\\(?:\\sw\\|_\\)+([^)]*)[^;\n]*$"))
"Regex for command `outline-minor-mode' for `c-mode'.")
(defconst oni:javascript-outline-regex "function \\(\\w\\|_\\)+("
"Regex for command `outline-minor-mode' for `js-mode'.")
(defconst oni:php-outline-regex
(eval-when-compile
(concat
"^ *\\(\\(?:namespace\\|interface\\) [a-zA-Z0-9_]\\|\\(\\(abstract"
"\\|final\\) \\)?class [a-zA-Z0-9_]+\\( extends [\\a-zA-Z0-9_]+\\)?"
"\\|\\(abstract \\)?\\(public\\|private\\|protected\\)?"
"\\( static\\)? function [a-zA-Z0-9_]+(\\|/\\*\\*\\)"))
"Regex for command `outline-minor-mode' for `php-mode'.")
(defconst oni:python-outline-regex
(eval-when-compile
(concat "^[ \t]*\\(?:@[a-zA-Z0-9_]+\\(?:([a-zA-Z0-9_=, ]*)\\)?"
"\n\\)*[ \t]*\\(?:\\(class\\|def\\)[ \t]+\\(\\sw\\|\\s_\\)+"
"\\(([^)]*):\\)?\\|\\#[ a-zA-Z0-9]*\\#\\)"))
"Regex for command `outline-minor-mode' for `python-mode'.")
(defface oni:mode-line-buffer-column
'((t (:inherit font-lock-type-face)))
"Face for the column number in the mode-line"
@ -127,20 +100,6 @@ DOT are intentionally being skipped."
(concat (symbol-name user) "@" (symbol-name host) "."
(symbol-name com)))
(defmacro oni:generic-outline (regex)
"Prepare for enabling command `outline-minor-mode'.
Argument REGEX will be used to set `outline-regexp' for this buffer."
`(progn
(when (buffer-file-name)
(outline-minor-mode)
(set (make-local-variable 'outline-regexp) ,regex)
(hide-body)
(local-set-key [C-tab] 'outline-toggle-children))))
(defmacro oni:color (name)
"Fetch color NAME from the naquadah color theme."
`(naquadah-get-colors (quote ,name)))
(defvar oni:mailbox-map
'("top" ("menu"
("ryulash.org" . "ryuslash")
@ -174,9 +133,7 @@ Argument REGEX will be used to set `outline-regexp' for this buffer."
(defun oni:c-mode-common-func ()
"Function for `c-mode-common-hook'."
(setq hs-adjust-block-beginning 'hs-c-like-adjust-block-beginning)
(when (buffer-file-name)
(hs-minor-mode)))
)
(defun oni:c-mode-func ()
"Function for `c-mode-hook'."
@ -206,9 +163,6 @@ Argument REGEX will be used to set `outline-regexp' for this buffer."
(defun oni:css-mode-func ()
"Function for `css-mode-hook'."
(setq hs-adjust-block-beginning 'hs-c-like-adjust-block-beginning)
(when (buffer-file-name)
(hs-minor-mode))
(local-set-key "\C-j" 'oni:newline-and-indent)
(rainbow-mode))
@ -218,9 +172,7 @@ Argument REGEX will be used to set `outline-regexp' for this buffer."
(defun oni:emacs-lisp-mode-func ()
"Function for `emacs-lisp-mode-hook'."
(eldoc-mode)
(when (buffer-file-name)
(hs-minor-mode)))
(eldoc-mode))
(defun oni:emms-toggle-playing ()
"Toggle between playing/paused states."
@ -251,8 +203,8 @@ Argument REGEX will be used to set `outline-regexp' for this buffer."
(concat
(propertize (char-to-string status)
'face `(:foreground ,(if (= status ?+)
(oni:color chameleon-1)
(oni:color scarlet-red-2))))
"green"
"red")))
" "
(propertize (substring hostname 0 -1) 'face 'mode-line-buffer-id)
" "
@ -265,7 +217,7 @@ Argument REGEX will be used to set `outline-regexp' for this buffer."
'face 'font-lock-function-name-face))
" \n"
(propertize (char-to-string userstatus)
'face `(:foreground ,(oni:color sky-blue-1)))
'face `(:foreground "blue"))
"> ")))
(defun oni:flymake-mode-func ()
@ -279,7 +231,7 @@ Argument REGEX will be used to set `outline-regexp' for this buffer."
'flymake-create-temp-inplace))
(local-file (file-relative-name temp-file (file-name-directory
buffer-file-name))))
(list "pyflakes" (list local-file))))
(list "pycheck.sh" (list local-file))))
(defun oni:go-mode-func ()
"Function for `go-mode-hook'."
@ -291,11 +243,6 @@ Argument REGEX will be used to set `outline-regexp' for this buffer."
(local-set-key "\M-," 'gtags-find-tag)
(local-set-key "\M-." 'gtags-find-rtag))
(defun oni:hs-minor-mode-func ()
"Function for `hs-minor-mode-hook'."
(local-set-key [C-tab] 'hs-toggle-hiding)
(hs-hide-all))
(defun oni:html-mode-func ()
"Function for `html-mode-hook'."
(fci-mode))
@ -359,7 +306,6 @@ If COUNT has been specified indent by that much, otherwise look at
(defun oni:js-mode-func ()
"Function for `js-mode-hook'."
(oni:generic-outline oni:javascript-outline-regex)
(rainbow-delimiters-mode)
(local-set-key "\C-j" 'oni:newline-and-indent)
(pretty-symbols-mode -1))
@ -394,8 +340,7 @@ If COUNT has been specified indent by that much, otherwise look at
(defun oni:lisp-mode-func ()
"Function for `lisp-mode-hook'."
(when (buffer-file-name)
(hs-minor-mode)))
)
(defun oni:lua-mode-func()
"Function for `lisp-mode-hook'."
@ -527,11 +472,9 @@ When dealing with braces, add another line and indent that too."
(flymake-mode)
(local-set-key (kbd "C->") 'python-indent-shift-right)
(local-set-key (kbd "C-<") 'python-indent-shift-left)
(local-set-key [C-tab] 'outline-toggle-children)
(oni:generic-outline oni:python-outline-regex)
(set (make-local-variable 'electric-indent-chars) nil)
(rainbow-delimiters-mode)
(setq fci-rule-column 80
(setq fci-rule-column 79
fill-column 72)
(fci-mode))
@ -598,8 +541,7 @@ use. If MODE is not nil, open a new buffer with the name
(defun oni:scheme-mode-func ()
"Function for `scheme-mode-hook'."
(when (buffer-file-name)
(hs-minor-mode)))
)
(defun oni:self-insert-dwim ()
"Execute self insert, but when the region is active call self
@ -622,6 +564,29 @@ insert at the end of the region and at the beginning."
(setq dir (replace-match "\\1/" nil nil dir)))
dir)
(defun oni:split-window-interactive (dir)
"Split windows in direction DIR.
Can also delete or switch to another window."
(interactive
(list (read-char "Direction (h,v,q,d,o): ")))
(case dir
((?v) (split-window-vertically))
((?h) (split-window-horizontally))
((?q) (delete-other-windows))
((?d) (delete-window))
((?o) (other-window 1))))
(defun oni:split-window-interactively (window)
"Ask for a direction and split WINDOW that way.
If no direction is given, don't split."
(let ((dir (read-char "Direction (h,v): ")))
(case dir
((?v) (split-window-vertically))
((?h) (split-window-horizontally))
(t window))))
(defun oni:start-emms ()
"Check to see if the function `emms' exists, if not call
`emms-player-mpd-connect' and assume that will have loaded it."
@ -846,6 +811,12 @@ for easy selection."
(setq flymake-gui-warnings-enabled nil)
(setq flymake-log-file-name (expand-file-name "~/.emacs.d/flymake.log"))
(setq flymake-log-level 0)
(setq flymake-warn-line-regexp
(eval-when-compile
(regexp-opt '("warning"
"Warning"
"Missing docstring"
"String statement has no effect"))))
(setq frame-title-format '(:eval (concat "emacs: " (buffer-name))))
(setq geiser-repl-history-filename "~/.emacs.d/geiser-history")
(setq gtags-auto-update t)
@ -1000,7 +971,6 @@ for easy selection."
(add-hook 'flymake-mode-hook 'oni:flymake-mode-func)
(add-hook 'go-mode-hook 'oni:go-mode-func)
(add-hook 'gtags-mode-hook 'oni:gtags-mode-func)
(add-hook 'hs-minor-mode-hook 'oni:hs-minor-mode-func)
(add-hook 'html-mode-hook 'oni:html-mode-func)
(add-hook 'jabber-chat-mode-hook 'oni:jabber-chat-mode-func)
(add-hook 'jabber-roster-mode-hook 'oni:jabber-roster-mode-func)
@ -1036,7 +1006,7 @@ for easy selection."
(global-set-key (kbd "<f8>") 'oni:raise-eshell)
(global-set-key (kbd "C-<") 'indent-shift-left)
(global-set-key (kbd "C->") 'indent-shift-right)
(global-set-key (kbd "C-@") 'er/expand-region)
(global-set-key (kbd "C-M-SPC") 'er/expand-region)
(global-set-key (kbd "C-M-d") 'kill-word)
(global-set-key (kbd "C-M-w") 'backward-kill-word)
(global-set-key (kbd "C-S-k") 'kill-whole-line)
@ -1051,6 +1021,8 @@ for easy selection."
(global-set-key (kbd "C-x C-b") 'electric-buffer-list)
(global-set-key (kbd "M-n") 'idomenu)
(global-set-key (kbd "\"") 'oni:self-insert-dwim)
(global-set-key (kbd "M-4") 'split-window-horizontally)
(global-set-key (kbd "C-M-4") 'split-window-vertically)
(if (daemonp)
(global-set-key "\C-x\C-c" 'oni:close-client-window)
@ -1072,11 +1044,10 @@ for easy selection."
(add-to-list 'compilation-finish-functions
'oni:compilation-finish-function)
(add-to-list 'custom-theme-load-path
(concat custom-theme-directory "/naquadah-theme"))
(add-to-list 'debug-ignored-errors "^Can't shift all lines enough")
(add-to-list 'display-buffer-alist
'(".*" . ((bw-display-in-other-window . nil))))
(add-to-list 'display-buffer-alist
'("^\\*.*\\*$" . ((bw-display-in-bottom-window . nil))))
@ -1095,18 +1066,19 @@ for easy selection."
(tool-bar-mode -1)
(tooltip-mode -1)
(auto-insert-mode)
(column-number-mode)
(electric-indent-mode)
(electric-pair-mode)
(ido-mode)
(ido-ubiquitous-mode)
(savehist-mode)
(show-paren-mode)
(auto-insert-mode)
(smex-initialize)
(help-at-pt-set-timer)
(load-theme 'naquadah t)
(load-theme 'new t)
(load custom-file)
(load "rudel-loaddefs.el")

View file

@ -0,0 +1,57 @@
;;; quick-edit-mode.el --- Quickly edit stuff
;; Copyright (C) 2012 Tom Willemsen
;; Author: Tom Willemsen <slash@drd>
;; Keywords: convenience
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Quickly edit stuff
;;; Code:
(defvar quick-edit-map
(let ((map (make-sparse-keymap)))
(define-key map "n" 'next-line)
(define-key map "p" 'previous-line)
(define-key map "f" 'forward-char)
(define-key map "b" 'backward-char)
(define-key map "e" 'oni:move-end-of-dwim)
(define-key map "a" 'oni:move-beginning-of-dwim)
(define-key map "V" 'scroll-down-command)
(define-key map "v" 'scroll-up-command)
(define-key map "/" 'undo)
(define-key map "w" 'oni:kill-region-or-backward-char)
(define-key map "d" 'oni:kill-region-or-forward-char)
(define-key map "k" 'oni:kill-region-or-line)
(define-key map "K" 'kill-whole-line)
(define-key map "j" 'newline-and-indent)
(define-key map (kbd "RET") 'quick-edit-mode)
map)
"Keymap for quick-edit-mode.")
;;;###autoload
(define-minor-mode quick-edit-mode
"Quickly edit stuff."
:lighter " qe"
:global t
(if quick-edit-mode
(setq overriding-local-map quick-edit-map)
(setq overriding-local-map nil)))
(provide 'quick-edit-mode)
;;; quick-edit-mode.el ends here

View file

@ -0,0 +1,50 @@
;;; new-theme.el --- My new theme
;; Copyright (C) 2012 Tom Willemsen
;; Author: Tom Willemsen <slash@drd>
;; Keywords: faces
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Just a new theme.
;;; Code:
(deftheme new
"Created 2012-09-24")
(custom-theme-set-faces
'new
'(default ((t (:background "#111113" :foreground "#eeeeec"))))
'(font-lock-comment-delimiter-face ((t (:foreground "#a9a9a9" :slant italic :weight bold))))
'(font-lock-comment-face ((t (:foreground "#a9a9a9" :slant italic))))
'(font-lock-keyword-face ((t (:foreground "#cfce29"))))
'(font-lock-type-face ((t (:foreground "#78a2c1"))))
'(ido-subdir ((t (:foreground "#ff5d55"))))
'(jabber-chat-prompt-foreign ((t (:foreground "#ff5d55"))))
'(jabber-chat-prompt-local ((t (:foreground "#78a2c1"))))
'(jabber-roster-user-online ((t (:foreground "#769ff2"))))
'(link ((t (:foreground "#ffbb56" :underline t))))
'(minibuffer-prompt ((t (:foreground "#78a2c1"))))
'(mode-line ((t (:background "#222224" :foreground "#eeeeec" :box nil))))
'(mode-line-inactive ((t (:background "#171719" :foreground "#999999" :box nil))))
'(region ((t (:background "#2729b6"))))
'(highlight ((t (:background "#171719"))))
)
(provide-theme 'new)
;;; new-theme.el ends here