Giter VIP home page Giter VIP logo

erc-status-sidebar's Introduction

erc-status-sidebar

MELPA

A hexchat-like activity overview for ERC channels. This an alternative view for the erc-track module. It displays all the same information erc-track puts in the mode line, but can be relegated to a single frame dedicated to IRC.

Demo GIF of erc-status-sidebar

Installation

From MELPA

  1. Follow the guide at https://melpa.org/#/getting-started to add the MELPA package repository
  2. Run M-x package-list-packages and select/install the erc-status-sidebar package

Manually

  1. Fetch the erc-status-sidebar.el repository

    git clone https://github.com/drewbarbs/erc-status-sidebar.git
  2. Load it in your emacs init file

    (add-to-list 'load-path "/path/to/erc-status-sidebar")
    (require 'erc-status-sidebar)

Usage

To open the ERC status sidebar in the current frame use M-x erc-status-sidebar-open (or erc-status-sidebar-toggle). Ensure the erc-track module is active (a member of erc-modules). This is the default setting for ERC.

To close the sidebar on the current frame use M-x erc-status-sidebar-close (or erc-status-sidebar-toggle). Provide a prefix argument to close the sidebar on all frames.

To kill the sidebar buffer and close the sidebar on all frames, use M-x erc-status-sidebar-kill.

Configuration

To specify a list message types that do not update the status sidebar (e.g. JOIN and PART messages), update the "Erc Track Exclude Types" custom setting: M-x customize-group <RET> erc-track.

Using a single window for ERC buffers

Sometimes (very often in Emacs 26.1), the switch-to-buffer-other-window function used by erc-status-sidebar to display chat buffers will split an existing ERC window like this:

ERC window being split against our wishes

The intent of this package is to provide a hexchat-like experience for ERC users, and hexchat only has the equivalent of one chat window, so this is undesirable.

To direct Emacs to use an existing ERC window (rather than creating a new one) add something like the following to your emacs init file:

(defun my/erc-window-reuse-condition (buf-name action)
  (with-current-buffer buf-name
    (if (eq major-mode 'erc-mode)
        ;; Don't override an explicit action
        (not action))))

(add-to-list 'display-buffer-alist
             '(my/erc-window-reuse-condition .
               ;; NOTE: display-buffer-reuse-mode-window only
               ;; available in Emacs 26+
               (display-buffer-reuse-mode-window
                (inhibit-same-window . t)
                (inhibit-switch-frame . t)
                (mode . erc-mode))))

If using Emacs < 26, you can copy an implementation of display-buffer-reuse-mode-window (called display-buffer-reuse-major-mode-window) from https://stackoverflow.com/a/28311686/756104

Acknowledgments

Credit to sidebar.el and outline-toc.el, from which all the sidebar window management ideas were lifted.

License

GNU General Public License v3

erc-status-sidebar's People

Contributors

bandali0 avatar drewbarbs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

erc-status-sidebar's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.