summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-05-23 02:16:46 +0100
committerjao <jao@gnu.org>2021-05-23 02:16:46 +0100
commit592e4e8d56959c95a4e4eaf9a1cc49c7be9deb80 (patch)
treeb9860fe864406e711b217f2e6680229d24a9ce27
parent6c22e83492d4acdaadf6507edc2e0100dc2fd418 (diff)
downloadelibs-592e4e8d56959c95a4e4eaf9a1cc49c7be9deb80.tar.gz
elibs-592e4e8d56959c95a4e4eaf9a1cc49c7be9deb80.tar.bz2
circe configuration
-rw-r--r--attic/misc.org78
-rw-r--r--completion.org2
-rw-r--r--exwm.org3
-rw-r--r--init.org100
4 files changed, 100 insertions, 83 deletions
diff --git a/attic/misc.org b/attic/misc.org
index 12ebdd4..83f969c 100644
--- a/attic/misc.org
+++ b/attic/misc.org
@@ -209,81 +209,3 @@
:diminish ((rcirc-omit-mode . "")))
#+end_src
-* circe
- #+begin_src emacs-lisp
- (defvar jao-irc-channels '())
- (use-package circe
- :ensure t
- :bind (:map circe-channel-mode-map
- (("C-c C-a" . lui-track-jump-to-indicator)))
- :init
- (setq circe-default-realname "https://jao.io"
- circe-default-part-message ""
- circe-default-quit-message ""
- circe-ignore-list nil
- circe-server-coding-system '(undecided . undecided)
- circe-server-killed-confirmation 'ask-and-kill-all
- circe-server-auto-join-default-type :after-auth
- circe-format-say "({nick}) {body}"
- circe-format-self-say "(jao) {body}"
- circe-new-buffer-behavior 'ignore
- circe-new-buffer-behavior-ignore-auto-joins t
- circe-nickserv-ghost-style 'after-auth
- circe-prompt-string ": "
- circe-completion-suffix ", "
- circe-reduce-lurker-spam t
-
- circe-nick-next-function
- (lambda (old)
- (replace-regexp-in-string "-" "`" (circe-nick-next old)))
-
- circe-lagmon-mode-line-format-string "" ;; "%.0f "
- circe-lagmon-mode-line-unknown-lag-string "" ;; "? "
- circe-lagmon-timer-tick 120
- circe-lagmon-reconnect-interval 180
-
- lui-max-buffer-size 30000
- lui-fill-column 80
- lui-time-stamp-position 'right
- lui-time-stamp-format "%H:%M"
- lui-flyspell-p nil
-
- lui-track-indicator 'fringe
- lui-track-behavior 'before-tracking-next-buffer)
- :config
-
- (defun circe-command-RECOVER (&rest ignore)
- "Recover nick"
- (let* ((fn (jao--get-user/password "freenode"))
- (u (car fn))
- (p (cadr fn)))
- (circe-command-MSG "nickserv" (format "IDENTIFY %s %s" u p))
- (circe-command-MSG "nickserv" (format "GHOST %s" u))
- (circe-command-MSG "nickserv" (format "RELEASE %s" u))
- (circe-command-NICK u)))
-
- (defvar jao-bitlbee-channels ())
- (setq circe-network-options
- (let ((up (jao--get-user/password "freenode"))
- (bup (jao--get-user/password "bitlbee")))
- `(("libera"
- :host "irc.libera.chat" :port 6667
- :nick ,(car up) :channels ,jao-irc-channels
- :tls t :nickserv-password ,(cadr up))
- ("Freenode" :nick ,(car up) :channels ,jao-irc-channels
- :tls t :sasl-username ,(car up) :sasl-password ,(cadr up))
- ("Bitlbee"
- :host "127.0.0.1" :nick ,(car bup)
- :channels ,jao-bitlbee-channels
- :lagmon-disabled t
- :nickserv-password ,(cadr bup) :user ,(car bup)))))
-
- (jao-shorten-modes 'circe-channel-mode
- 'circe-server-mode
- 'circe-query-mode)
-
- (circe-lagmon-mode)
- (enable-circe-color-nicks)
- (enable-circe-display-images)
- (enable-lui-track))
- #+end_src
diff --git a/completion.org b/completion.org
index 04d09dc..f245e70 100644
--- a/completion.org
+++ b/completion.org
@@ -207,6 +207,8 @@
:hidden t
:narrow (cons ?c "chats")
:items (jao-consult--mode-buffers 'erc-mode
+ 'circe-channel-mode
+ 'circe-query-mode
'signel-chat-mode
'slack-message-buffer-mode
'slack-thread-message-buffer-mode
diff --git a/exwm.org b/exwm.org
index 1bfedf4..351209e 100644
--- a/exwm.org
+++ b/exwm.org
@@ -475,7 +475,8 @@
(("c" (jao-chats t) "connect chats")
("t" (jao-buffer-same-mode 'telega-chat-mode) "telegram")
("s" (jao-buffer-same-mode 'slack-message-buffer-mode) "slack")
- ("i" (jao-buffer-same-mode 'erc-mode) "irc"))
+ ("i" (jao-buffer-same-mode '(circe-channel-mode circe-query-mode erc-mode))
+ "irc"))
"Looks"
(;; ("T" jao-toggle-transparency "toggle transparency"
;; :toggle (jao-transparent-p) :color red)
diff --git a/init.org b/init.org
index cb70607..0b458d9 100644
--- a/init.org
+++ b/init.org
@@ -2391,7 +2391,10 @@
(save-buffer))
(let ((filename (expand-file-name buffer-file-name)))
(with-temp-buffer
- (byte-compile-file filename t))))
+ (if (not (native-comp-available-p))
+ (byte-compile-file filename t)
+ (native-compile filename)
+ (load-library (file-name-base filename))))))
#+end_src
@@ -2929,6 +2932,93 @@
(when (or yes (y-or-n-p "Connect to libera using ERC? "))
(erc-select :server "irc.libera.chat")))
#+end_src
+*** circe
+ #+begin_src emacs-lisp
+ (defvar jao-irc-channels '())
+ (use-package circe
+ :ensure t
+ :bind (:map circe-channel-mode-map
+ (("C-c C-a" . lui-track-jump-to-indicator)))
+ :init
+ (setq circe-default-realname "https://jao.io"
+ circe-default-part-message ""
+ circe-default-quit-message ""
+ circe-ignore-list nil
+ circe-server-coding-system '(undecided . undecided)
+ circe-server-killed-confirmation 'ask-and-kill-all
+ circe-server-auto-join-default-type :after-auth
+ circe-format-say "({nick}) {body}"
+ circe-format-self-say "(jao) {body}"
+ circe-new-buffer-behavior 'ignore
+ circe-new-buffer-behavior-ignore-auto-joins t
+ circe-nickserv-ghost-style 'after-auth
+ circe-prompt-string ": "
+ circe-completion-suffix ", "
+ circe-reduce-lurker-spam t
+
+ circe-nick-next-function
+ (lambda (old)
+ (replace-regexp-in-string "-" "`" (circe-nick-next old)))
+
+ circe-lagmon-mode-line-format-string "" ;; "%.0f "
+ circe-lagmon-mode-line-unknown-lag-string "" ;; "? "
+ circe-lagmon-timer-tick 120
+ circe-lagmon-reconnect-interval 180
+
+ lui-max-buffer-size 30000
+ lui-fill-column 80
+ lui-time-stamp-position 'right
+ lui-time-stamp-format "%H:%M"
+ lui-flyspell-p nil
+
+ lui-track-indicator 'fringe
+ lui-track-behavior 'before-tracking-next-buffer)
+ :config
+
+ (defun circe-command-RECOVER (&rest ignore)
+ "Recover nick"
+ (let* ((fn (jao--get-user/password "freenode"))
+ (u (car fn))
+ (p (cadr fn)))
+ (circe-command-MSG "nickserv" (format "IDENTIFY %s %s" u p))
+ (circe-command-MSG "nickserv" (format "GHOST %s" u))
+ (circe-command-MSG "nickserv" (format "RELEASE %s" u))
+ (circe-command-NICK u)))
+
+ (defvar jao-bitlbee-channels ())
+ (setq circe-network-options
+ (let ((up (jao--get-user/password "freenode"))
+ (bup (jao--get-user/password "bitlbee")))
+ `(("libera" :host "irc.libera.chat"
+ :port (6667 . 6697)
+ :tls t :nick ,(car up) :channels ,jao-irc-channels
+ :tls t :sasl-username ,(car up) :sasl-password ,(cadr up)
+ :nickserv-mask "^NickServ!NickServ@services\\.$"
+ :nickserv-identify-challenge
+ "\C-b/msg\\s-NickServ\\s-identify\\s-<password>\C-b"
+ :nickserv-identify-command
+ "PRIVMSG NickServ :IDENTIFY {nick} {password}"
+ :nickserv-identify-confirmation
+ "^You are now identified for .*\\.$"
+ :nickserv-ghost-command
+ "PRIVMSG NickServ :GHOST {nick} {password}"
+ :nickserv-ghost-confirmation
+ "has been ghosted\\.$\\|is not online\\.$")
+ ("Bitlbee"
+ :host "127.0.0.1" :nick ,(car bup)
+ :channels ,jao-bitlbee-channels
+ :lagmon-disabled t
+ :nickserv-password ,(cadr bup) :user ,(car bup)))))
+
+ (jao-shorten-modes 'circe-channel-mode
+ 'circe-server-mode
+ 'circe-query-mode)
+
+ (circe-lagmon-mode)
+ (enable-circe-color-nicks)
+ (enable-circe-display-images)
+ (enable-lui-track))
+ #+end_src
*** slack
[[https://github.com/jackellenberger/emojme#finding-a-slack-token][How to get a token]]: It's easyish! Open and sign into the slack
customization page, e.g. https://my.slack.com/customize, right
@@ -3008,7 +3098,9 @@
(slack-start))
(when (or p (y-or-n-p "Connect to telegram? "))
(telega))
- (jao-erc p))
+ (when (or p (y-or-n-p "Connect to libera? "))
+ ;; (jao-erc p)
+ (circe "libera")))
(pretty-hydra-define jao-hydra-chats (global-map "s-q" :color blue :quit-key "q")
("Connect"
@@ -3419,9 +3511,9 @@
;; ("t" jao-time-echo-times "current time")
)
"Chats"
- (("t" (jao-buffer-same-mode 'telega-chat-mode) "telgram buffers")
+ (("t" (jao-buffer-same-mode 'telega-chat-mode) "telegram buffers")
("s" (jao-buffer-same-mode 'slack-message-buffer-mode) "slack buffers")
- ("i" (jao-buffer-same-mode 'erc-mode) "irc channels"))
+ ("i" (jao-buffer-same-mode '(circe-channel-mode erc-mode)) "irc channels"))
"Looks"
(;; ("T" jao-toggle-transparency "toggle transparency"
;; :toggle (jao-transparent-p) :color red)