From b97ec760a966e826e696515dbe9a02699532d49a Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 25 Sep 2012 09:56:35 +0200 Subject: [PATCH 1/9] .Xdefaults --- .Xdefaults | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.Xdefaults b/.Xdefaults index 3b8c604..76beea8 100644 --- a/.Xdefaults +++ b/.Xdefaults @@ -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\ From 13fb3c19429549f1c5981123c96adc40f80fd75f Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 25 Sep 2012 09:56:59 +0200 Subject: [PATCH 2/9] .config/awesome/rc.lua --- .config/awesome/rc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 4c5d93c..5e07a09 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -334,7 +334,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) From cf592759af6b81b732d30340c7ec90d45fdd5c60 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 25 Sep 2012 09:57:33 +0200 Subject: [PATCH 3/9] .conkerorrc/init.js --- .conkerorrc/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.conkerorrc/init.js b/.conkerorrc/init.js index 438f402..d8305af 100644 --- a/.conkerorrc/init.js +++ b/.conkerorrc/init.js @@ -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/"); From 555164a19a5f77565a3805a45981c206f2390db2 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 25 Sep 2012 09:58:26 +0200 Subject: [PATCH 4/9] .emacs.d/init.el --- .emacs.d/init.el | 120 ++++++++++++++++++----------------------------- 1 file changed, 46 insertions(+), 74 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index ee94c39..a4c39f1 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -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'." @@ -199,9 +156,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)) @@ -211,9 +165,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." @@ -244,8 +196,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) " " @@ -258,7 +210,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 () @@ -272,7 +224,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'." @@ -284,11 +236,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)) @@ -352,7 +299,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)) @@ -387,8 +333,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'." @@ -520,11 +465,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)) @@ -591,8 +534,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 @@ -615,6 +557,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." @@ -839,6 +804,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) @@ -993,7 +964,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) @@ -1029,7 +999,7 @@ for easy selection." (global-set-key (kbd "") '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) @@ -1044,6 +1014,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) @@ -1062,11 +1034,10 @@ for easy selection." (add-to-list 'auto-mode-alist '("^PKGBUILD$" . shell-script-mode)) (add-to-list 'auto-mode-alist '("^\\.Xmodmap$" . xmodmap-mode)) -(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)))) @@ -1085,18 +1056,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") From a5d4bf52f171fcfe2bc48964a18a2003e8945102 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 25 Sep 2012 09:58:55 +0200 Subject: [PATCH 5/9] .emacs.d/themes/new-theme.el --- .emacs.d/themes/new-theme.el | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .emacs.d/themes/new-theme.el diff --git a/.emacs.d/themes/new-theme.el b/.emacs.d/themes/new-theme.el new file mode 100644 index 0000000..cf4765f --- /dev/null +++ b/.emacs.d/themes/new-theme.el @@ -0,0 +1,49 @@ +;;; new-theme.el --- My new theme + +;; Copyright (C) 2012 Tom Willemsen + +;; Author: Tom Willemsen +;; 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 . + +;;; 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")))) + ) + +(provide-theme 'new) +;;; new-theme.el ends here From 14d2e1e1f27031db71f003fa53d9b18af0c6fc8d Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 25 Sep 2012 10:01:12 +0200 Subject: [PATCH 6/9] .emacs.d/site-lisp/quick-edit-mode.el --- .emacs.d/site-lisp/quick-edit-mode.el | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .emacs.d/site-lisp/quick-edit-mode.el diff --git a/.emacs.d/site-lisp/quick-edit-mode.el b/.emacs.d/site-lisp/quick-edit-mode.el new file mode 100644 index 0000000..5ba8b72 --- /dev/null +++ b/.emacs.d/site-lisp/quick-edit-mode.el @@ -0,0 +1,56 @@ +;;; quick-edit-mode.el --- Quickly edit stuff + +;; Copyright (C) 2012 Tom Willemsen + +;; Author: Tom Willemsen +;; 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 . + +;;; 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 (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 From c06c9b92ed2ac958a06d00330956bda04af9a5ed Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 25 Sep 2012 10:01:33 +0200 Subject: [PATCH 7/9] .emacs.d/init.el --- .emacs.d/init.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index a4c39f1..662facf 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1074,6 +1074,9 @@ for easy selection." (load "rudel-loaddefs.el") (load (expand-file-name "~/quicklisp/slime-helper.el")) +(load "quick-edit-mode") +(global-set-key (kbd "C-z") 'quick-edit-mode) + (provide 'init) ;;; init.el ends here From 883b25b99ff230562bea21fbd527e9403b1df449 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 25 Sep 2012 22:02:59 +0200 Subject: [PATCH 8/9] .emacs.d/site-lisp/quick-edit-mode.el --- .emacs.d/site-lisp/quick-edit-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/.emacs.d/site-lisp/quick-edit-mode.el b/.emacs.d/site-lisp/quick-edit-mode.el index 5ba8b72..effd30f 100644 --- a/.emacs.d/site-lisp/quick-edit-mode.el +++ b/.emacs.d/site-lisp/quick-edit-mode.el @@ -39,6 +39,7 @@ (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.") From 73700816128c0788e822710dbad5e0bd3d8d54bf Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Tue, 25 Sep 2012 22:03:20 +0200 Subject: [PATCH 9/9] .emacs.d/themes/new-theme.el --- .emacs.d/themes/new-theme.el | 1 + 1 file changed, 1 insertion(+) diff --git a/.emacs.d/themes/new-theme.el b/.emacs.d/themes/new-theme.el index cf4765f..a2234ca 100644 --- a/.emacs.d/themes/new-theme.el +++ b/.emacs.d/themes/new-theme.el @@ -43,6 +43,7 @@ '(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)