summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-09-03 15:56:18 +0200
committerGravatar Tom Willemse2015-09-03 15:56:18 +0200
commit805b2a8e92ed879aa632e36d9614ed983df3f33c (patch)
treee97cc331e2332e7a69821f52b44d158d8eb1bb94 /emacs
parent443bada7b11ec212d01a644df3a9a5da28632541 (diff)
downloaddotfiles-805b2a8e92ed879aa632e36d9614ed983df3f33c.tar.gz
dotfiles-805b2a8e92ed879aa632e36d9614ed983df3f33c.zip
Stop using ERC, use circe instead
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/Cask1
-rw-r--r--emacs/.emacs.d/init.el38
2 files changed, 26 insertions, 13 deletions
diff --git a/emacs/.emacs.d/Cask b/emacs/.emacs.d/Cask
index 96ea54b..86f09d9 100644
--- a/emacs/.emacs.d/Cask
+++ b/emacs/.emacs.d/Cask
@@ -14,6 +14,7 @@
(depends-on "buttercup")
(depends-on "c-eldoc")
(depends-on "cedit")
+(depends-on "circe")
(depends-on "clojure-mode")
(depends-on "closure-template-html-mode")
(depends-on "coffee-mode")
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index 4f14092..ef9283d 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -948,6 +948,31 @@ from myaethon2.core.decorators import (
(topmost-intro-cont first c-lineup-topmost-intro-cont
c-lineup-gnu-DEFUN-intro-cont))))
+(stante-after circe
+ (defvar oni:circe-longest-nick 0)
+ (make-variable-buffer-local 'oni:circe-longest-nick)
+
+ (defun oni:circe-prompt (&rest keywords)
+ (let* ((nick (plist-get keywords :nick))
+ (l (length nick)))
+ (when (> l oni:circe-longest-nick)
+ (setq oni:circe-longest-nick l)
+ (setq-local lui-fill-type (make-string (+ l 3) ?\ )))
+ (format "%s %s" (s-pad-left oni:circe-longest-nick " " nick)
+ (plist-get keywords :body))))
+
+ (setq circe-format-self-say #'oni:circe-prompt)
+ (setq circe-format-say #'oni:circe-prompt)
+ (setq circe-network-options
+ `(("Freenode"
+ :nick "ryuslash"
+ :channels ("#emacs" "#mowedline" "#ninthfloor"))))
+ (setq lui-time-stamp-position 'right-margin)
+ (setq lui-time-stamp-format "%H:%M")
+ (setq lui-fill-type 'variable)
+ (add-hook 'lui-mode-hook (lambda () (setq right-margin-width 5)))
+ (add-hook 'circe-channel-mode-hook (lambda () (setq mode-line-format ""))))
+
(stante-after compile
(setq compilation-scroll-output t))
@@ -1010,19 +1035,6 @@ from myaethon2.core.decorators import (
(add-to-list 'emms-player-list 'emms-player-mpd)
(setq emms-player-mpd-music-directory "/mnt/music/mp3"))
-(stante-after erc
- (setq erc-hide-list '("PART"))
- (setq erc-nick "ryuslash"))
-
-(stante-after erc-join
- (setq erc-autojoin-channels-alist
- '(("freenode.net" "#ninthfloor" "#emacs" "#dispass" "#mowedline"))))
-
-(stante-after erc-stamp
- (setq erc-insert-timestamp-function 'erc-insert-timestamp-left)
- (setq erc-timestamp-format "[%H:%M] ")
- (setq erc-timestamp-only-if-changed-flag nil))
-
(stante-after esh-mode
(add-to-list 'eshell-output-filter-functions #'oni:eshell-handle-url)
(add-to-list 'eshell-output-filter-functions #'eshell-truncate-buffer))