about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el70
1 files changed, 70 insertions, 0 deletions
diff --git a/init.el b/init.el index 8aca951..e471f5d 100644 --- a/init.el +++ b/init.el
@@ -378,3 +378,73 @@
378(use-package rainbow-mode 378(use-package rainbow-mode
379 :hook 379 :hook
380 (prog-mode . rainbow-mode)) 380 (prog-mode . rainbow-mode))
381
382(defun my/fetch-password (&rest params)
383 "Fetch a password from auth-sources"
384 (require 'auth-source)
385 (let ((match (car (apply 'auth-source-search params))))
386 (if match
387 (let ((secret (plist-get match :secret)))
388 (if (functionp secret)
389 (funcall secret)
390 secret))
391 (error "Password not found for %S" params))))
392
393(defun my/sasl-password (nick server)
394 "Fetch a password for $server and $nick"
395 (my/fetch-password :user nick :host server))
396
397(use-package circe
398 :init
399 (require 'lui-autopaste)
400 (defun my/circe-prompt ()
401 (lui-set-prompt
402 (concat (propertize (concat (buffer-name) ">")
403 'face 'circe-prompt-face)
404 " ")))
405 (defun my/lui-setup ()
406 (setq right-margin-width 5
407 fringes-outside-margins t
408 word-wrap t
409 wrap-prefix " ")
410 (setf (cdr (assoc 'continuation fringe-indicator-alist)) nil))
411 :hook
412 (circe-channel-mode . enable-lui-autopaste)
413 (circe-chat-mode-hook . my/circe-prompt)
414 (lui-mode-hook . my/circe-set-margin)
415 :custom
416 (circe-reduce-lurker-spam t)
417 (circe-format-say "{nick:-16s} {body}")
418 (lui-time-stamp-position 'right-margin)
419 (lui-fill-type nil)
420 (lui-time-stamp-format "%H:%M")
421 (lui-track-bar-behavior 'before-switch-to-buffer)
422 (circe-network-options
423 `(("Freenode"
424 :tls t
425 :port 6697
426 :nick "acdw"
427 :sasl-username "acdw"
428 :sasl-password ,(my/sasl-password "acdw" "irc.freenode.net")
429 :channels ("#emacs" "#daydreams"))
430 ("Tilde.chat"
431 :tls t
432 :port 6697
433 :nick "acdw"
434 :sasl-username "acdw"
435 :sasl-password ,(my/sasl-password "acdw" "irc.tilde.chat")
436 :channels ("#gemini" "#meta"))))
437 :custom-face
438 (circe-my-message-face ((t (:foreground "dark violet"))))
439 :config
440 (enable-lui-track-bar))
441
442;; elfeed
443(use-package elfeed
444 :custom
445 (elfeed-feeds
446 '("https://planet.emacslife.com/atom.xml")))
447
448(use-package smartparens
449 :config
450 (smartparens-global-mode))