aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init.org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2016-09-07 14:31:14 +0200
committerGravatar Tom Willemse2016-09-07 14:31:14 +0200
commitd153d128694463d9b7d901a9b413d630886f5712 (patch)
treeb4940ff6c0e769913c4ec9673c22e9a74b78c1d4 /emacs/.emacs.d/init.org
parenta5a1aac25c525aa7816685322526c9582a4942ee (diff)
downloadnew-dotfiles-d153d128694463d9b7d901a9b413d630886f5712.tar.gz
new-dotfiles-d153d128694463d9b7d901a9b413d630886f5712.zip
Add jabber.el config
Diffstat (limited to 'emacs/.emacs.d/init.org')
-rw-r--r--emacs/.emacs.d/init.org111
1 files changed, 111 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 7f252ca..a802bba 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -86,6 +86,18 @@ To start off, first I need to enable lexical binding.
(require ,library-symbol)))))))
#+END_SRC
+* Site lisp
+
+ Setup everything so that any autoloads in ~site-lisp/~ get loaded
+ and can be used.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-to-list 'load-path (locate-user-emacs-file "site-lisp/"))
+ (let ((loaddefs (locate-user-emacs-file "site-lisp/site-autoloads.el")))
+ (when (file-exists-p loaddefs)
+ (load loaddefs)))
+ #+END_SRC
+
* Helper functions
I have noticed that I refer to the combination of
@@ -862,6 +874,105 @@ To start off, first I need to enable lexical binding.
(add-hook 'org-mode-hook 'auto-fill-mode)
#+END_SRC
+** Jabber
+
+ I like using XMPP to talk to people, jabber.el is very good at
+ this.
+
+ #+BEGIN_SRC emacs-lisp
+ (ensure-library jabber)
+ (eval-when-compile (require 'jabber))
+ #+END_SRC
+
+ Add my account.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq jabber-account-list
+ `((,(concat "ryuslash@dukgo.com/" (system-name)))
+ (:connection-type . starttls)))
+ #+END_SRC
+
+ Store any persistent data in the data directory.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq jabber-avatar-cache-directory (oni:data-location "jabber/avatars/")
+ jabber-history-dir (oni:data-location "jabber/hist/"))
+ #+END_SRC
+
+ Change the default prompts.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq jabber-chat-buffer-format "+%n"
+ jabber-chat-foreign-prompt-format "%t %u"
+ jabber-chat-local-prompt-format "%t %u"
+ jabber-chat-delayed-time-format "%H:%M"
+ jabber-groupchat-buffer-format "++%n"
+ jabber-groupchat-prompt-format "%t %u")
+ #+END_SRC
+
+ Don't show avatars, publish or retrieve avatars.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq jabber-chat-buffer-show-avatar nil
+ jabber-vcard-avatars-publish nil
+ jabber-vcard-avatars-retrieve nil)
+ #+END_SRC
+
+ Don't fill long lines in jabber chat buffers, but use visual line
+ mode.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq jabber-chat-fill-long-lines nil)
+
+ (add-hook 'jabber-chat-mode-hook 'visual-line-mode)
+ #+END_SRC
+
+ Don't send notifications about chat states.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq jabber-chatstates-confirm nil)
+ #+END_SRC
+
+ Colorize text in multi-user chats.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq jabber-muc-colorize-local t
+ jabber-muc-colorize-foreign t)
+ #+END_SRC
+
+ Enable recording history.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq jabber-history-enabled t
+ jabber-use-global-history nil)
+ #+END_SRC
+
+ Clean up the default view of the roster buffer.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq jabber-roster-show-bindings nil
+ jabber-show-offline-contacts nil)
+
+ (add-hook 'jabber-roster-mode-hook 'oni-jabber-set-roster-mode-line)
+ #+END_SRC
+
+ Use libnotify to send jabber notifications.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-hook 'jabber-alert-message-hooks 'jabber-message-libnotify)
+ (add-hook 'jabber-alert-muc-hooks 'jabber-muc-libnotify)
+ #+END_SRC
+
+ Don't echo presence changes in the mode line, show them in the
+ relevant buffer instead.
+
+ #+BEGIN_SRC emacs-lisp
+ (with-eval-after-load 'jabber-alert
+ (remove-hook 'jabber-alert-presence-hooks 'jabber-presence-echo))
+
+ (add-hook 'jabber-alert-presence-hooks 'oni-jabber-show-status-in-buffer)
+ #+END_SRC
+
* Custom
Put the customize settings in a different file so that Emacs doesn't