Merge branch 'main' of tildegit.org:acdw/emacs
This commit is contained in:
commit
924d0fc4c7
4
gnus.el
4
gnus.el
|
@ -17,12 +17,12 @@
|
|||
;;; Code:
|
||||
|
||||
;;; Private files
|
||||
(require 'acdw-private)
|
||||
(acdw/require-private)
|
||||
|
||||
;;; Select Methods
|
||||
(setq gnus-select-method '(nnnil ""))
|
||||
|
||||
(add-hook 'gnus-startup-hook
|
||||
(add-hook 'gnus-started-hook
|
||||
(defun gnus-startup@feed-setup ()
|
||||
(cond ((fboundp #'gnus/init-feed-list)
|
||||
(gnus/init-feed-list))
|
||||
|
|
26
init.el
26
init.el
|
@ -46,7 +46,7 @@
|
|||
(normal-top-level-add-subdirs-to-load-path))
|
||||
|
||||
;;;; Private stuff
|
||||
(require 'acdw-private)
|
||||
(acdw/require-private)
|
||||
|
||||
|
||||
;;;; Utility functions and variables
|
||||
|
@ -259,24 +259,31 @@
|
|||
erc-button-url-regexp browse-url-button-regexp
|
||||
erc-common-server-suffixes '(("tilde.chat\\'" . "~")
|
||||
("libera.chat\\'" . "LC"))
|
||||
erc-default-server "irc.tilde.chat" ; fuck freenode. all my friends hate
|
||||
; freenode.
|
||||
erc-fill-function #'erc-fill-static
|
||||
erc-fill-static-center 14
|
||||
erc-header-line-face-method #'erc/update-header-line-show-disconnected
|
||||
erc-hide-list '("JOIN" "NICK" "PART" "QUIT" "MODE"
|
||||
"324" "329" "332" "333" "353" "477")
|
||||
erc-interpret-controls-p t
|
||||
erc-interpret-mirc-color t
|
||||
erc-join-buffer 'buffer
|
||||
erc-join-buffer 'bury
|
||||
erc-kill-buffer-on-part t
|
||||
erc-kill-queries-on-quit t
|
||||
erc-kill-server-buffer-on-quit t
|
||||
erc-nick "acdw"
|
||||
erc-prompt (lambda () (concat (buffer-name) ">"))
|
||||
erc-prompt (lambda () (acdw-erc/prompt))
|
||||
erc-prompt-for-password nil ; use ~/.authinfo
|
||||
erc/servers
|
||||
(when (boundp 'erc-autojoin-channels-alist)
|
||||
(mapcar #'car erc-autojoin-channels-alist))
|
||||
erc-server-coding-system '(utf-8 . utf-8)
|
||||
erc-track-exclude-types erc-hide-list
|
||||
erc-track-position-in-mode-line 'before-modes)
|
||||
erc-track-exclude-server-buffer t
|
||||
erc-track-position-in-mode-line 'before-modes
|
||||
erc-track-visibility nil ; only the selected frame
|
||||
)
|
||||
|
||||
;; Thanks bpalmer!
|
||||
(advice-add 'show-paren-function :around
|
||||
|
@ -289,11 +296,12 @@
|
|||
erc-track-mode
|
||||
erc-truncate-mode)
|
||||
|
||||
(setup (:straight erc-hl-nicks)
|
||||
(with-eval-after-load 'erc
|
||||
(require 'erc-hl-nicks)
|
||||
(:option erc-hl-nicks-minimum-contrast-ratio 4.5)
|
||||
(:hook-into erc-mode))))
|
||||
;; (setup (:straight erc-hl-nicks)
|
||||
;; (with-eval-after-load 'erc
|
||||
;; (require 'erc-hl-nicks)
|
||||
;; (:option erc-hl-nicks-minimum-contrast-ratio 4.5)
|
||||
;; (:hook-into erc-mode)))
|
||||
)
|
||||
|
||||
(setup eshell
|
||||
(:also-load acdw-eshell
|
||||
|
|
|
@ -66,6 +66,7 @@ If USE-TLS is non-nil, use TLS."
|
|||
(defun erc/connect ()
|
||||
"Connect to all the servers in `erc/servers'."
|
||||
(interactive)
|
||||
(require 'erc)
|
||||
(mapcar #'connect-to-erc erc/servers))
|
||||
|
||||
(defun filter-server-buffers ()
|
||||
|
@ -79,7 +80,26 @@ If USE-TLS is non-nil, use TLS."
|
|||
(dolist (buffer (filter-server-buffers))
|
||||
(with-message (format "Killing server buffer: %s" (buffer-name buffer))
|
||||
(with-current-buffer buffer
|
||||
(erc-quit-server erc/bye-message)))))
|
||||
(erc-quit-server erc/bye-message))))
|
||||
(force-mode-line-update))
|
||||
|
||||
(defun acdw-erc/prompt ()
|
||||
"The prompt to show for ERC."
|
||||
;; Rewrite s-truncate to avoid dependency.
|
||||
(let ((name (buffer-name))
|
||||
(ellipsis "...")
|
||||
(len erc-fill-static-center))
|
||||
(if (and len (> (length name) (- len 2)))
|
||||
(format "%s%s>"
|
||||
(substring name 0 (- len 2 (length ellipsis)))
|
||||
ellipsis)
|
||||
(format "%s%s>" (let ((ss) ; Rewrite s-repeat to avoid dependency.
|
||||
(num (- len 2 (length name))))
|
||||
(while (> num 0)
|
||||
(setq ss (cons " " ss))
|
||||
(setq num (1- num)))
|
||||
(apply #'concat ss))
|
||||
name))))
|
||||
|
||||
(provide 'acdw-erc)
|
||||
;;; acdw-erc.el ends here
|
||||
|
|
|
@ -410,6 +410,10 @@ Prompt only if there are unsaved changes."
|
|||
(custom-set-faces '(fringe
|
||||
((t (:foreground "dim gray"))))))
|
||||
|
||||
(defun acdw/require-private ()
|
||||
"Require `acdw-private', which is in private.el."
|
||||
(require 'acdw-private "private.el"))
|
||||
|
||||
|
||||
;;; URL regexp
|
||||
;; really, I just want to add gemini:// protocol, but I'm going to do some
|
||||
|
|
Loading…
Reference in New Issue