2014-08-21 00:23:56 +02:00
|
|
|
;;; jabber-initel --- Jabber.el initialization
|
|
|
|
;;; Commentary:
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
;; (autoload 'jabber-message-libnotify "jabber-libnotify")
|
|
|
|
;; (autoload 'jabber-muc-libnotify "jabber-libnotify")
|
|
|
|
|
|
|
|
(defun jabber-init-roster-mode-func ()
|
|
|
|
"Function for `jabber-roster-mode-hook'."
|
|
|
|
(setq mode-line-format
|
|
|
|
(list (propertize " %m" 'face 'mode-line-buffer-id))))
|
|
|
|
|
|
|
|
(defun jabber-init-show-status-in-buffer (who oldstatus newstatus
|
|
|
|
statustext proposed-alert)
|
|
|
|
"Check to see if WHO has a buffer and if so print his new status.
|
|
|
|
|
|
|
|
OLDSTATUS, NEWSTATUS and STATUSTEXT are ignored.
|
|
|
|
|
|
|
|
Insert PROPOSED-ALERT in the buffer if it is non-nil."
|
|
|
|
(let ((buffer (get-buffer (jabber-chat-get-buffer (symbol-name who)))))
|
|
|
|
(when (and buffer proposed-alert)
|
|
|
|
(with-current-buffer buffer
|
|
|
|
(ewoc-enter-last jabber-chat-ewoc (list :notice proposed-alert
|
|
|
|
:time (current-time)))))))
|
|
|
|
|
|
|
|
(defun jabber-init-stumpwm-echo (from buffer text title)
|
|
|
|
"Use stumpwm to echo a message has arrived."
|
|
|
|
(oni:stumpwm-echo title))
|
|
|
|
|
|
|
|
(defun jabber-init-stumpwm-echo-muc (nick group buffer text title)
|
|
|
|
"Use stumpwm to echo a message has arrived."
|
|
|
|
(oni:stumpwm-echo title))
|
|
|
|
|
2014-11-04 10:26:08 +01:00
|
|
|
(setq jabber-account-list `((,(concat "tom@ryuslash.org/" system-name)
|
|
|
|
(:connection-type . starttls))))
|
|
|
|
|
|
|
|
(setq jabber-avatar-cache-directory "~/.emacs.d/jabber-avatars/"
|
2014-08-21 00:23:56 +02:00
|
|
|
jabber-chat-buffer-format "+%n"
|
|
|
|
jabber-chat-foreign-prompt-format "%t %u"
|
|
|
|
jabber-chat-local-prompt-format "%t %u"
|
|
|
|
jabber-chat-buffer-show-avatar nil
|
|
|
|
jabber-chat-fill-long-lines nil
|
|
|
|
jabber-chat-delayed-time-format "%H:%M"
|
|
|
|
|
|
|
|
jabber-chatstates-confirm nil
|
|
|
|
|
|
|
|
jabber-muc-colorize-local t
|
|
|
|
jabber-muc-colorize-foreign t
|
|
|
|
|
|
|
|
jabber-history-enabled t
|
|
|
|
jabber-use-global-history nil
|
|
|
|
jabber-history-dir "~/.emacs.d/jabber-hist"
|
|
|
|
|
|
|
|
jabber-groupchat-buffer-format "++%n"
|
|
|
|
jabber-groupchat-prompt-format "%t %u"
|
|
|
|
|
|
|
|
jabber-roster-show-bindings nil
|
|
|
|
jabber-show-offline-contacts nil
|
|
|
|
|
|
|
|
jabber-vcard-avatars-publish nil
|
|
|
|
jabber-vcard-avatars-retrieve nil)
|
|
|
|
(add-to-list 'jabber-account-list
|
|
|
|
`(,(concat "thomas@aethon.nl/" system-name)
|
|
|
|
(:network-server . "talk.google.com")
|
|
|
|
(:connection-type . ssl)))
|
|
|
|
|
2014-11-10 20:53:56 +01:00
|
|
|
(add-hook 'jabber-alert-message-hooks #'jabber-message-libnotify)
|
|
|
|
(add-hook 'jabber-alert-muc-hooks #'jabber-muc-libnotify)
|
2014-08-21 00:23:56 +02:00
|
|
|
;; (add-hook 'jabber-alert-message-hooks #'jabber-init-stumpwm-echo)
|
|
|
|
;; (add-hook 'jabber-alert-muc-hooks #'jabber-init-stumpwm-echo)
|
|
|
|
(add-hook 'jabber-chat-mode-hook #'visual-line-mode)
|
|
|
|
(add-hook 'jabber-roster-mode-hook #'jabber-init-roster-mode-func)
|
|
|
|
(add-hook 'jabber-alert-presence-hooks
|
|
|
|
#'jabber-init-show-status-in-buffer)
|
|
|
|
|
|
|
|
(remove-hook 'jabber-alert-presence-hooks #'jabber-presence-echo)
|
|
|
|
|
|
|
|
(global-set-key (kbd "<f6>") 'jabber-switch-to-roster-buffer)
|
|
|
|
|
2015-08-22 01:28:44 +02:00
|
|
|
(jabber-margin-prompts-mode)
|
2014-08-21 00:23:56 +02:00
|
|
|
|
|
|
|
(provide 'jabber-init)
|
|
|
|
;;; jabber-init.el ends here
|