diff options
Diffstat (limited to '.emacs.d/site-lisp')
-rw-r--r-- | .emacs.d/site-lisp/dzen.el | 49 | ||||
-rw-r--r-- | .emacs.d/site-lisp/metalexpress.el | 3 | ||||
-rw-r--r-- | .emacs.d/site-lisp/newsticker-init.el | 15 | ||||
-rw-r--r-- | .emacs.d/site-lisp/oni.el | 11 | ||||
-rw-r--r-- | .emacs.d/site-lisp/org-init.el | 2 |
5 files changed, 60 insertions, 20 deletions
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) |