summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--gnus.el4
-rw-r--r--init.el26
-rw-r--r--lisp/acdw-erc.el22
-rw-r--r--lisp/acdw.el4
4 files changed, 44 insertions, 12 deletions
diff --git a/gnus.el b/gnus.el index d179937..4a38733 100644 --- a/gnus.el +++ b/gnus.el
@@ -17,12 +17,12 @@
17;;; Code: 17;;; Code:
18 18
19;;; Private files 19;;; Private files
20(require 'acdw-private) 20(acdw/require-private)
21 21
22;;; Select Methods 22;;; Select Methods
23(setq gnus-select-method '(nnnil "")) 23(setq gnus-select-method '(nnnil ""))
24 24
25(add-hook 'gnus-startup-hook 25(add-hook 'gnus-started-hook
26 (defun gnus-startup@feed-setup () 26 (defun gnus-startup@feed-setup ()
27 (cond ((fboundp #'gnus/init-feed-list) 27 (cond ((fboundp #'gnus/init-feed-list)
28 (gnus/init-feed-list)) 28 (gnus/init-feed-list))
diff --git a/init.el b/init.el index aaddba6..7d32117 100644 --- a/init.el +++ b/init.el
@@ -46,7 +46,7 @@
46 (normal-top-level-add-subdirs-to-load-path)) 46 (normal-top-level-add-subdirs-to-load-path))
47 47
48;;;; Private stuff 48;;;; Private stuff
49(require 'acdw-private) 49(acdw/require-private)
50 50
51 51
52;;;; Utility functions and variables 52;;;; Utility functions and variables
@@ -259,24 +259,31 @@
259 erc-button-url-regexp browse-url-button-regexp 259 erc-button-url-regexp browse-url-button-regexp
260 erc-common-server-suffixes '(("tilde.chat\\'" . "~") 260 erc-common-server-suffixes '(("tilde.chat\\'" . "~")
261 ("libera.chat\\'" . "LC")) 261 ("libera.chat\\'" . "LC"))
262 erc-default-server "irc.tilde.chat" ; fuck freenode. all my friends hate
263 ; freenode.
264 erc-fill-function #'erc-fill-static
265 erc-fill-static-center 14
262 erc-header-line-face-method #'erc/update-header-line-show-disconnected 266 erc-header-line-face-method #'erc/update-header-line-show-disconnected
263 erc-hide-list '("JOIN" "NICK" "PART" "QUIT" "MODE" 267 erc-hide-list '("JOIN" "NICK" "PART" "QUIT" "MODE"
264 "324" "329" "332" "333" "353" "477") 268 "324" "329" "332" "333" "353" "477")
265 erc-interpret-controls-p t 269 erc-interpret-controls-p t
266 erc-interpret-mirc-color t 270 erc-interpret-mirc-color t
267 erc-join-buffer 'buffer 271 erc-join-buffer 'bury
268 erc-kill-buffer-on-part t 272 erc-kill-buffer-on-part t
269 erc-kill-queries-on-quit t 273 erc-kill-queries-on-quit t
270 erc-kill-server-buffer-on-quit t 274 erc-kill-server-buffer-on-quit t
271 erc-nick "acdw" 275 erc-nick "acdw"
272 erc-prompt (lambda () (concat (buffer-name) ">")) 276 erc-prompt (lambda () (acdw-erc/prompt))
273 erc-prompt-for-password nil ; use ~/.authinfo 277 erc-prompt-for-password nil ; use ~/.authinfo
274 erc/servers 278 erc/servers
275 (when (boundp 'erc-autojoin-channels-alist) 279 (when (boundp 'erc-autojoin-channels-alist)
276 (mapcar #'car erc-autojoin-channels-alist)) 280 (mapcar #'car erc-autojoin-channels-alist))
277 erc-server-coding-system '(utf-8 . utf-8) 281 erc-server-coding-system '(utf-8 . utf-8)
278 erc-track-exclude-types erc-hide-list 282 erc-track-exclude-types erc-hide-list
279 erc-track-position-in-mode-line 'before-modes) 283 erc-track-exclude-server-buffer t
284 erc-track-position-in-mode-line 'before-modes
285 erc-track-visibility nil ; only the selected frame
286 )
280 287
281 ;; Thanks bpalmer! 288 ;; Thanks bpalmer!
282 (advice-add 'show-paren-function :around 289 (advice-add 'show-paren-function :around
@@ -289,11 +296,12 @@
289 erc-track-mode 296 erc-track-mode
290 erc-truncate-mode) 297 erc-truncate-mode)
291 298
292 (setup (:straight erc-hl-nicks) 299 ;; (setup (:straight erc-hl-nicks)
293 (with-eval-after-load 'erc 300 ;; (with-eval-after-load 'erc
294 (require 'erc-hl-nicks) 301 ;; (require 'erc-hl-nicks)
295 (:option erc-hl-nicks-minimum-contrast-ratio 4.5) 302 ;; (:option erc-hl-nicks-minimum-contrast-ratio 4.5)
296 (:hook-into erc-mode)))) 303 ;; (:hook-into erc-mode)))
304 )
297 305
298(setup eshell 306(setup eshell
299 (:also-load acdw-eshell 307 (:also-load acdw-eshell
diff --git a/lisp/acdw-erc.el b/lisp/acdw-erc.el index 92ce6db..8cf9734 100644 --- a/lisp/acdw-erc.el +++ b/lisp/acdw-erc.el
@@ -66,6 +66,7 @@ If USE-TLS is non-nil, use TLS."
66(defun erc/connect () 66(defun erc/connect ()
67 "Connect to all the servers in `erc/servers'." 67 "Connect to all the servers in `erc/servers'."
68 (interactive) 68 (interactive)
69 (require 'erc)
69 (mapcar #'connect-to-erc erc/servers)) 70 (mapcar #'connect-to-erc erc/servers))
70 71
71(defun filter-server-buffers () 72(defun filter-server-buffers ()
@@ -79,7 +80,26 @@ If USE-TLS is non-nil, use TLS."
79 (dolist (buffer (filter-server-buffers)) 80 (dolist (buffer (filter-server-buffers))
80 (with-message (format "Killing server buffer: %s" (buffer-name buffer)) 81 (with-message (format "Killing server buffer: %s" (buffer-name buffer))
81 (with-current-buffer buffer 82 (with-current-buffer buffer
82 (erc-quit-server erc/bye-message))))) 83 (erc-quit-server erc/bye-message))))
84 (force-mode-line-update))
85
86(defun acdw-erc/prompt ()
87 "The prompt to show for ERC."
88 ;; Rewrite s-truncate to avoid dependency.
89 (let ((name (buffer-name))
90 (ellipsis "...")
91 (len erc-fill-static-center))
92 (if (and len (> (length name) (- len 2)))
93 (format "%s%s>"
94 (substring name 0 (- len 2 (length ellipsis)))
95 ellipsis)
96 (format "%s%s>" (let ((ss) ; Rewrite s-repeat to avoid dependency.
97 (num (- len 2 (length name))))
98 (while (> num 0)
99 (setq ss (cons " " ss))
100 (setq num (1- num)))
101 (apply #'concat ss))
102 name))))
83 103
84(provide 'acdw-erc) 104(provide 'acdw-erc)
85;;; acdw-erc.el ends here 105;;; acdw-erc.el ends here
diff --git a/lisp/acdw.el b/lisp/acdw.el index 48e754d..2f878a9 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -410,6 +410,10 @@ Prompt only if there are unsaved changes."
410 (custom-set-faces '(fringe 410 (custom-set-faces '(fringe
411 ((t (:foreground "dim gray")))))) 411 ((t (:foreground "dim gray"))))))
412 412
413(defun acdw/require-private ()
414 "Require `acdw-private', which is in private.el."
415 (require 'acdw-private "private.el"))
416
413 417
414;;; URL regexp 418;;; URL regexp
415;; really, I just want to add gemini:// protocol, but I'm going to do some 419;; really, I just want to add gemini:// protocol, but I'm going to do some