]> git.armaanb.net Git - config.org.git/commitdiff
Add function to open circe
authorArmaan Bhojwani <me@armaanb.net>
Sat, 29 May 2021 17:42:36 +0000 (13:42 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Sat, 29 May 2021 17:47:13 +0000 (13:47 -0400)
config.org

index f224869a02ef82034ed9488ae90bc64a7a865ae0..7a8d8c141e5024c57c3330241ec9ccbf4cbfc222 100644 (file)
@@ -485,12 +485,20 @@ Circe is a really nice IRC client that claims to be above RCIRC and below ERC in
                                     :pass (lambda (null) (fetch-password
                                                           :login "emacs"
                                                           :machine "irc.armaanb.net"
-                                                          :port 6696)))
-                                   (circe "libera")
-                                   (circe "oftc")
-                                   (circe "tilde")))
+                                                          :port 6696)))))
     :custom (circe-default-part-message "goodbye!")
     :bind (:map circe-mode-map ("C-c C-r" . circe-reconnect-all)))
+
+  (defun acheam-irc ()
+    "Open circe"
+    (interactive)
+    (if (get-buffer "irc.armaanb.net:6696")
+        (switch-to-buffer "irc.armaanb.net:6696")
+      (progn (circe "libera")
+             (circe "oftc")
+             (circe "tilde"))))
+
+  (global-set-key (kbd "C-c i") 'acheam-irc)
 #+end_src
 ** Calendar
 Still experimenting with this setup. Not sure if I will keep it, but it works well for seeing my calendar events. I use =vdirsyncer= to sync my calendar events which I'm really not happy with.
@@ -810,7 +818,7 @@ I'm not a huge fan of how spectrwm handles keybindings, probably my biggest grip
 **** Programs
 #+begin_src conf :tangle ~/.spectrwm.conf
   program[email] = emacsclient -ce "(mu4e)"
-  program[irc] = emacsclient -ce '(switch-to-buffer "irc.armaanb.net:6698")'
+  program[irc] = emacsclient -ce '(acheam-irc)'
   program[rss] = emacsclient -ce '(elfeed)'
   program[calendar] = emacsclient -ce '(acheam-calendar)'
   program[calc] = emacsclient -ce '(progn (calc) (windmove-up) (delete-window))'