summaryrefslogtreecommitdiffstats
path: root/.emacs.d
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-12-14 00:32:05 +0100
committerGravatar Tom Willemsen2012-12-14 00:32:05 +0100
commit5cff0a1e0982f4a3d737468a9bed2d7b977da36b (patch)
tree119219396026ca27903f744228807af7f4f22574 /.emacs.d
parent38194c9c34dff080d8751ca0d1f6c7b2eab128e7 (diff)
parentf1ad7ad10397da82f72157e9e1849df1d2e4a1d3 (diff)
downloaddotfiles-5cff0a1e0982f4a3d737468a9bed2d7b977da36b.tar.gz
dotfiles-5cff0a1e0982f4a3d737468a9bed2d7b977da36b.zip
Merge remote-tracking branch 'origin/master' into phoenix
Conflicts: dotfiles.mk
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/init.el20
-rw-r--r--.emacs.d/site-lisp/dzen.el49
-rw-r--r--.emacs.d/site-lisp/metalexpress.el3
-rw-r--r--.emacs.d/site-lisp/newsticker-init.el15
-rw-r--r--.emacs.d/site-lisp/oni.el11
-rw-r--r--.emacs.d/site-lisp/org-init.el2
6 files changed, 76 insertions, 24 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 4beac7b..a30a55c 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -19,7 +19,10 @@
(let ((loaddefs (concat directory "/loaddefs.el")))
(when (file-exists-p loaddefs)
(load loaddefs))))
- '("~/var/src/emacs/dispass.el" "~/var/src/emacs/mode-icons")))
+ '("~/var/src/emacs/dispass.el" "~/var/src/emacs/mode-icons"))
+ (mapc #'(lambda (dir)
+ (add-to-list 'custom-theme-load-path dir))
+ '("~/var/src/emacs/yoshi-theme")))
(require 'geiser-install)
(require 'iso-transl)
@@ -138,6 +141,7 @@
(setq-default tab-width 4)
(setq-default truncate-lines t)
+(setq appt-disp-window-function #'oni:appt-display-window-and-jabber)
(setq appt-display-diary nil)
(setq auto-mode-case-fold nil)
(setq auto-save-file-name-transforms
@@ -250,13 +254,13 @@
(setq jabber-chat-buffer-format "*jabber:%n*")
(setq jabber-chat-buffer-show-avatar nil)
(setq jabber-chat-fill-long-lines nil)
-(setq jabber-chat-foreign-prompt-format "%t < ")
-(setq jabber-chat-local-prompt-format "%t > ")
+(setq jabber-chat-foreign-prompt-format "%t <\n")
+(setq jabber-chat-local-prompt-format "%t >\n")
(setq jabber-chatstates-confirm nil)
(setq jabber-history-dir "~/.emacs.d/jabber")
(setq jabber-roster-show-bindings nil)
(setq jit-lock-defer-time 0.2)
-(setq magit-repo-dirs '("~/var/src/"))
+(setq magit-repo-dirs '("~/projects/" "~/var/src/"))
(setq message-log-max 1000)
(setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq message-sendmail-extra-arguments '("-a" "ryuslash"))
@@ -283,6 +287,9 @@
(setq split-height-threshold 40)
(setq time-stamp-active t)
(setq time-stamp-format "%04y-%02m-%02d %02H:%02M:%02S (%u)")
+(setq type-break-good-rest-interval (* 60 10))
+(setq type-break-interval (* 60 50))
+(setq type-break-keystroke-threshold '(nil . nil))
(setq uniquify-buffer-name-style 'post-forward)
(setq use-dialog-box nil)
(setq user-full-name "Tom Willemsen")
@@ -356,6 +363,11 @@
(global-set-key (kbd "M-4") 'split-window-horizontally)
(global-set-key (kbd "M-n") 'idomenu)
(global-set-key (kbd "\"") 'oni:self-insert-dwim)
+(global-set-key (kbd "M-o") 'other-window)
+(global-set-key (kbd "M-1") 'delete-other-windows)
+(global-set-key (kbd "M-2") 'split-window-below)
+(global-set-key (kbd "M-3") 'split-window-right)
+(global-set-key (kbd "M-0") 'delete-window)
(if (daemonp)
(global-set-key "\C-x\C-c" 'oni:close-client-window))
diff --git a/.emacs.d/site-lisp/dzen.el b/.emacs.d/site-lisp/dzen.el
index a28418b..2d43f95 100644
--- a/.emacs.d/site-lisp/dzen.el
+++ b/.emacs.d/site-lisp/dzen.el
@@ -27,20 +27,19 @@
(require 'newst-backend)
(require 'sawfish)
+(defvar dzen-process nil
+ "Dzen2's process.")
+
+(defvar dzen-timer nil
+ "Timer used to update the dzen line.")
+
(defun get-mail-count (account)
(length (directory-files (concat "/home/slash/documents/mail/"
account "/inbox/new") nil "^[^.]")))
-(defun dzen-start ()
- (interactive)
- (let ((proc (start-process "dzen2" "*dzen2*" "dzen2"
- "-w" "1920"
- "-fn" "Monaco-12"
- "-bg" "#222224"
- "-fg" "#eeeeec"))
- (strl (format
- "%s"
- (sawfish-eval-expression '(window-name (input-focus)))))
+(defun dzen-update ()
+ (let ((strl "")
+ (strc metal-express-radio-currently-playing)
(strr (format
"jabber: %s ryu: %d gm: %d aet: %d 9n: %d rss: %d\n"
(oni:current-jabber-status)
@@ -50,12 +49,36 @@
(get-mail-count "ninthfloor")
(newsticker--stat-num-items-total 'new))))
(process-send-string
- proc (format "^p(_LEFT)%s^p(_RIGHT)^p(-%d)%s"
- strl (+ 9 (* 9 (length strr))) strr))))
+ "dzen2" (format "%s^p(_CENTER)^p(-%d)%s^p(_RIGHT)^p(-%d)%s"
+ strl
+ (* (floor (/ (length strc) 2)) 8) strc
+ (+ 8 (* 8 (length strr))) strr))))
+
+(defun dzen-start ()
+ (interactive)
+ (if (or (null dzen-process) (not (process-live-p dzen-process)))
+ (progn
+ (setq dzen-process
+ (start-process "dzen2" "*dzen2*" "dzen2"
+ "-w" "1920"
+ "-fn" "Monaco-10"
+ "-bg" "#222224"
+ "-fg" "#eeeeec"
+ "-y" "1060"))
+ (dzen-update)
+ (setq dzen-timer (run-with-timer 1 1 #'dzen-update)))
+ (message "Dzen2 already running")))
(defun dzen-stop ()
(interactive)
- (kill-process "dzen2"))
+ (if (and dzen-process (process-live-p dzen-process))
+ (progn
+ (when dzen-timer
+ (cancel-timer dzen-timer))
+ (kill-process "dzen2"))
+ (message "Dzen2 is not running"))
+ (setq dzen-process nil
+ dzen-timer nil))
(provide 'dzen)
;;; dzen.el ends here
diff --git a/.emacs.d/site-lisp/metalexpress.el b/.emacs.d/site-lisp/metalexpress.el
index 2f77638..0c4539a 100644
--- a/.emacs.d/site-lisp/metalexpress.el
+++ b/.emacs.d/site-lisp/metalexpress.el
@@ -68,7 +68,8 @@
(defun metal-express-radio-stop ()
"Stop listening to Metal Express Radio."
(interactive)
- (kill-process (get-buffer-process "*Metal Express Radio*")))
+ (kill-process (get-buffer-process "*Metal Express Radio*"))
+ (setq metal-express-radio-currently-playing nil))
(add-hook 'metal-express-radio-song-changed-hook
'metal-express-radio-echo-currently-playing)
diff --git a/.emacs.d/site-lisp/newsticker-init.el b/.emacs.d/site-lisp/newsticker-init.el
index da166d1..5d60850 100644
--- a/.emacs.d/site-lisp/newsticker-init.el
+++ b/.emacs.d/site-lisp/newsticker-init.el
@@ -67,9 +67,6 @@
"http://news.ycombinator.com/rss" nil nil nil)
("HowtoForge - Linux Howtos and Tutorials -"
"http://www.howtoforge.com/node/feed" nil nil nil)
- ("IBM developerWorks : Linux"
- "http://www.ibm.com/developerworks/views/linux/rss/libraryview.jsp"
- nil nil nil)
("Linuxtoday.com"
"http://linuxtoday.com/backend/biglt.rss" nil nil nil)
("Linux.com - Content Feed"
@@ -95,7 +92,17 @@
nil nil nil)
("Recent Commits to python-django.el:master"
"https://github.com/fgallina/python-django.el/commits/master.atom"
- nil nil nil)))
+ nil nil nil)
+ ("git.tuxfamily.org Git - sawfish.main.git/atom log"
+ "http://git.tuxfamily.org/sawfish/main.git?p=sawfish/main.git;a=atom"
+ nil nil nil)
+ ("BLABBERMOUTH.NET Latest News"
+ "http://feeds.feedburner.com/blabbermouth" nil nil nil)
+ ("QJ.NET"
+ "http://feeds.feedburner.com/QjGameNewsOpinionsBlogsandMore"
+ nil nil nil)
+ ("Beej's Bit Bucket"
+ "http://beej.us/blog/rss.xml" nil nil nil)))
(setq newsticker-use-full-width nil)
(provide 'newsticker-init)
diff --git a/.emacs.d/site-lisp/oni.el b/.emacs.d/site-lisp/oni.el
index 376c996..b3a7987 100644
--- a/.emacs.d/site-lisp/oni.el
+++ b/.emacs.d/site-lisp/oni.el
@@ -25,6 +25,7 @@
;;; Code:
(autoload 'notifications-notify "notifications")
+(autoload 'jabber-send-message "jabber-chat")
(defmacro oni:define-mailbox (name email &optional signature longname)
"Define a mailbox function for mailbox NAME with address EMAIL.
@@ -72,6 +73,13 @@ DOT are intentionally being skipped."
(shell-command
(concat "make -C " dom-dir " TAGS >/dev/null 2>&1")))))
+(defun oni:appt-display-window-and-jabber (min-to-app new-time appt-msg)
+ "Send a message to my phone jabber account."
+ (jabber-send-message (car jabber-connections) "phone@ryuslash.org"
+ nil (format "%s%s (in %s minutes)"
+ new-time appt-msg min-to-app) nil)
+ (appt-disp-window min-to-app new-time appt-msg))
+
(defun oni:before-save-func ()
"Function for `before-save-hook'."
(if (eq major-mode 'html-mode)
@@ -233,8 +241,7 @@ If COUNT has been specified indent by that much, otherwise look at
(visual-line-mode)
(setq mode-line-format (append (cddr jabber-chat-header-line-format)
'(global-mode-string))
- header-line-format nil
- wrap-prefix (make-string 8 ?\ )))
+ header-line-format nil))
(defun oni:jabber-roster-mode-func ()
"Function for `jabber-roster-mode-hook'."
diff --git a/.emacs.d/site-lisp/org-init.el b/.emacs.d/site-lisp/org-init.el
index 3bacaad..793b453 100644
--- a/.emacs.d/site-lisp/org-init.el
+++ b/.emacs.d/site-lisp/org-init.el
@@ -93,6 +93,8 @@
(setq org-use-fast-todo-selection t)
(setq org-use-property-inheritance '("slug"))
+(add-hook 'org-agenda-mode-hook 'org-agenda-to-appt)
+
(add-to-list 'org-modules 'habit)
(org-indent-mode t)