2015-12-02 14:23:39 +00:00
|
|
|
|
#+TITLE: ERC layer
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
2018-09-19 03:54:47 +00:00
|
|
|
|
* Table of Contents :TOC_4_gh:noexport:
|
2017-05-22 14:16:12 +00:00
|
|
|
|
- [[#description][Description]]
|
2017-08-06 02:14:10 +00:00
|
|
|
|
- [[#features][Features:]]
|
2017-05-22 14:16:12 +00:00
|
|
|
|
- [[#install][Install]]
|
|
|
|
|
- [[#layer][Layer]]
|
|
|
|
|
- [[#os-x][OS X]]
|
|
|
|
|
- [[#social-graph][Social graph]]
|
2017-08-28 02:54:04 +00:00
|
|
|
|
- [[#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]].
|
|
|
|
|
|
2017-08-06 02:14:10 +00:00
|
|
|
|
** 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]])
|
2016-11-23 14:45:25 +00:00
|
|
|
|
- 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]])
|
2015-07-31 02:18:22 +00:00
|
|
|
|
- Optional SASL authentication via the variable =erc-enable-sasl-auth=
|
|
|
|
|
(using [[http://emacswiki.org/emacs/ErcSASL][erc-sasl]])
|
2017-08-24 01:03:49 +00:00
|
|
|
|
- D-BUS notifications via the variable =erc-enable-notifications=
|
2015-08-18 22:27:49 +00:00
|
|
|
|
- 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
|
2016-01-06 05:21:55 +00:00
|
|
|
|
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
|
|
|
|
|
|
|
|
|
** OS X
|
2018-09-19 03:54:47 +00:00
|
|
|
|
It’s recommended to install the [[https://github.com/alloy/terminal-notifier][terminal-notifier gem]] so that you get
|
2015-06-10 16:44:30 +00:00
|
|
|
|
notifications via the OS X Notification Center.
|
|
|
|
|
|
|
|
|
|
** 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
|
|
|
|
|
2017-08-28 02:54:04 +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
|
2017-08-28 02:54:04 +00:00
|
|
|
|
|
|
|
|
|
** 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
|
2017-08-28 02:54:04 +00:00
|
|
|
|
|
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
|
|
|
|
|
|
2015-10-30 11:20:58 +00:00
|
|
|
|
| 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 |
|
2015-10-30 11:20:58 +00:00
|
|
|
|
| ~SPC m b~ | Switch between ERC buffers |
|
|
|
|
|
| ~SPC m d~ | Interactively input a user action and send it to IRC. |
|
2018-10-23 14:18:21 +00:00
|
|
|
|
| ~SPC m D~ | Draw Social Graph using [[https://github.com/vibhavp/erc-social-graph][erc-social-graph]] |
|
2015-10-30 11:20:58 +00:00
|
|
|
|
| ~SPC m j~ | Join a channel, executes the /join command |
|
2018-09-19 03:54:47 +00:00
|
|
|
|
| ~SPC m n~ | Run “/names #channel” in the current channel. |
|
2015-10-30 11:20:58 +00:00
|
|
|
|
| ~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
|
|
|
|
|
2015-06-10 21:16:01 +00:00
|
|
|
|
*Note:* If you want to connect securely to an IRC server, you must run =erc-tls=
|
2018-10-23 14:18:21 +00:00
|
|
|
|
command on ~SPC a i E~ instead of the =erc= command.
|
2015-06-10 21:16:01 +00:00
|
|
|
|
|
2016-01-25 04:28:10 +00:00
|
|
|
|
* Spacemacs Layout Support
|
|
|
|
|
ERC buffers are added automatically to the default layout for ERC controlled by
|
2018-09-19 03:54:47 +00:00
|
|
|
|
the variable =erc-spacemacs-layout-name= (defaults to “@ERC”) and the default
|
|
|
|
|
binding (“E”) is controlled by =erc-spacemacs-layout-binding=
|