summaryrefslogtreecommitdiff
path: root/jakob.org
diff options
context:
space:
mode:
authorJakob L. Kreuze2019-03-13 17:02:57 -0400
committerJakob L. Kreuze2019-03-13 17:02:57 -0400
commitbddfef04c252c48515b15157eba1806cab422abd (patch)
treeef1fa3df1844faf0ea4486b9b3da27ad81796663 /jakob.org
parent4f486d5f00d2f897f7adcb7fcf3b49c8a629d6db (diff)
Configure erc-status-sidebar
Diffstat (limited to 'jakob.org')
-rw-r--r--jakob.org56
1 files changed, 52 insertions, 4 deletions
diff --git a/jakob.org b/jakob.org
index af7f60d..0367803 100644
--- a/jakob.org
+++ b/jakob.org
@@ -627,7 +627,8 @@ they look like."
`(org-warning ((,class (:foreground ,white-0 :background ,red-4))))
;; erc
- `(erc-input-face ((,class (:foreground ,white-1)))))
+ `(erc-input-face ((,class (:foreground ,white-1))))
+ `(erc-button ((,class (:inherit link)))))
(custom-theme-set-variables
'chayote
@@ -1369,7 +1370,8 @@ networks my bouncer is connected to.
(dolist (network irc-autoconnect-networks)
(if (string= network "bitlbee")
(bitlbee-connect)
- (connect-bouncer network))))
+ (connect-bouncer network)))
+ (erc-status-sidebar-open))
(defun irc-quit ()
"Disconnects from and kills all buffers associated with ERC,
@@ -1493,7 +1495,7 @@ Hide JOIN/PART/QUIT messages from idlers.
erc-lurker-threshold-time 3600)
#+END_SRC
-Enable =erc-track= to ignore the less interesting message types.
+Configure =erc-track= to ignore the less interesting message types.
#+BEGIN_SRC elisp
:init
@@ -1502,9 +1504,13 @@ Enable =erc-track= to ignore the less interesting message types.
"324" "329" "332" "333" "353" "477"))
#+END_SRC
-Enable channel tracking.
+Enable channel tracking, but disable the modeline element as I'm using
+=erc-status-sidebar=.
#+BEGIN_SRC elisp
+ :init
+ (setq erc-track-position-in-mode-line nil)
+
:config
(erc-track-minor-mode 1)
(erc-track-mode 1)
@@ -1518,6 +1524,19 @@ preceding it to be read-only, anyway.
(erc-move-to-prompt-enable)
#+END_SRC
+Bind a key for resetting =erc-track=, since I tend to get absolutely bombarded
+upon reconnecting.
+
+#+BEGIN_SRC elisp
+ :bind
+ (:map erc-mode-map
+ ("C-c f" . (lambda ()
+ (interactive)
+ (setq erc-modified-channels-alist nil)
+ (erc-modified-channels-update)
+ (erc-status-sidebar-refresh))))
+#+END_SRC
+
Let =erc-fill= handle filling.
#+BEGIN_SRC elisp
@@ -1549,6 +1568,35 @@ Configure the =bitlbee= package for starting an inferior Bitlbee process.
(setq bitlbee-user-directory "~/.config/bitlbee/"))
#+END_SRC
+Configure a custom channame format for =erc-status-sidebar=.
+
+#+BEGIN_SRC elisp
+(use-package erc-status-sidebar
+ :init
+ (setq erc-status-sidebar-width 30)
+
+ :config
+ (defun erc-reverse-chan-format (channame &optional num-messages erc-face)
+ "Format CHANNAME for display in the sidebar.
+
+ If NUM-MESSAGES is non-nil, prepend it to the channel name. If
+ ERC-FACE is non-nil, apply it to channel name. If it is equal to
+ `erc-default-face', also apply bold property to make the channel
+ name stand out."
+ (if num-messages
+ (let* ((padding-length (- 6 (length (format "[%d]" num-messages))))
+ (padding (make-string padding-length ? )))
+ (setq channame (format "[%d]%s%s" num-messages padding channame)))
+ (setq channame (format "%s%s" (make-string 6 ? ) channame)))
+ (when erc-face
+ (put-text-property 0 (length channame) 'face erc-face channame)
+ (when (eq erc-face 'erc-default-face)
+ (add-face-text-property 0 (length channame) 'bold t channame)))
+ channame)
+
+ (setq erc-status-sidebar-channel-format #'erc-reverse-chan-format))
+#+END_SRC
+
* RSS
Preference of hygene. See [[Filesystem]].

© 2015 - 2026 Jakob L. Kreuze