about summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2020-09-15 21:52:42 -0500
committerCase Duckworth2020-09-15 21:52:42 -0500
commit3c54de70d15432fbd4b23e56f3153f523a3657aa (patch)
treecdb5ece71d1602261c41e3e561cc1e45445e137a /init.el
parentRandom changes (diff)
downloademacs-3c54de70d15432fbd4b23e56f3153f523a3657aa.tar.gz
emacs-3c54de70d15432fbd4b23e56f3153f523a3657aa.zip
Add circe
Diffstat (limited to 'init.el')
-rw-r--r--init.el69
1 files changed, 67 insertions, 2 deletions
diff --git a/init.el b/init.el index 8bf9604..1943d8c 100644 --- a/init.el +++ b/init.el
@@ -489,5 +489,70 @@
489 489
490 (use-package exwm-edit) 490 (use-package exwm-edit)
491 491
492 ) 492 ) ;; end of acdw/at-larry block for exwm
493;; end of acdw/at-larry block for exwm 493
494;;; other applications
495(use-package circe
496 :init
497 (defun my/fetch-password (&rest params)
498 "Fetch a password from auth-sources"
499 (require 'auth-source)
500 (let ((match (car (apply 'auth-source-search params))))
501 (if match
502 (let ((secret (plist-get match :secret)))
503 (if (functionp secret)
504 (funcall secret)
505 secret))
506 (error "Password not found for %S" params))))
507
508 (defun my/sasl-password (nick server)
509 "Fetch a password for $server and $nick"
510 (my/fetch-password :user nick :host server))
511 (require 'lui-autopaste)
512 (defun my/circe-prompt ()
513 (lui-set-prompt
514 (concat (propertize (concat (buffer-name) ">")
515 'face 'circe-prompt-face)
516 " ")))
517 (defun my/lui-setup ()
518 (setq right-margin-width 5
519 fringes-outside-margins t
520 word-wrap t
521 wrap-prefix " ")
522 (setf (cdr (assoc 'continuation fringe-indicator-alist)) nil))
523 :hook
524 (circe-channel-mode-hook . enable-lui-autopaste)
525 (circe-chat-mode-hook . my/circe-prompt)
526 (lui-mode-hook . my/lui-setup)
527 :config
528 (setq circe-default-part-message "Peace out, cub scouts")
529 (setq circe-default-quit-message "See You Space Cowpokes ......")
530 (setq circe-default-realname "Case D")
531 (setq circe-highlight-nick-type 'all)
532 (setq circe-reduce-lurker-spam t)
533 (setq circe-format-say "{nick:-12s} {body}")
534 (setq circe-format-self-say "{nick:-11s}> {body}")
535 (setq lui-time-stamp-position 'right-margin)
536 (setq lui-fill-type nil)
537 (setq lui-time-stamp-format "%H:%M")
538 (setq lui-track-bar-behavior 'before-switch-to-buffer)
539 (setq circe-network-options
540 `(("Freenode"
541 :tls t
542 :port 6697
543 :nick "acdw"
544 :sasl-username "acdw"
545 :sasl-password ,(my/sasl-password "acdw" "irc.freenode.net")
546 :channels ("#emacs" "#daydreams"))
547 ("Tilde.chat"
548 :tls t
549 :port 6697
550 :nick "acdw"
551 :sasl-username "acdw"
552 :sasl-password ,(my/sasl-password "acdw" "irc.tilde.chat")
553 :channels ("#gemini" "#meta"))))
554 (enable-lui-track-bar)
555 :custom-face
556 (circe-my-message-face ((t (:inherit 'circe-highlight-nick-face :weight normal))))
557 (circe-originator-face ((t (:weight bold))))
558 (circe-prompt-face ((t (:inherit 'circe-my-message-face)))))