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

Conflicts:
	dotfiles.mk
This commit is contained in:
Tom Willemsen 2012-12-14 00:32:05 +01:00
commit 5cff0a1e09
7 changed files with 85 additions and 26 deletions

View file

@ -19,7 +19,10 @@
(let ((loaddefs (concat directory "/loaddefs.el"))) (let ((loaddefs (concat directory "/loaddefs.el")))
(when (file-exists-p loaddefs) (when (file-exists-p loaddefs)
(load 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 'geiser-install)
(require 'iso-transl) (require 'iso-transl)
@ -138,6 +141,7 @@
(setq-default tab-width 4) (setq-default tab-width 4)
(setq-default truncate-lines t) (setq-default truncate-lines t)
(setq appt-disp-window-function #'oni:appt-display-window-and-jabber)
(setq appt-display-diary nil) (setq appt-display-diary nil)
(setq auto-mode-case-fold nil) (setq auto-mode-case-fold nil)
(setq auto-save-file-name-transforms (setq auto-save-file-name-transforms
@ -250,13 +254,13 @@
(setq jabber-chat-buffer-format "*jabber:%n*") (setq jabber-chat-buffer-format "*jabber:%n*")
(setq jabber-chat-buffer-show-avatar nil) (setq jabber-chat-buffer-show-avatar nil)
(setq jabber-chat-fill-long-lines nil) (setq jabber-chat-fill-long-lines nil)
(setq jabber-chat-foreign-prompt-format "%t < ") (setq jabber-chat-foreign-prompt-format "%t <\n")
(setq jabber-chat-local-prompt-format "%t > ") (setq jabber-chat-local-prompt-format "%t >\n")
(setq jabber-chatstates-confirm nil) (setq jabber-chatstates-confirm nil)
(setq jabber-history-dir "~/.emacs.d/jabber") (setq jabber-history-dir "~/.emacs.d/jabber")
(setq jabber-roster-show-bindings nil) (setq jabber-roster-show-bindings nil)
(setq jit-lock-defer-time 0.2) (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-log-max 1000)
(setq message-send-mail-function 'message-send-mail-with-sendmail) (setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq message-sendmail-extra-arguments '("-a" "ryuslash")) (setq message-sendmail-extra-arguments '("-a" "ryuslash"))
@ -283,6 +287,9 @@
(setq split-height-threshold 40) (setq split-height-threshold 40)
(setq time-stamp-active t) (setq time-stamp-active t)
(setq time-stamp-format "%04y-%02m-%02d %02H:%02M:%02S (%u)") (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 uniquify-buffer-name-style 'post-forward)
(setq use-dialog-box nil) (setq use-dialog-box nil)
(setq user-full-name "Tom Willemsen") (setq user-full-name "Tom Willemsen")
@ -356,6 +363,11 @@
(global-set-key (kbd "M-4") 'split-window-horizontally) (global-set-key (kbd "M-4") 'split-window-horizontally)
(global-set-key (kbd "M-n") 'idomenu) (global-set-key (kbd "M-n") 'idomenu)
(global-set-key (kbd "\"") 'oni:self-insert-dwim) (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) (if (daemonp)
(global-set-key "\C-x\C-c" 'oni:close-client-window)) (global-set-key "\C-x\C-c" 'oni:close-client-window))

View file

@ -27,20 +27,19 @@
(require 'newst-backend) (require 'newst-backend)
(require 'sawfish) (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) (defun get-mail-count (account)
(length (directory-files (concat "/home/slash/documents/mail/" (length (directory-files (concat "/home/slash/documents/mail/"
account "/inbox/new") nil "^[^.]"))) account "/inbox/new") nil "^[^.]")))
(defun dzen-start () (defun dzen-update ()
(interactive) (let ((strl "")
(let ((proc (start-process "dzen2" "*dzen2*" "dzen2" (strc metal-express-radio-currently-playing)
"-w" "1920"
"-fn" "Monaco-12"
"-bg" "#222224"
"-fg" "#eeeeec"))
(strl (format
"%s"
(sawfish-eval-expression '(window-name (input-focus)))))
(strr (format (strr (format
"jabber: %s ryu: %d gm: %d aet: %d 9n: %d rss: %d\n" "jabber: %s ryu: %d gm: %d aet: %d 9n: %d rss: %d\n"
(oni:current-jabber-status) (oni:current-jabber-status)
@ -50,12 +49,36 @@
(get-mail-count "ninthfloor") (get-mail-count "ninthfloor")
(newsticker--stat-num-items-total 'new)))) (newsticker--stat-num-items-total 'new))))
(process-send-string (process-send-string
proc (format "^p(_LEFT)%s^p(_RIGHT)^p(-%d)%s" "dzen2" (format "%s^p(_CENTER)^p(-%d)%s^p(_RIGHT)^p(-%d)%s"
strl (+ 9 (* 9 (length strr))) strr)))) 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 () (defun dzen-stop ()
(interactive) (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) (provide 'dzen)
;;; dzen.el ends here ;;; dzen.el ends here

View file

@ -68,7 +68,8 @@
(defun metal-express-radio-stop () (defun metal-express-radio-stop ()
"Stop listening to Metal Express Radio." "Stop listening to Metal Express Radio."
(interactive) (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 (add-hook 'metal-express-radio-song-changed-hook
'metal-express-radio-echo-currently-playing) 'metal-express-radio-echo-currently-playing)

View file

@ -67,9 +67,6 @@
"http://news.ycombinator.com/rss" nil nil nil) "http://news.ycombinator.com/rss" nil nil nil)
("HowtoForge - Linux Howtos and Tutorials -" ("HowtoForge - Linux Howtos and Tutorials -"
"http://www.howtoforge.com/node/feed" nil nil nil) "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" ("Linuxtoday.com"
"http://linuxtoday.com/backend/biglt.rss" nil nil nil) "http://linuxtoday.com/backend/biglt.rss" nil nil nil)
("Linux.com - Content Feed" ("Linux.com - Content Feed"
@ -95,7 +92,17 @@
nil nil nil) nil nil nil)
("Recent Commits to python-django.el:master" ("Recent Commits to python-django.el:master"
"https://github.com/fgallina/python-django.el/commits/master.atom" "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) (setq newsticker-use-full-width nil)
(provide 'newsticker-init) (provide 'newsticker-init)

View file

@ -25,6 +25,7 @@
;;; Code: ;;; Code:
(autoload 'notifications-notify "notifications") (autoload 'notifications-notify "notifications")
(autoload 'jabber-send-message "jabber-chat")
(defmacro oni:define-mailbox (name email &optional signature longname) (defmacro oni:define-mailbox (name email &optional signature longname)
"Define a mailbox function for mailbox NAME with address EMAIL. "Define a mailbox function for mailbox NAME with address EMAIL.
@ -72,6 +73,13 @@ DOT are intentionally being skipped."
(shell-command (shell-command
(concat "make -C " dom-dir " TAGS >/dev/null 2>&1"))))) (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 () (defun oni:before-save-func ()
"Function for `before-save-hook'." "Function for `before-save-hook'."
(if (eq major-mode 'html-mode) (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) (visual-line-mode)
(setq mode-line-format (append (cddr jabber-chat-header-line-format) (setq mode-line-format (append (cddr jabber-chat-header-line-format)
'(global-mode-string)) '(global-mode-string))
header-line-format nil header-line-format nil))
wrap-prefix (make-string 8 ?\ )))
(defun oni:jabber-roster-mode-func () (defun oni:jabber-roster-mode-func ()
"Function for `jabber-roster-mode-hook'." "Function for `jabber-roster-mode-hook'."

View file

@ -93,6 +93,8 @@
(setq org-use-fast-todo-selection t) (setq org-use-fast-todo-selection t)
(setq org-use-property-inheritance '("slug")) (setq org-use-property-inheritance '("slug"))
(add-hook 'org-agenda-mode-hook 'org-agenda-to-appt)
(add-to-list 'org-modules 'habit) (add-to-list 'org-modules 'habit)
(org-indent-mode t) (org-indent-mode t)

View file

@ -2,6 +2,7 @@ LOAD_PATH=. /usr/share/emacs/site-lisp $(HOME)/.emacs.d/site-lisp
EMACS=emacs $(addprefix -L ,$(LOAD_PATH)) EMACS=emacs $(addprefix -L ,$(LOAD_PATH))
MODE=644 MODE=644
FG_BLU=\033[0;34m
FG_YEL=\033[0;33m FG_YEL=\033[0;33m
FG_GRE=\033[0;32m FG_GRE=\033[0;32m
FG_RED=\033[0;31m FG_RED=\033[0;31m
@ -11,6 +12,9 @@ compile = $(EMACS) -Q -batch -eval "(byte-compile-file \"$(1)\")"
define newer = define newer =
$(shell if [ "$(1)" -nt "$(DESTDIR)/$(1)" ]; then echo "newer"; fi) $(shell if [ "$(1)" -nt "$(DESTDIR)/$(1)" ]; then echo "newer"; fi)
endef endef
define older =
$(shell if [ "$(1)" -ot "$(DESTDIR)/$(1)" ]; then echo "older"; fi)
endef
install-objects=$(addprefix install-,$(objects)) install-objects=$(addprefix install-,$(objects))
uninstall-objects=$(addprefix uninstall-,$(objects)) uninstall-objects=$(addprefix uninstall-,$(objects))
@ -33,7 +37,9 @@ $(modules): %:
@$(MAKE) -C $* @$(MAKE) -C $*
$(install-objects): install-%: % $(install-objects): install-%: %
$(if $(call newer,$*),install -pDm $(MODE) "$*" "$(DESTDIR)/$*") $(if $(call newer,$*), \
install -pDm $(MODE) "$*" "$(DESTDIR)/$*", \
@echo -e "$(FG_YEL)$*$(CLR_RE) is $(FG_RED)not newer$(CLR_RE)")
$(install-modules): install-%: $(install-modules): install-%:
@$(MAKE) -C $* install @$(MAKE) -C $* install
@ -47,7 +53,8 @@ $(uninstall-modules): uninstall-%:
$(check-objects): check-%: $(check-objects): check-%:
@$(if $(call newer,$*), \ @$(if $(call newer,$*), \
echo -e "$(FG_YEL)$* $(FG_GRE)newer$(CLR_RE)!", \ echo -e "$(FG_YEL)$* $(FG_GRE)newer$(CLR_RE)!", \
echo -e "$(FG_YEL)$* $(FG_RED)not newer$(CLR_RE).") $(if $(call older,$*), \
echo -e "$(FG_YEL)$* $(FG_RED)older$(CLR_RE)."))
$(check-modules): check-%: $(check-modules): check-%:
@$(MAKE) -C $* check @$(MAKE) -C $* check