summaryrefslogtreecommitdiffstats
path: root/.emacs.d/init.el
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2019-05-25 18:42:57 -0400
committerAmin Bandali <bandali@gnu.org>2019-05-25 18:42:57 -0400
commit96840c88ee85277e4e8ca34bf741fd448aa4e59f (patch)
tree31c3d7eb7d431da9d71dfee83c2914c608d5030f /.emacs.d/init.el
parentf0d99991ba0e5016dbdda13e01ee34c2bfddaf3e (diff)
downloadconfigs-96840c88ee85277e4e8ca34bf741fd448aa4e59f.tar.gz
configs-96840c88ee85277e4e8ca34bf741fd448aa4e59f.tar.xz
configs-96840c88ee85277e4e8ca34bf741fd448aa4e59f.zip
emacs: customize erc
with this, it fully eliminates my need/use for weechat :)
Diffstat (limited to '.emacs.d/init.el')
-rw-r--r--.emacs.d/init.el46
1 files changed, 45 insertions, 1 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index b0a340d..948c457 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -1998,6 +1998,48 @@ https://csclub.uwaterloo.ca/~abandali/")
;;; IRC
+(use-feature erc
+ :bind (("C-c a e b" . erc-switch-to-buffer)
+ :map erc-mode-map
+ ("M-a" . erc-track-switch-buffer))
+ :custom
+ (erc-fill-function 'erc-fill-static)
+ (erc-fill-static-center 18)
+ (erc-join-buffer 'bury)
+ (erc-lurker-hide-list '("JOIN" "PART" "QUIT"))
+ (erc-nick "bandali")
+ (erc-pcomplete-nick-postfix ",")
+ (erc-rename-buffers t)
+ (erc-server-reconnect-attempts 5)
+ (erc-server-reconnect-timeout 3)
+ (erc-track-exclude-types '("JOIN" "MODE" "NICK" "PART" "QUIT"
+ "324" "329" "332" "333" "353" "477"))
+ (erc-track-priority-faces-only 'all)
+ :config
+ (with-eval-after-load 'ivy
+ ;; ignore channel buffer names
+ (add-to-list 'ivy-ignore-buffers "^#"))
+ (defun erc-cmd-OPME ()
+ "Request chanserv to op me."
+ (erc-message "PRIVMSG"
+ (format "chanserv op %s %s"
+ (erc-default-target)
+ (erc-current-nick)) nil))
+ (defun erc-cmd-DEOPME ()
+ "Deop myself from current channel."
+ (erc-cmd-DEOP (format "%s" (erc-current-nick))))
+ (add-to-list 'erc-modules 'keep-place)
+ (add-to-list 'erc-modules 'notifications)
+ (add-to-list 'erc-modules 'spelling)
+ (add-to-list 'erc-modules 'scrolltoplace)
+ (erc-update-modules))
+
+(use-package erc-hl-nicks
+ :after erc)
+
+(use-package erc-scrolltoplace
+ :after erc)
+
(use-package znc
:straight (:host nil :repo "https://git.bndl.org/amin/znc.el")
:bind (("C-c a e e" . znc-erc)
@@ -2011,7 +2053,9 @@ https://csclub.uwaterloo.ca/~abandali/")
`(("znc.bndl.org" 1337 t
((freenode "amin/freenode" ,pwd)))
("znc.bndl.org" 1337 t
- ((moznet "amin/moznet" ,pwd)))))))
+ ((moznet "amin/moznet" ,pwd)))
+ ("znc.bndl.org" 1337 t
+ ((oftc "amin/oftc" ,pwd)))))))
;;; Post initialization