summary refs log tree commit diff
diff options
context:
space:
mode:
authornoa@gaiwan.org2024-06-13 01:04:53 +0000
committernoa@gaiwan.org2024-06-13 01:04:53 +0000
commit1c3ebf9205025b1563d72ec5e9ed9abbe08250a8 (patch)
tree357ec01c4c478ac7d57f7ca6f01c8a1309f95275
parent3b5eb9da79157a8d98d2f493775d40fb1051ed7d (diff)
Update jabber configuration
-rw-r--r--emacs/init.el62
1 files changed, 26 insertions, 36 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 6a99140..92eeca6 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -107,38 +107,31 @@
 	:custom (beacon-mode t))
 
 (use-package jabber
-	:ensure t
-	:init
-	(setq noa/jabber-activity-dont-show '(
-		"#tildetown%town@irc.hmm.st"
-		"#meta%tilde.chat@irc.hmm.st"
-	))
-	(defun noa/jabber-activity-show-p (jid)
-		"Return non-nil if JID should be hidden.
+  :ensure t
+  :init
+  (setq noa/jabber-activity-dont-show '(
+					"#tildetown%town@irc.hmm.st"
+					"#meta%tilde.chat@irc.hmm.st"
+					"hmm@conference.hmm.st"))
+  (defun noa/jabber-activity-show-p (jid)
+    "Return non-nil if JID should be hidden.
 A JID should be hidden when there is an invisible buffer for JID,
 when JID is not in `noa/jabber-activity-dont-show',
 and when JID is not in `jabber-activity-banned'."
-		(let ((buffer (jabber-activity-find-buffer-name jid)))
-			(and
-				(buffer-live-p buffer)
-				(not (get-buffer-window buffer 'visible))
-				(not
-					(cl-dolist (entry jabber-activity-banned)
-						(when (string-match entry jid)
-							(cl-return t))))
-				(not
-					(cl-dolist (entry noa/jabber-activity-dont-show)
-						(when (string-match entry jid)
-							(cl-return t))))
-			)
-		)
-	)
-	:custom
-	(jabber-history-enabled t)
-	(jabber-account-list '(("noa@hmm.st")))
-	(jabber-keepalive-interval 60)
-	(jabber-activity-show-p #'noa/jabber-activity-show-p)
-)
+    (let ((buffer (jabber-activity-find-buffer-name jid)))
+      (and (buffer-live-p buffer)
+	   (not (get-buffer-window buffer 'visible))
+	   (not (cl-dolist (entry jabber-activity-banned)
+		  (when (string-match entry jid)
+		    (cl-return t))))
+	   (not (cl-dolist (entry noa/jabber-activity-dont-show)
+		  (when (string-match entry jid)
+		    (cl-return t)))))))
+  :custom
+  (jabber-history-enabled t)
+  (jabber-account-list '(("noa@hmm.st")))
+  (jabber-keepalive-interval 60)
+  (jabber-activity-show-p #'noa/jabber-activity-show-p))
 
 (use-package nov
 	:ensure t
@@ -156,11 +149,9 @@ and when JID is not in `jabber-activity-banned'."
 ;; consult-buffer replaces the buffer menu.  as well as listing buffers, it lists bookmarks and recent files.
 (use-package consult
 	:ensure t
-	:bind (
-		([remap switch-to-buffer] . consult-buffer)
-		([remap yank-pop] . consult-yank-pop)
-		([remap goto-line] . consult-goto-line))
-	)
+	:bind (([remap switch-to-buffer] . consult-buffer)	;; also contains file history, etc
+	      ([remap yank-pop] . consult-yank-pop)	;; like normal yank-pop but with live preview
+	      ([remap goto-line] . consult-goto-line)))
 
 (use-package marginalia
 	:ensure t
@@ -170,8 +161,7 @@ and when JID is not in `jabber-activity-banned'."
 	(marginalia-max-relative-age most-positive-fixnum)
 	(marginalia-align 'right))
 
-;; My keyboard has a tab key and an i key.  For legacy reasons, by default emacs converts C-i to mean the same thing as the tab key, but i don't really want that.
-;; The tab key is called <tab> and it gets translated to TAB.  C-i is TAB, but i'd rather it by C-i.  That's what this decode line does.
+;; My keyboard has a tab key and an i key.  For legacy reasons, by default emacs converts C-i to mean the same thing as the tab key, but i don't really want that.  The tab key is called <tab> and it gets translated to TAB.  C-i is TAB, but i'd rather it by C-i.  That's what this decode line does.
 (define-key input-decode-map [?\C-i] [C-i])
 ;; Now that tab and C-i are properly distinguished, i can bind C-i to completion at point.
 (global-set-key (kbd "<C-i>") 'completion-at-point)