summaryrefslogtreecommitdiffstats
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
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 :)
-rw-r--r--.emacs.d/init.el46
-rw-r--r--.emacs.d/straight/versions/default.el3
2 files changed, 48 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
diff --git a/.emacs.d/straight/versions/default.el b/.emacs.d/straight/versions/default.el
index 44bd9db..88c8fd8 100644
--- a/.emacs.d/straight/versions/default.el
+++ b/.emacs.d/straight/versions/default.el
@@ -28,6 +28,8 @@
("emmet-mode" . "1acb821e0142136344ccf40c1e5fb664d7db2e70")
("epkgs" . "e32dac233bf3be6e023f45e53ff3c95d17453c3b")
("epl" . "78ab7a85c08222cd15582a298a364774e3282ce6")
+ ("erc-hl-nicks" . "756c4438a8245ccd3e389bf6c9850ee8453783ec")
+ ("erc-scrolltoplace" . "feb0fbf1fd4bdf220ae2d31ea7c066d8e62089f9")
("eshell-up" . "9c100bae5c3020e8d9307e4332d3b64e7dc28519")
("exec-path-from-shell" . "3cfedb8791397ed50ee66bc0a7cbee5b9d78245c")
("expand-region.el" . "1c31447730443d98f90f65dfcb752f347d46ad1b")
@@ -84,6 +86,7 @@
("soap-client" . "7afb2f3e987edc8a7e77ac1a8c3871a9cfa8837e")
("straight.el" . "3453f364fde3272f81bde28791ac2028a9cf156f")
("swiper" . "b65cdb52aac4e2fbff0629c0d3f7e72cc927abcd")
+ ("switch-buffer-functions-el" . "b8d8e01e21ae8c8c84234dddeb3cc8250814f7ba")
("tablist" . "8079801527da1f596bc942162026328d7bdf6ad9")
("transient" . "cac657a03ea2a8a6e0b6b35e3e34beb06f896e02")
("treepy.el" . "b40e6b09eb9be45da67b8c9e4990a5a0d7a2a09d")