This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+chat/erc/README.org

127 lines
5.3 KiB
Org Mode
Raw Normal View History

#+TITLE: ERC layer
2015-06-10 16:44:30 +00:00
2019-05-02 21:49:30 +00:00
#+TAGS: chat|layer
2019-05-07 20:05:06 +00:00
* Table of Contents :TOC_5_gh:noexport:
2017-05-22 14:16:12 +00:00
- [[#description][Description]]
- [[#features][Features:]]
2017-05-22 14:16:12 +00:00
- [[#install][Install]]
- [[#layer][Layer]]
- [[#macos][macOS]]
2017-05-22 14:16:12 +00:00
- [[#social-graph][Social graph]]
- [[#disable-notifications][Disable notifications]]
- [[#enable-sasl-authentication][Enable SASL authentication]]
2017-05-22 14:16:12 +00:00
- [[#default-servers][Default servers]]
- [[#security-note][Security Note]]
- [[#key-bindings][Key bindings]]
- [[#spacemacs-layout-support][Spacemacs Layout Support]]
2015-06-10 16:44:30 +00:00
* Description
Layer for [[http://www.emacswiki.org/emacs/ERC][ERC IRC chat]].
** Features:
2015-06-10 16:44:30 +00:00
- Highlight nicks (using [[https://github.com/leathekd/erc-hl-nicks][erc-hl-nicks]])
- Image inline support (using [[https://github.com/kidd/erc-image.el][erc-image]])
- Logging to =~/.emacs.d/.cache/erc-logs= and =ViewLogMode= for viewing logs
2015-06-10 16:44:30 +00:00
(using [[https://github.com/Niluge-KiWi/erc-view-log][erc-view-log]])
- YouTube videos Thumbnails inline (using [[https://github.com/yhvh/erc-yt][erc-yt]])
- Social Graph for ERC messages (using [[https://github.com/vibhavp/erc-social-graph][erc-social-graph]])
- Optional SASL authentication via the variable =erc-enable-sasl-auth=
(using [[http://emacswiki.org/emacs/ErcSASL][erc-sasl]])
- D-BUS notifications via the variable =erc-enable-notifications=
- Completion of Emojis using [[https://github.com/dunn/company-emoji][company-emoji]] (still needs a way of showing, either
using the =emoji= layer or having a proper font) :clap:
2015-06-10 16:44:30 +00:00
* Install
** Layer
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =erc= to the existing =dotspacemacs-configuration-layers= list in this
file.
2015-06-10 16:44:30 +00:00
** macOS
It's recommended to install the [[https://github.com/alloy/terminal-notifier][terminal-notifier gem]] so that you get
notifications via the macOS Notification Center.
2015-06-10 16:44:30 +00:00
** Social graph
2016-04-08 16:05:44 +00:00
[[https://github.com/vibhavp/erc-social-graph][erc-social-graph]] needs graphviz to be installed on your system.
2015-06-10 16:44:30 +00:00
** Disable notifications
By default D-BUS notifications are enabled, to disable them set the layer
variable =erc-enable-notifications= to nil.
2018-09-19 03:54:47 +00:00
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'((erc :variables erc-enable-notifications nil)))
#+END_SRC
** Enable SASL authentication
To enable SASL authentication set the layer variable =erc-enable-sasl-auth= to
non nil.
2018-09-19 03:54:47 +00:00
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'((erc :variables erc-enable-sasl-auth t)))
#+END_SRC
2016-03-16 03:11:53 +00:00
** Default servers
2016-04-08 16:05:44 +00:00
You can define the default servers in the ERC custom layout by setting the
variable =erc-server-list=. Setting =:ssl= non nil will connect with =erc-tls=.
You can also use =<leader>aiD= to connect to your default servers outside the
custom layout.
#+BEGIN_SRC emacs-lisp
2018-09-19 03:54:47 +00:00
(setq-default dotspacemacs-configuration-layers
'((erc :variables
erc-server-list
'(("irc.freenode.net"
:port "6697"
:ssl t
:nick "some-user"
:password "secret")
("irc.myworkirc.net"
:port "1234"
:nick "some-suit"
:password "hunter2")))))
2016-04-08 16:05:44 +00:00
#+END_SRC
2016-03-16 03:11:53 +00:00
*** Security Note
2016-04-08 16:05:44 +00:00
You should not store your passwords in the clear in your =.spacemacs=, and that
goes double if you version your config file. ERC allows for a number of ways of
protecting this information.
2016-03-16 03:11:53 +00:00
2016-04-08 16:05:44 +00:00
First, ERC will check your =~/.authinfo.gpg=, looking for lines like
2016-03-16 03:11:53 +00:00
2016-04-08 16:05:44 +00:00
#+BEGIN_SRC shell
machine <irc.server.url> login <yournick> password <yourpassword> port <portnumber>
#+END_SRC
2016-03-16 03:11:53 +00:00
2016-04-08 16:05:44 +00:00
You can omit =:password= in this case.
2016-03-16 03:11:53 +00:00
2016-04-08 16:05:44 +00:00
You could also set an environment variable (or otherwise secret variable) and
read that in =:password=.
2016-03-16 03:11:53 +00:00
2015-06-10 16:44:30 +00:00
* Key bindings
| Key binding | Description |
|-------------+-------------------------------------------------------|
| ~SPC a i e~ | Starts ERC |
| ~SPC a i E~ | Starts ERC via TLS/SSL |
| ~SPC a i i~ | Switch to next active ERC buffer |
2016-03-16 03:11:53 +00:00
| ~SPC a i D~ | Start ERC with default servers |
| ~SPC m b~ | Switch between ERC buffers |
| ~SPC m d~ | Interactively input a user action and send it to IRC. |
| ~SPC m D~ | Draw Social Graph using [[https://github.com/vibhavp/erc-social-graph][erc-social-graph]] |
| ~SPC m j~ | Join a channel, executes the /join command |
| ~SPC m n~ | Run "/names #channel" in the current channel. |
| ~SPC m l~ | Run the /list command |
| ~SPC m p~ | Part from the channel |
| ~SPC m q~ | Quit server |
2015-06-10 16:44:30 +00:00
*Note:* If you want to connect securely to an IRC server, you must run =erc-tls=
command on ~SPC a i E~ instead of the =erc= command.
* Spacemacs Layout Support
ERC buffers are added automatically to the default layout for ERC controlled by
the variable =erc-spacemacs-layout-name= (defaults to "@ERC") and the default
binding ("E") is controlled by =erc-spacemacs-layout-binding=