mirror of https://github.com/Flinner/dots.git
feat: circe! with helm :)
This commit is contained in:
parent
fa4cc515f6
commit
7798ca854f
|
@ -154,6 +154,8 @@ The status line
|
||||||
(use-package doom-modeline
|
(use-package doom-modeline
|
||||||
:ensure t
|
:ensure t
|
||||||
:init (doom-modeline-mode 1)
|
:init (doom-modeline-mode 1)
|
||||||
|
:config
|
||||||
|
(display-battery-mode 1)
|
||||||
:custom
|
:custom
|
||||||
((doom-modeline-height 15) (doom-modeline-icon t)))
|
((doom-modeline-height 15) (doom-modeline-icon t)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -365,6 +367,7 @@ Edit: honestly I have no clue wtf that meant, or why I wrote it, but I will keep
|
||||||
"hv" '(counsel-describe-variable :which-key "Describe Variable")
|
"hv" '(counsel-describe-variable :which-key "Describe Variable")
|
||||||
"hF" '(counsel-describe-face :which-key "Describe Face")
|
"hF" '(counsel-describe-face :which-key "Describe Face")
|
||||||
"hi" '(info :which-key "info")
|
"hi" '(info :which-key "info")
|
||||||
|
"hm" '(woman :which-key "woman")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
**** search (s)
|
**** search (s)
|
||||||
|
@ -2126,31 +2129,66 @@ I wrote that, neat isn't it? :P
|
||||||
(znc-all)))
|
(znc-all)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** COMMENT circe
|
** circe
|
||||||
|
*** Secrets :^)
|
||||||
|
#+begin_src emacs-lisp :tangle no
|
||||||
|
;; Doesn't tangle!
|
||||||
|
;; loaded in use-package (block below)
|
||||||
|
(load "~/Documents/passwords/circe-networks.el")
|
||||||
|
|
||||||
|
; example content
|
||||||
|
(add-to-list 'circe-networks `("chat.name/username" :host "irc.example.com" :port 69
|
||||||
|
:tls t
|
||||||
|
:nick "nicky"
|
||||||
|
:pass ,(secrets-get-secret "local" "hehe :^)")
|
||||||
|
:user "username"))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** Helper Functions!
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun my/circe/clear ()
|
||||||
|
"Clear the buffer"
|
||||||
|
(interactive)
|
||||||
|
(circe-command-CLEAR))
|
||||||
|
|
||||||
|
(defun my/circe/build-helm-sources (server-buf)
|
||||||
|
"Builds helm candidates for a single server"
|
||||||
|
(helm-build-sync-source (buffer-name server-buf)
|
||||||
|
:candidates
|
||||||
|
(cons (cons (buffer-name server-buf) server-buf)
|
||||||
|
(cl-loop for buf in
|
||||||
|
(with-current-buffer server-buf (circe-server-channel-buffers))
|
||||||
|
collect (cons (buffer-name buf) buf)))
|
||||||
|
:action (list (cons "Switch to circe" #'switch-to-buffer))))
|
||||||
|
|
||||||
|
|
||||||
|
(defun my/circe/helm-buffers ()
|
||||||
|
"Switch between circe buffers using helm"
|
||||||
|
(interactive)
|
||||||
|
(helm :sources
|
||||||
|
(cl-loop for server-buf in (circe-server-buffers)
|
||||||
|
collect (my/circe/build-helm-sources server-buf))
|
||||||
|
:buffer "*helm circe*"))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** Setup
|
*** Setup
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package circe
|
(use-package circe
|
||||||
:defer t
|
:defer t
|
||||||
:preface
|
:preface
|
||||||
(defun my/circe/clear ()
|
|
||||||
(interactive)
|
|
||||||
(circe-command-CLEAR))
|
|
||||||
:config
|
:config
|
||||||
(add-to-list 'circe-networks `("flinner's znc" :host "flinner.my.to" :port 6697
|
;(add-to-list 'circe-networks `())
|
||||||
:tls t
|
;; adding to list happens here!
|
||||||
;; :sasl-strict t
|
(load "~/Documents/passwords/circe-networks.el")
|
||||||
:nick ,my/secret/znc/flinner.my.to/username
|
|
||||||
;; :sasl-username ,my/secret/znc/flinner.my.to/sassl-username
|
|
||||||
;; :sasl-password ,my/secret/znc/flinner.my.to/secret
|
|
||||||
:pass ,my/secret/znc/flinner.my.to/secret
|
|
||||||
:user ,my/secret/znc/flinner.my.to/username
|
|
||||||
))
|
|
||||||
(setq circe-color-nicks-min-constrast-ratio 4.5
|
(setq circe-color-nicks-min-constrast-ratio 4.5
|
||||||
circe-color-nicks-everywhere t)
|
circe-color-nicks-everywhere t)
|
||||||
:hook (circe-channel-mode . enable-circe-color-nicks)
|
:hook (circe-channel-mode . enable-circe-color-nicks)
|
||||||
:custom
|
:custom
|
||||||
(circe-format-say "{nick:-16s} {body}")
|
(circe-format-say "{nick:-16s} {body}")
|
||||||
;; :bind(("C-l" . my/circe/clear))
|
;; :bind(("C-l" . my/circe/clear))
|
||||||
|
:bind (:map circe-mode-map
|
||||||
|
([remap counsel-projectile-find-file] . my/circe/helm-buffers))
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue