summaryrefslogtreecommitdiffstats
path: root/.emacs.d/site-lisp/dzen.el
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2013-02-17 23:09:24 +0100
committerGravatar Tom Willemsen2013-02-17 23:09:33 +0100
commita281f040cd35dffe171d5b7d6b00fe03163be6a0 (patch)
tree744e2d8aeaed2aca087a1c1cbc3e9791644e973d /.emacs.d/site-lisp/dzen.el
parent50ab6deeabf2769ed3c4ff67385fae768ff41ee2 (diff)
downloaddotfiles-a281f040cd35dffe171d5b7d6b00fe03163be6a0.tar.gz
dotfiles-a281f040cd35dffe171d5b7d6b00fe03163be6a0.zip
Move .emacs.d to emacs
Since it's no longer placed directly in the home directory it doesn't need to be named exacly the same.
Diffstat (limited to '.emacs.d/site-lisp/dzen.el')
-rw-r--r--.emacs.d/site-lisp/dzen.el86
1 files changed, 0 insertions, 86 deletions
diff --git a/.emacs.d/site-lisp/dzen.el b/.emacs.d/site-lisp/dzen.el
deleted file mode 100644
index 6cc3eae..0000000
--- a/.emacs.d/site-lisp/dzen.el
+++ /dev/null
@@ -1,86 +0,0 @@
-;;; dzen.el --- Control DZEN2 from emacs
-
-;; 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:
-
-;;
-
-;;; Code:
-
-(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-update ()
- (let ((strl "")
- (strc (if (boundp 'metal-express-radio-currently-playing)
- metal-express-radio-currently-playing
- ""))
- (strr (format
- "jabber: %s ryu: %d gm: %d aet: %d 9n: %d rss: %d\n"
- (oni:current-jabber-status)
- (get-mail-count "ryuslash.org")
- (get-mail-count "gmail")
- (get-mail-count "aethon")
- (get-mail-count "ninthfloor")
- (newsticker--stat-num-items-total 'new))))
- (process-send-string
- "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)
- (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